fix: FIXME 정리

dev
Jonguk. Lim 2 months ago
parent 9a0f255eb9
commit 2af51825ab

@ -14,7 +14,7 @@ import lombok.experimental.*;
@Getter
@ToString(exclude = {"intgrnSendMast"})
@SuperBuilder
@EqualsAndHashCode
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "ens_intgrn_snd_dtl", indexes = {

@ -9,10 +9,9 @@ import cokr.xit.ens.modules.kkotalk.code.*;
import lombok.*;
import lombok.experimental.*;
// FIXME: 카카오톡 신규 추가
@Entity
@Getter
@ToString
@ToString(exclude = {"sendMast"})
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor

@ -1,28 +1,21 @@
package cokr.xit.ens.modules.kkotalk.domain;
import java.util.Objects;
import java.util.*;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import org.hibernate.proxy.HibernateProxy;
import org.hibernate.proxy.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.TmpltMng;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.*;
import lombok.*;
import lombok.experimental.*;
// FIXME: 카카오톡 신규 추가
@Entity
@Getter
@ToString
@SuperBuilder
@NoArgsConstructor
@Table(name = "ens_tmplt_mng_kko_talk", schema = "", catalog = "")
@Table(name = "ens_tmplt_mng_kko_talk")
@DiscriminatorValue("kkotalk")
public class TmpltMngKkoTalk extends TmpltMng {

@ -1,10 +1,9 @@
package cokr.xit.ens.modules.kkotalk.domain.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.*;
import cokr.xit.ens.modules.kkotalk.domain.TmpltMngKkoTalk;
import cokr.xit.ens.modules.kkotalk.domain.*;
// FIXME: 카카오톡 신규 추가
public interface TmpltMngKkoTalkRepository extends JpaRepository<TmpltMngKkoTalk, Long>,
TmpltMngKkoTalkRepositoryCustom {
}

@ -1,11 +1,10 @@
package cokr.xit.ens.modules.kkotalk.domain.repository;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.TmpltMngRepositorySupport;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngSearchDTO;
import cokr.xit.ens.modules.kkotalk.domain.TmpltMngKkoTalk;
import cokr.xit.ens.modules.kkotalk.model.TmpltMngKkoTalkDTO;
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.kkotalk.domain.*;
import cokr.xit.ens.modules.kkotalk.model.*;
// FIXME: 카카오톡 신규 추가
public interface TmpltMngKkoTalkRepositoryCustom extends TmpltMngRepositorySupport<TmpltMngKkoTalk, TmpltMngSearchDTO, TmpltMngKkoTalkDTO> {
}

@ -3,21 +3,18 @@ package cokr.xit.ens.modules.kkotalk.domain.repository;
import static cokr.xit.ens.modules.common.ctgy.sys.mng.domain.QOrgMng.*;
import static cokr.xit.ens.modules.kkotalk.domain.QTmpltMngKkoTalk.*;
import java.util.List;
import java.util.Optional;
import java.util.*;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Projections;
import com.querydsl.core.types.QBean;
import com.querydsl.jpa.impl.JPAQueryFactory;
import com.querydsl.core.*;
import com.querydsl.core.types.*;
import com.querydsl.jpa.impl.*;
import cokr.xit.ens.core.utils.CmmnUtil;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngSearchDTO;
import cokr.xit.ens.modules.kkotalk.domain.TmpltMngKkoTalk;
import cokr.xit.ens.modules.kkotalk.model.TmpltMngKkoTalkDTO;
import lombok.RequiredArgsConstructor;
import cokr.xit.ens.core.utils.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.*;
import cokr.xit.ens.modules.kkotalk.domain.*;
import cokr.xit.ens.modules.kkotalk.model.*;
import lombok.*;
// FIXME: 카카오톡 신규 추가
@RequiredArgsConstructor
public class TmpltMngKkoTalkRepositoryImpl implements TmpltMngKkoTalkRepositoryCustom {

@ -22,7 +22,6 @@ import cokr.xit.ens.modules.kkotalk.model.*;
*
* </pre>
*/
// FIXME: 카카오톡 신규 추가
@Mapper
public interface IKkoTalkMapper {
void saveSndDtlKkoTalk(SendDetailKkoTalkDTO sendDetailKkoTalk);
@ -41,5 +40,4 @@ public interface IKkoTalkMapper {
Optional<SendMast> selectSendMastByExternalIdAndEnvelopeId(final Map<String, String> map);
Optional<Bill> selectBillByBillUid(final String billUid);
}

@ -26,7 +26,6 @@ import lombok.experimental.*;
*
* </pre>
*/
// FIXME: 카카오톡 신규 추가
public class KkotalkDTO extends KkotalkApiDTO {
//------------------ envelop ----------------------------------------------------------------------

@ -12,7 +12,6 @@ import io.swagger.v3.oas.annotations.media.*;
import lombok.*;
import lombok.experimental.*;
// FIXME: 카카오톡 신규 추가
@EqualsAndHashCode(callSuper = true)
@Data
@ToString

@ -1,18 +1,14 @@
package cokr.xit.ens.modules.kkotalk.model.config;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import javax.validation.*;
import javax.validation.constraints.*;
import cokr.xit.ens.modules.kkomydoc.model.config.XitProperty;
import cokr.xit.ens.modules.kkotalk.model.KkotalkApiDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import cokr.xit.ens.modules.kkomydoc.model.config.*;
import cokr.xit.ens.modules.kkotalk.model.*;
import io.swagger.v3.oas.annotations.media.*;
import lombok.*;
import lombok.experimental.*;
// FIXME: 카카오톡 신규 추가
@Getter
@ToString
@SuperBuilder

@ -32,23 +32,22 @@ public class KkoTalkStat {
@Schema(required = true, title = "진행 상태", example = " ")
private KkoTalkStatusCd status;
@Schema(required = false, title = "송신 시간(yyyyMMddHHmmss)", example = " ")
@Schema(required = false, title = "송신 시간", example = " ")
private String sentDt;
@Schema(required = false, title = "수신 시간(yyyyMMddHHmmss)", example = " ")
@Schema(required = false, title = "수신 시간", example = " ")
private String receivedDt;
// FIXME: 카카오톡 적용 필요
// @Schema(required = false, title = "열람 인증을 성공한 최초 시간(yyyyMMddHHmmss)", example = " ")
@Schema(required = false, title = "열람 인증을 성공한 최초 시간", example = " ")
private String authenticatedAt;
//
// @Schema(required = false, title = "OTT 검증을 성공한 최초 시간(yyyyMMddHHmmss)", example = " ")
@Schema(required = false, title = "OTT 검증을 성공한 최초 시간", example = " ")
private String ottVerifiedAt;
//
// @Schema(required = false, title = "최초 열람 시간(yyyyMMddHHmmss)", example = " ")
@Schema(required = false, title = "최초 열람 시간", example = " ")
private String readAt;
//
// @Schema(required = false, title = "알림톡 수신 시간(yyyyMMddHHmmss)", example = " ")
@Schema(required = false, title = "알림톡 수신 시간", example = " ")
private String userNotifiedAt;
@Schema(required = false, title = "에러코드", example = " ")

@ -1,18 +1,13 @@
package cokr.xit.ens.modules.kkotalk.model.struct;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.*;
import cokr.xit.ens.core.mapstruct.GenericMapper;
import cokr.xit.ens.core.mapstruct.StructMapperConfig;
import cokr.xit.ens.modules.kkotalk.domain.TmpltMngKkoTalk;
import cokr.xit.ens.modules.kkotalk.model.TmpltMngKkoTalkDTO;
import cokr.xit.ens.core.mapstruct.*;
import cokr.xit.ens.modules.kkotalk.domain.*;
import cokr.xit.ens.modules.kkotalk.model.*;
// FIXME: 카카오톡 신규 추가
@Mapper(config = StructMapperConfig.class)
public interface TmpltMngKkoTalkMapper extends GenericMapper<TmpltMngKkoTalkDTO, TmpltMngKkoTalk> {
@Override
@Mapping(target = "orgMng.orgCd", source = "orgCd")
TmpltMngKkoTalk toEntity(TmpltMngKkoTalkDTO tmpltMngKkoTalkDTO);
@ -20,6 +15,4 @@ public interface TmpltMngKkoTalkMapper extends GenericMapper<TmpltMngKkoTalkDTO,
@Override
@Mapping(target = "orgCd", expression = "java(tmpltMngKkoTalk.getOrgMng().getOrgCd())")
TmpltMngKkoTalkDTO toDto(TmpltMngKkoTalk tmpltMngKkoTalk);
}

@ -27,7 +27,6 @@ import cokr.xit.ens.modules.kkotalk.service.support.*;
import lombok.*;
import lombok.extern.slf4j.*;
// FIXME: 카카오톡 신규 추가
@Slf4j
@Service
@RequiredArgsConstructor
@ -306,7 +305,6 @@ public class KkoTalkService {
throw new EnsException(EnsErrCd.ERR401, "토큰(은)는 필수조건 입니다.");
OrgMng orgMng = orgMngService.find(orgCd).getResultInfo();
// FIXME: 카카오톡 토큰검증 API 처리
ResponseEntity<String> resp = kkoTalkApi.validToken(
orgMng,
KkotalkApiDTO.ValidTokenRequest.builder()
@ -326,7 +324,6 @@ public class KkoTalkService {
throw new EnsException(EnsErrCd.ERR505, String.format("토큰검증 응답데이터 파싱 실패. %s", resp.getBody()));
}
// FIXME: 카카오톡 적용 확인
String envelopeStatus = (String) mResponse.get("status");
if (!CmmnUtil.isEmpty(envelopeStatus)) {
responseVO = EnsResponseVO.okBuilder()
@ -356,7 +353,6 @@ public class KkoTalkService {
} finally {
if (EnsErrCd.OK.equals(responseVO.getErrCode())) {
Map<String, Object> resultInfo = (Map<String, Object>) responseVO.getResultInfo();
// FIXME: 카카오톡 적용 확인 필요??
sendDetailKkoTalkTokenHistRepository.save(SendDetailKkoTalkTokenHist.builder()
.envelopeId(envelopeId)
.externalId(externalId)
@ -403,7 +399,6 @@ public class KkoTalkService {
throw new EnsException(EnsErrCd.ERR401, "문서식별번호(은)는 필수조건 입니다.");
OrgMng orgMng = orgMngService.find(orgCd).getResultInfo();
// FIXME: 카카오툭 토큰 확인 API 호출 처리
ResponseEntity<String> resp = kkoTalkApi.modifyStatus(
orgMng,
KkotalkDTO.EnvelopeId.builder()

@ -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());
}
}

@ -33,7 +33,6 @@ import cokr.xit.ens.modules.kkotalk.model.*;
import lombok.*;
import lombok.extern.slf4j.*;
// FIXME: 카카오톡 신규 추가
@Slf4j
@Component
@RequiredArgsConstructor

@ -37,7 +37,6 @@ import lombok.extern.slf4j.*;
*
* </pre>
*/
// FIXME: 카카오톡 신규 추가
@Slf4j
@RequiredArgsConstructor
@Component
@ -370,7 +369,6 @@ public class KkoTalkApiService {
return responseEntity;
}
// FIXME: 카카오톡 API 호출 시 API 호출 정보 추가 필요
private HttpHeaders getHeaders(final OrgMng orgMng){
HttpHeaders headers = new HttpHeaders();
headers.setContentType(new MediaType(MediaType.APPLICATION_JSON, Charset.forName("utf-8")));

@ -31,7 +31,6 @@ import cokr.xit.ens.modules.kkotalk.service.strategy.*;
import lombok.*;
import lombok.extern.slf4j.*;
// FIXME: 카카오톡 신규 추가
@Slf4j
@Component
@RequiredArgsConstructor

@ -32,7 +32,6 @@ import cokr.xit.ens.modules.kkotalk.model.*;
import lombok.*;
import lombok.extern.slf4j.*;
// FIXME: 카카오톡 신규 추가
@Slf4j
@Component
@RequiredArgsConstructor
@ -111,7 +110,6 @@ public class KkoTalkRsltFetcher extends ResultProcTemplate {
.build())
);
} finally {
// FIXME: 카카오톡 추가 - 카카오톡 테이블 업데이트
list
.forEach(talkMapper::updateKakaotalkStatusBulksResult);
@ -135,7 +133,6 @@ public class KkoTalkRsltFetcher extends ResultProcTemplate {
if (EnsErrCd.OK.equals(respVO.getErrCode())) {
sendMast.setError(FieldError.initBuilder().build());
// FIXME: 카카오톡 코드 반영 필요
Integer readCnt = sendDetails.stream()
.map(row -> KkoTalkStatusCd.READ.equals(row.getStatus()) ? 1 : 0)
.reduce(Integer::sum)

@ -21,7 +21,6 @@ import cokr.xit.ens.modules.kkotalk.model.config.*;
import lombok.*;
import lombok.extern.slf4j.*;
// FIXME: 카카오톡 신규 추가
@Slf4j
@Component
@RequiredArgsConstructor
@ -53,7 +52,6 @@ public class KkoTalkRsltProvider implements EnsPhaseProcSupport<EnsResponseVO, L
List<SendDetailKkoTalkDTO> sendDetailKkoTalks = talkMapper.findAllBySendMastId(sendMast.getSendMastId());
// FIXME: 카카오톡 적용 필요
KkoTalkRsltRespDTO respDTO = KkoTalkRsltRespDTO.builder()
.sendMastId(sendMast.getSendMastId())
.statCd(sendMast.getStatCd())
@ -71,7 +69,6 @@ public class KkoTalkRsltProvider implements EnsPhaseProcSupport<EnsResponseVO, L
.status(row.getStatus())
.sentDt(row.getSentAt())
.receivedDt(row.getReceivedAt())
// FIXME: 카카오톡 적용 필요
.authenticatedAt(row.getAuthenticatedAt())
.ottVerifiedAt(row.getOttVerifiedAt())
.readAt(row.getReadAt())

@ -35,7 +35,6 @@ import cokr.xit.ens.modules.kkotalk.model.*;
import lombok.*;
import lombok.extern.slf4j.*;
// FIXME: 카카오톡 신규 추가
@Slf4j
@Component
@RequiredArgsConstructor
@ -136,9 +135,7 @@ public class KkoTalkSender extends SendProcTemplate {
row.setErrorMessage(e.getMessage());
});
} finally {
// FIXME: 카카오톡 추가 - 카카오톡 테이블 업데이트
list.stream()
.forEach(talkMapper::updateKakaotalkSendBulksResult);
list.forEach(talkMapper::updateKakaotalkSendBulksResult);
if (!CmmnUtil.isEmpty(envelopes))
sendDetailKkoTalkReqHistRepository.saveAll(

Loading…
Cancel
Save