| | |
| | | package kr.wisestone.owl.service.impl; |
| | | |
| | | import kr.wisestone.owl.domain.*; |
| | | import kr.wisestone.owl.domain.enumType.IssueHistoryType; |
| | | import kr.wisestone.owl.mapper.HostingFieldMapper; |
| | | import kr.wisestone.owl.mapper.IssueHostingMapper; |
| | | import kr.wisestone.owl.repository.IssueHostingRepository; |
| | |
| | | private HostingFieldService hostingFieldService; |
| | | |
| | | @Autowired |
| | | private IssueHistoryService issueHistoryService; |
| | | |
| | | @Autowired |
| | | private IssueHostingMapper issueHostingMapper; |
| | | |
| | | @Override |
| | |
| | | |
| | | if (issueHostings != null && issueHostings.size() >0){//수정 할 경우 |
| | | issueHosting = issueHostings.iterator().next(); |
| | | // 변경 이력 |
| | | StringBuilder sb = new StringBuilder(); |
| | | issueHistoryService.detectIssueHosting(IssueHistoryType.MODIFY, param, issueHosting, sb); |
| | | issueHistoryService.addIssueHistory(issue, IssueHistoryType.MODIFY, sb.toString()); |
| | | |
| | | issueHosting.setHostingField(hostingField); |
| | | issueHosting.setName(MapUtil.getString(param, "name")); |
| | | issueHosting.setEmail(MapUtil.getString(param, "email")); |
| | |
| | | issueHosting = ConvertUtil.convertMapToClass(param, IssueHosting.class); |
| | | issueHosting.setIssue(issue); |
| | | issueHosting.setHostingField(hostingField); |
| | | // 추가 이력 |
| | | StringBuilder sb = new StringBuilder(); |
| | | issueHistoryService.detectIssueHosting(IssueHistoryType.ADD, param, issueHosting, sb); |
| | | issueHistoryService.addIssueHistory(issue, IssueHistoryType.MODIFY, sb.toString()); |
| | | } |
| | | this.issueHostingRepository.saveAndFlush(issueHosting); |
| | | } |