package kr.wisestone.owl.web.controller; import kr.wisestone.owl.constant.Constants; import kr.wisestone.owl.service.IssueTypeCustomFieldService; import kr.wisestone.owl.web.condition.IssueTypeCustomFieldCondition; import kr.wisestone.owl.web.form.IssueTypeCustomFieldForm; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import java.util.HashMap; import java.util.Map; /** * Created by wisestone on 2018-05-30. */ @Controller public class IssueTypeCustomFieldController extends BaseController { @Autowired private IssueTypeCustomFieldService issueTypeCustomFieldService; // 이슈 타입 사용자 필드 연결 수정 @RequestMapping(value = "/issueTypeCustomField/modify", produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map modify(@RequestBody Map> params) { Map resJsonData = new HashMap<>(); this.issueTypeCustomFieldService.modifyIssueTypeCustomFields(IssueTypeCustomFieldForm.make(params.get(Constants.REQ_KEY_CONTENT))); return this.setSuccessMessage(resJsonData); } // 이슈 타입 사용자 정의 필드 연결 조회 @RequestMapping(value = "/issueTypeCustomField/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map find(@RequestBody Map> params) { Map resJsonData = new HashMap<>(); this.issueTypeCustomFieldService.findIssueTypeCustomField(resJsonData, IssueTypeCustomFieldCondition.make(params.get(Constants.REQ_KEY_CONTENT))); return this.setSuccessMessage(resJsonData); } // 이슈 타입 별 사용자 정의 필드 연결 조회 @RequestMapping(value = "/issueTypeCustomField/findByIssueType", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map findByIssueType(@RequestBody Map> params) { Map resJsonData = new HashMap<>(); this.issueTypeCustomFieldService.findCustomFieldByIssueType(resJsonData, IssueTypeCustomFieldCondition.make(params.get(Constants.REQ_KEY_CONTENT))); return this.setSuccessMessage(resJsonData); } }