diff --git a/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java b/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java index 897371b..e307d5a 100644 --- a/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java +++ b/src/main/java/cokr/xit/ens/modules/kkotalk/service/support/KkoTalkAcceptor.java @@ -1,54 +1,36 @@ package cokr.xit.ens.modules.kkotalk.service.support; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.stream.Collectors; - -import javax.validation.ConstraintViolation; -import javax.validation.Validation; -import javax.validation.Validator; - -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -import cokr.xit.ens.core.aop.EnsResponseVO; -import cokr.xit.ens.core.exception.EnsException; -import cokr.xit.ens.core.exception.code.EnsErrCd; -import cokr.xit.ens.core.utils.CmmnUtil; -import cokr.xit.ens.core.utils.DateUtil; -import cokr.xit.ens.core.utils.IdGenerator; -import cokr.xit.ens.core.utils.MapDeserailizer; -import cokr.xit.ens.core.utils.crypto.AES256; -import cokr.xit.ens.core.utils.crypto.Crypto; -import cokr.xit.ens.modules.common.biztmplt.EnsPhaseProcSupport; -import cokr.xit.ens.modules.common.code.PostSeCd; -import cokr.xit.ens.modules.common.code.StatCd; -import cokr.xit.ens.modules.common.code.VenderCd; -import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.Bill; -import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.repository.BillRepository; -import cokr.xit.ens.modules.common.ctgy.mblpage.domain.SendDetailMblPage; -import cokr.xit.ens.modules.common.ctgy.mblpage.domain.repository.SendDetailMblPageRepository; -import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.OrgMng; -import cokr.xit.ens.modules.common.ctgy.sys.mng.service.KeySequenceService; -import cokr.xit.ens.modules.common.ctgy.sys.mng.service.OrgMngService; -import cokr.xit.ens.modules.common.ctgy.sys.mng.service.TmpltMngService; -import cokr.xit.ens.modules.common.domain.SendMast; -import cokr.xit.ens.modules.common.domain.repository.SendMastRepository; -import cokr.xit.ens.modules.kkomydoc.model.config.XitProperty; -import cokr.xit.ens.modules.kkotalk.mapper.IKkoTalkMapper; -import cokr.xit.ens.modules.kkotalk.model.KkotalkDTO; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; +import java.util.*; +import java.util.concurrent.atomic.*; +import java.util.stream.*; + +import javax.validation.*; + +import org.springframework.stereotype.*; +import org.springframework.transaction.annotation.*; + +import com.google.gson.*; + +import cokr.xit.ens.core.aop.*; +import cokr.xit.ens.core.exception.*; +import cokr.xit.ens.core.exception.code.*; +import cokr.xit.ens.core.utils.*; +import cokr.xit.ens.core.utils.crypto.*; +import cokr.xit.ens.modules.common.biztmplt.*; +import cokr.xit.ens.modules.common.code.*; +import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.*; +import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.repository.*; +import cokr.xit.ens.modules.common.ctgy.mblpage.domain.*; +import cokr.xit.ens.modules.common.ctgy.mblpage.domain.repository.*; +import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.*; +import cokr.xit.ens.modules.common.ctgy.sys.mng.service.*; +import cokr.xit.ens.modules.common.domain.*; +import cokr.xit.ens.modules.common.domain.repository.*; +import cokr.xit.ens.modules.kkomydoc.model.config.*; +import cokr.xit.ens.modules.kkotalk.mapper.*; +import cokr.xit.ens.modules.kkotalk.model.*; +import lombok.*; +import lombok.extern.slf4j.*; // FIXME: 카카오톡 신규 추가 @Slf4j @@ -154,6 +136,7 @@ public class KkoTalkAcceptor implements EnsPhaseProcSupport, Kk .closeDt(DateUtil.toLocalDateTime(reqDTO.getClose_dt())) .build(); sendMastRepository.save(sendMast); + sendMastRepository.flush(); Gson gson = new GsonBuilder().disableHtmlEscaping().create(); @@ -235,6 +218,7 @@ public class KkoTalkAcceptor implements EnsPhaseProcSupport, Kk .filter(row -> CmmnUtil.isEmpty(row.getBillId())) .collect(Collectors.toList()) ); + billRepository.flush(); // kkotalk 발송상세 저장 sendDetails.forEach(d -> { diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index f155e88..03c16c5 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -1,5 +1,5 @@ server: - port: 18090 #port + port: 18090 #port @@ -33,7 +33,10 @@ spring: jpa: database-platform: org.hibernate.dialect.Oracle10gDialect - show-sql: false #하이버네이트SQL 콘솔 출력 여부 + show-sql: true #하이버네이트SQL 콘솔 출력 여부 + properties: + hibernate: + format_sql: true hibernate: ddl-auto: none diff --git a/src/main/resources/mybatis-mapper/modules/iup-kkotalk-mapper.xml b/src/main/resources/mybatis-mapper/modules/iup-kkotalk-mapper.xml index 66bf048..11b30cb 100644 --- a/src/main/resources/mybatis-mapper/modules/iup-kkotalk-mapper.xml +++ b/src/main/resources/mybatis-mapper/modules/iup-kkotalk-mapper.xml @@ -29,7 +29,7 @@ send_mast_id, regist_dt ) VALUES ( - select ens_seq_generator.nextval from dual, + #{sendDetailId}, #{title}, #{link}, #{hash}, diff --git a/src/main/resources/spy.properties b/src/main/resources/spy.properties new file mode 100644 index 0000000..bdbc2d9 --- /dev/null +++ b/src/main/resources/spy.properties @@ -0,0 +1,9 @@ +# \uB85C\uADF8 \uCD9C\uB825 \uD615\uC2DD \uC9C0\uC815 +modulelist=com.p6spy.engine.logging.P6LogFactory +# \uB85C\uADF8 \uB808\uBCA8 \uC124\uC815 (ALL, INFO, DEBUG, ERROR) +loglevel=INFO +# \uB85C\uADF8\uC5D0 \uD3EC\uD568\uD560 SQL \uC720\uD615 (\uC608: \uBAA8\uB4E0 SQL \uB85C\uADF8\uB97C \uBCF4\uAE30 \uC704\uD574\uC11C\uB294 `ALL`\uB85C \uC124\uC815) +excludecategories=ALL +# Hibernate\uAC00 \uC0DD\uC131\uD558\uB294 PreparedStatement \uB85C\uADF8\uB97C \uC6D0\uBB38\uC73C\uB85C \uCD9C\uB825 +# \uB9CC\uC57D SQL \uBB38\uC744 \uC9C1\uC811 \uBCF4\uACE0 \uC2F6\uB2E4\uBA74 true\uB85C \uC124\uC815 +useRegularExpressions=true