|
|
|
@ -1,34 +1,25 @@
|
|
|
|
|
package cokr.xit.ens.modules.kkotalk.service.strategy;
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.*;
|
|
|
|
|
|
|
|
|
|
import javax.validation.*;
|
|
|
|
|
|
|
|
|
|
import org.mapstruct.factory.*;
|
|
|
|
|
import org.springframework.stereotype.*;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.ens.core.exception.*;
|
|
|
|
|
import cokr.xit.ens.core.exception.code.*;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.*;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.*;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.*;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.service.strategy.*;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.domain.*;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.domain.repository.*;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.model.*;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.model.struct.*;
|
|
|
|
|
import lombok.*;
|
|
|
|
|
|
|
|
|
|
import javax.validation.ConstraintViolation;
|
|
|
|
|
import javax.validation.Validation;
|
|
|
|
|
import javax.validation.Validator;
|
|
|
|
|
|
|
|
|
|
import org.mapstruct.factory.Mappers;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.ens.core.exception.EnsException;
|
|
|
|
|
import cokr.xit.ens.core.exception.code.EnsErrCd;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.OrgMng;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.OrgMngRepository;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.TmpltMngRepository;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngDTO;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngSearchDTO;
|
|
|
|
|
import cokr.xit.ens.modules.common.ctgy.sys.mng.service.strategy.TmpltMngStrategyTemplate;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.domain.TmpltMngKkoTalk;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.domain.repository.TmpltMngKkoTalkRepository;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.model.TmpltMngKkoTalkDTO;
|
|
|
|
|
import cokr.xit.ens.modules.kkotalk.model.struct.TmpltMngKkoTalkMapper;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
|
|
|
|
|
// FIXME: 카카오톡 신규 추가
|
|
|
|
|
@Component("tmpltMngStrategy_kkotalk")
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class TmpltMngStrategyKkoTalk extends TmpltMngStrategyTemplate<Map<String, Object>, TmpltMngKkoTalkDTO> {
|
|
|
|
@ -37,7 +28,6 @@ public class TmpltMngStrategyKkoTalk extends TmpltMngStrategyTemplate<Map<String
|
|
|
|
|
private final TmpltMngRepository tmpltMngRepository;
|
|
|
|
|
private final TmpltMngKkoTalkRepository tmpltMngKkoTalkRepository;
|
|
|
|
|
private final TmpltMngKkoTalkMapper kkoTalkMapper = Mappers.getMapper(TmpltMngKkoTalkMapper.class);
|
|
|
|
|
// private final RedisTemplate redisTemplate;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<TmpltMngKkoTalkDTO> findAll(TmpltMngSearchDTO tmpltMngSearchDTO) {
|
|
|
|
@ -47,10 +37,6 @@ public class TmpltMngStrategyKkoTalk extends TmpltMngStrategyTemplate<Map<String
|
|
|
|
|
@Override
|
|
|
|
|
public Optional<TmpltMngKkoTalkDTO> find(String orgCd, String tmpltCd) {
|
|
|
|
|
return tmpltMngKkoTalkRepository.findDtoByOrgCdAndTmpltCd(orgCd, tmpltCd);
|
|
|
|
|
|
|
|
|
|
// String key = super.pushCache(redisTemplate, orgCd, tmpltCd, tmpltMngKkoMydocRepository);
|
|
|
|
|
// HashOperations<String, String, TmpltMngKkoMydocDTO> hashOperations = redisTemplate.opsForHash();
|
|
|
|
|
// return Optional.ofNullable(hashOperations.entries(KEY).get(key));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -97,7 +83,5 @@ public class TmpltMngStrategyKkoTalk extends TmpltMngStrategyTemplate<Map<String
|
|
|
|
|
throw new EnsException(EnsErrCd.ERR402, "\"미사용\" 상태의 템플릿은 수정 할 수 없습니다.");
|
|
|
|
|
kkoTalkMapper.updateFromDto(dto, tmpltMng);
|
|
|
|
|
tmpltMng.setUpdId("ENS_SYS");
|
|
|
|
|
|
|
|
|
|
// super.deleteCache(redisTemplate, dto.getOrgCd(), dto.getTmpltCd());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|