| | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.domain.Issue; |
| | | import kr.wisestone.owl.service.IssueService; |
| | | import kr.wisestone.owl.service.impl.IssueServiceImpl; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.web.condition.ApiMonitorCondition; |
| | | import kr.wisestone.owl.web.condition.IssueCondition; |
| | | import kr.wisestone.owl.web.form.IssueForm; |
| | | import org.slf4j.Logger; |
| | |
| | | @Controller |
| | | public class IssueController extends BaseController { |
| | | |
| | | private static final Logger |
| | | log = LoggerFactory.getLogger(IssueController.class); |
| | | private static final Logger log = LoggerFactory.getLogger(IssueController.class); |
| | | |
| | | @Autowired |
| | | private IssueService issueService; |
| | |
| | | // 버전 생성 |
| | | this.issueService.addIssueVersion(issue.getId()); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 연관이슈 생성 |
| | | @RequestMapping(value = "/issue/relIssueAdd", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> relIssueAdd(MultipartHttpServletRequest request) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | // 이슈 생성 |
| | | Issue issue = this.issueService.addRelIssue(IssueForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFiles("file")); |
| | | // 버전 생성 |
| | | this.issueService.addIssueVersion(issue.getId()); |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issue.getId()); //연관이슈 ID |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 하위이슈 삭제 |
| | | @RequestMapping(value = "/issue/removeAll", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> removesAll(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.issueService.removeAllIssues(IssueForm.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 하위이슈 삭제 |
| | | /*@RequestMapping(value = "/issue/removeDown", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> removesDown(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.issueService.removeDownIssues(IssueForm.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | }*/ |
| | | |
| | | // 이슈 다중 상태 변경 |
| | | @RequestMapping(value = "/issue/modifyMultiIssueStatus", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | |
| | | // api 기록 조회 |
| | | @RequestMapping(value = "/api/findHistory", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> findApiHistory(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.issueService.findApiIssue(ApiMonitorCondition.make(params.get(Constants.REQ_KEY_CONTENT)), resJsonData); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | } |