diff --git a/mens-api/src/main/java/kr/xit/biz/other/mapper/IBizOtherMapper.java b/mens-api/src/main/java/kr/xit/biz/other/mapper/IBizOtherMapper.java new file mode 100644 index 0000000..8db1111 --- /dev/null +++ b/mens-api/src/main/java/kr/xit/biz/other/mapper/IBizOtherMapper.java @@ -0,0 +1,27 @@ +package kr.xit.biz.other.mapper; + +import kr.xit.biz.other.model.ElecnoticeDTO; +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; + +import java.util.List; + +/** + *
+ * description : 전자고지 파일 외부연계 mapper
+ *
+ * packageName : kr.xit.biz.other.mapper
+ * fileName    : IBizOtherMapper
+ * author      : seojh
+ * date        : 2024-01-03
+ * ======================================================================
+ * 변경일         변경자        변경 내용
+ * ----------------------------------------------------------------------
+ * 2024-01-03    seojh       최초 생성
+ *
+ * 
+ */ +@Mapper +public interface IBizOtherMapper { + + List selectElecnoticemst(); +} diff --git a/mens-api/src/main/java/kr/xit/biz/other/model/ElecnoticeDTO.java b/mens-api/src/main/java/kr/xit/biz/other/model/ElecnoticeDTO.java new file mode 100644 index 0000000..2632d0b --- /dev/null +++ b/mens-api/src/main/java/kr/xit/biz/other/model/ElecnoticeDTO.java @@ -0,0 +1,122 @@ +package kr.xit.biz.other.model; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** + *
+ * description : 전자고지 파일 외부연계 DTO
+ *
+ * packageName : kr.xit.biz.other.model
+ * fileName    : ElecnoticeDTO
+ * author      : seojh
+ * date        : 2024-01-03
+ * ======================================================================
+ * 변경일         변경자        변경 내용
+ * ----------------------------------------------------------------------
+ * 2024-01-03    seojh       최초 생성
+ *
+ * 
+ */ +public class ElecnoticeDTO { + @Data + @NoArgsConstructor + @AllArgsConstructor + @SuperBuilder + public static class Elecnoticemst { + + /** + * 파일 일련번호 + */ + private String unitysndngmastrid; + /** + * 우편물 발송건수 + */ + private String sndngco; + /** + * 발송처리상태 + */ + private String sndngprocesssttus; + /** + * 등록자 + */ + private String insuser; + /** + * 등록일자 + */ + private String insdate; + /** + * 수정자 + */ + private String upduser; + /** + * 수정일자 + */ + private String upddate; + + } + + + @Data + @NoArgsConstructor + @AllArgsConstructor + @SuperBuilder + public static class Elecnoticedtl extends Elecnoticemst { + /** + * 우편물 일련번호 + */ + private String unitysndngdetailid; + /** + * 우편물 요청일시 + */ + private String sndngdt; + /** + * 우편물 발송구분 + */ + private String tmplatid; + /** + * 고지차수 + */ + private String gojidepth; + /** + * 기관번호 + */ + private String taxnum1; + /** + * 세목 + */ + private String taxnum2; + /** + * 납세년월기 + */ + private String taxnum3; + /** + * 과세번호 + */ + private String taxnum4; + /** + * 담당자 + */ + private String worker; + /** + * 가상계좌 일련번호 + */ + private String serialno; + /** + * 수신일자 + */ + private String recvdt; + /** + * 열람일자 + */ + private String readdt; + /** + * 발송결과코드 + */ + private String resultcode; + + } + +} \ No newline at end of file diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java b/mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java index 298c9d6..1c09f9d 100644 --- a/mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java +++ b/mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java @@ -23,4 +23,5 @@ import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse; public interface IPplusService { PpCommonResponse sendBulks(final SndngMssageParam reqDTO); PpStatusResponse statusBulks(final PpStatusRequest reqDTO); + String test(); } diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java index 910412d..4addfcd 100644 --- a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java +++ b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java @@ -13,6 +13,8 @@ import kr.xit.biz.ens.model.pplus.PplusDTO.BatchAcceptRequest; import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse; import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest; import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse; +import kr.xit.biz.other.mapper.IBizOtherMapper; +import kr.xit.biz.other.model.ElecnoticeDTO; import kr.xit.core.service.AbstractService; import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.spring.util.ApiWebClientUtil; @@ -65,6 +67,7 @@ public class PplusService extends AbstractService implements IPplusService { private final StringEncryptor jasyptStringEncryptor; private final ApiWebClientUtil webClient; private final IPplusMapper mapper; + private final IBizOtherMapper mapper2; @SuppressWarnings("unchecked") @Override @@ -142,4 +145,12 @@ public class PplusService extends AbstractService implements IPplusService { headerMap ); } + + @Override + public String test() { + final List tgtList = mapper2.selectElecnoticemst(); + + if(tgtList == null) System.out.println("1"); + return "test"; + } } diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java b/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java index c2746d5..b53aed9 100644 --- a/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java +++ b/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java @@ -52,4 +52,10 @@ public class PplusController { PpStatusResponse resDTO = service.statusBulks(paramDTO); return ApiResponseDTO.success(resDTO); } + @Operation(summary = "테스트", description = "테스트") + @PostMapping(value = "/test", produces = MediaType.APPLICATION_JSON_VALUE) + public IApiResponse test() { + String msg = service.test(); + return ApiResponseDTO.success(msg); + } } diff --git a/mens-api/src/main/resources/config/application-local.yml b/mens-api/src/main/resources/config/application-local.yml index 73ff0d4..94e7fec 100644 --- a/mens-api/src/main/resources/config/application-local.yml +++ b/mens-api/src/main/resources/config/application-local.yml @@ -13,7 +13,13 @@ spring: password: xit1807 read-only: false # multi-database - #secondary: + secondary: + database: oracle + driver-class-name: oracle.jdbc.OracleDriver + jdbc-url: jdbc:oracle:thin:@211.119.124.117:1521:ora11g + username: xit_traffic + password: traffic5 + read-only: false devtools: restart: diff --git a/mens-api/src/main/resources/config/application.yml b/mens-api/src/main/resources/config/application.yml index 079b1ef..164b1d7 100644 --- a/mens-api/src/main/resources/config/application.yml +++ b/mens-api/src/main/resources/config/application.yml @@ -76,16 +76,16 @@ spring: data-source-properties: rewriteBatchedStatements: true -# secondary: -# pool-name: xit-oracle-pool -# auto-commit: false -# # 인프라의 적용된 connection time limit보다 작아야함 -# max-lifetime: 1800000 -# maximum-pool-size: 15 -# minimum-idle: 5 -## transaction-isolation: TRANSACTION_READ_UNCOMMITTED -# data-source-properties: -# rewriteBatchedStatements: true + secondary: + pool-name: xit-oracle-pool + auto-commit: false + # 인프라의 적용된 connection time limit보다 작아야함 + max-lifetime: 1800000 + maximum-pool-size: 15 + minimum-idle: 5 +# transaction-isolation: TRANSACTION_READ_UNCOMMITTED + data-source-properties: + rewriteBatchedStatements: true logging: level: diff --git a/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml new file mode 100644 index 0000000..e5c7ad5 --- /dev/null +++ b/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/mens-core/src/main/java/kr/xit/core/spring/config/db/SecondaryMybatisConfig.java b/mens-core/src/main/java/kr/xit/core/spring/config/db/SecondaryMybatisConfig.java index 50e29b9..38dd54d 100644 --- a/mens-core/src/main/java/kr/xit/core/spring/config/db/SecondaryMybatisConfig.java +++ b/mens-core/src/main/java/kr/xit/core/spring/config/db/SecondaryMybatisConfig.java @@ -33,7 +33,10 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver; @Configuration @ConditionalOnProperty(value = "spring.datasource.hikari.secondary.username") @MapperScan( - basePackages = {"kr.xit.biz.sms.mapper"}, + basePackages = { + "kr.xit.biz.sms.mapper", + "kr.xit.biz.other.mapper", + }, sqlSessionFactoryRef = Constants.SECONDARY_SQL_SESSION ) public class SecondaryMybatisConfig { @@ -48,6 +51,7 @@ public class SecondaryMybatisConfig { sessionFactory.setDataSource(dataSource); sessionFactory.setConfigLocation(resolver.getResource(MYBATIS_CONFIG_FILE)); sessionFactory.setMapperLocations(resolver.getResources(String.format("classpath:/egovframework/mapper/**/*-%s-mapper.xml", database))); + System.out.println("database:"+database); return sessionFactory.getObject(); }