parent
6d524ddecb
commit
f02f92aede
@ -0,0 +1,25 @@
|
||||
package cokr.xit.ens.modules.nice.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import cokr.xit.ens.modules.nice.model.*;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* description :
|
||||
* packageName : cokr.xit.ens.modules.nice.mapper
|
||||
* fileName : INiceMapper
|
||||
* author : limju
|
||||
* date : 2024 9월 30
|
||||
* ======================================================================
|
||||
* 변경일 변경자 변경 내용
|
||||
* ----------------------------------------------------------------------
|
||||
* 2024 9월 30 limju 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper
|
||||
public interface INiceCiBillHistoryMapper {
|
||||
int insertBillHistory(final NiceCiDTO.BillHistDTO billHistDTO);
|
||||
int updateBillHistory(final NiceCiDTO.BillHistDTO billHistDTO);
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cokr.xit.ens.modules.nice.service;
|
||||
|
||||
import org.springframework.stereotype.*;
|
||||
import org.springframework.transaction.annotation.*;
|
||||
|
||||
import cokr.xit.ens.modules.nice.mapper.*;
|
||||
import cokr.xit.ens.modules.nice.model.*;
|
||||
import lombok.*;
|
||||
import lombok.extern.slf4j.*;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* description :
|
||||
* packageName : cokr.xit.ens.modules.nice.service
|
||||
* fileName : NiceCiBillHistoryService
|
||||
* author : limju
|
||||
* date : 2024 9월 27
|
||||
* ======================================================================
|
||||
* 변경일 변경자 변경 내용
|
||||
* ----------------------------------------------------------------------
|
||||
* 2024 9월 27 limju 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class NiceCiBillHistoryService {
|
||||
private final INiceCiBillHistoryMapper mapper;
|
||||
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public void insertBillHistory(final NiceCiDTO.BillHistDTO histDTO){
|
||||
mapper.insertBillHistory(histDTO);
|
||||
}
|
||||
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public void updateBillHistory(final NiceCiDTO.BillHistDTO histDTO){
|
||||
mapper.updateBillHistory(histDTO);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cokr.xit.ens.modules.nice.mapper.INiceCiBillHistoryMapper">
|
||||
|
||||
<insert id="insertBillHistory" parameterType="cokr.xit.ens.modules.nice.model.NiceCiDTO$BillHistDTO">
|
||||
/** iup-niceci-bill-history-mapper|insertBillHistory-Bill API(NICE CI) call history save|julim */
|
||||
<selectKey keyProperty="id" resultType="long" order="BEFORE">
|
||||
SELECT NVL(MAX(id), 0) + 1
|
||||
FROM ens_bill_his
|
||||
</selectKey>
|
||||
INSERT INTO ens_bill_his (
|
||||
id,
|
||||
linked_uuid,
|
||||
org_cd,
|
||||
req_se,
|
||||
bill_se,
|
||||
request_data,
|
||||
regist_dt
|
||||
) VALUES (
|
||||
#{id},
|
||||
#{linkedUuid},
|
||||
#{orgCd},
|
||||
#{reqSe},
|
||||
#{billSe},
|
||||
#{requestData},
|
||||
sysdate
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateBillHistory" parameterType="cokr.xit.ens.modules.nice.model.NiceCiDTO$BillHistDTO">
|
||||
/** iup-niceci-bill-history-mapper|updateBillHistory-Bill API(NICE CI) call history save|julim */
|
||||
UPDATE ens_bill_his
|
||||
SET bill_uid = #{billUid}
|
||||
, response_data = #{responseData}
|
||||
, error_code = #{errorCode}
|
||||
, error_message = #{errorMessage}
|
||||
, last_updt_dt = sysdate
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue