| | |
| | | import kr.wisestone.owl.common.ExcelConditionCheck; |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.domain.CompanyField; |
| | | import kr.wisestone.owl.domain.HostingField; |
| | | import kr.wisestone.owl.exception.OwlRuntimeException; |
| | | import kr.wisestone.owl.mapper.HostingFieldMapper; |
| | |
| | | import kr.wisestone.owl.web.condition.HostingFieldCondition; |
| | | import kr.wisestone.owl.web.form.HostingFieldForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | |
| | | // Hosting 추가 |
| | | @Override |
| | | public HostingField add(HostingFieldForm HostingFieldForm) { |
| | | HostingField HostingField = ConvertUtil.copyProperties(HostingFieldForm, HostingField.class); |
| | | hostingFieldRepository.saveAndFlush(HostingField); |
| | | return HostingField; |
| | | HostingField hostingField = ConvertUtil.copyProperties(HostingFieldForm, HostingField.class); |
| | | if (hostingField.getCode() != null && !hostingField.getCode().equals("")) { |
| | | hostingFieldRepository.saveAndFlush(hostingField); |
| | | } else { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.HOSTING_CODE_NOT_ENTER)); |
| | | } |
| | | return hostingField; |
| | | } |
| | | |
| | | // Hosting 목록을 가져온다. |
| | |
| | | return this.convertHostingVoToMap(results, totalHostingCount, pageable, resJsonData); |
| | | } |
| | | |
| | | public Map<String, Object> find(Long id) { |
| | | return this.hostingFieldMapper.findById(id); |
| | | } |
| | | |
| | | // Hosting 상세 조회한다. |
| | | @Override |
| | |
| | | HostingField HostingField = ConvertUtil.copyProperties(HostingFieldForm, HostingField.class); |
| | | hostingFieldRepository.saveAndFlush(HostingField); |
| | | } |
| | | |
| | | |
| | | // Hosting를 삭제한다. |
| | | @Override |