admin_chrg 수정,삭제부분

This commit is contained in:
2023-03-27 16:56:25 +09:00
parent 0629923f29
commit bcc10f0947
13 changed files with 589 additions and 61 deletions

View File

@@ -1148,10 +1148,6 @@
<select id="selectChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgList">
SELECT
@ROWNUM := @ROWNUM + 1 AS NO
,A.*
FROM (
SELECT
@ROWNUM := @ROWNUM + 1 AS NO
, eci.CUST_NM
, esu.USER_ID
, ecm.CHRG_DIV
@@ -1160,6 +1156,7 @@
, ecm.CHRG_AMT
, ecm.USE_YN
, eci.BIZRNO
, ecm.CHRG_SEQ
FROM hubez_admin.EZ_CHARGE_MNG ecm
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
@@ -1167,10 +1164,10 @@
WHERE 1 = 1
AND ecm.USE_YN ='Y'
<if test="startDt != null and startDt != ''">
AND ecm.STRT_YM <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m')
AND (ecm.STRT_YM <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m')
</if>
<if test="endDt != null and endDt != ''">
OR ecm.END_YM <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m')
OR ecm.END_YM <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m'))
</if>
<if test="searchType1 != null and searchType1 != ''">
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
@@ -1183,13 +1180,28 @@
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
</if>
</if>
ORDER BY esu.USER_ID DESC) A ,
( SELECT @ROWNUM := #{page} ) AS R
ORDER BY ecm.CHRG_SEQ DESC
</select>
<!-- 충전관리 상세 조회 -->
<select id="selectChrgDetail" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgDetail">
SELECT
eci.CUST_NM
, esu.USER_ID
, ecm.CHRG_DIV
, ecm.STRT_YM
, ecm.END_YM
, ecm.CHRG_AMT
, ecm.USE_YN
, eci.BIZRNO
, ecm.CHRG_SEQ
FROM hubez_admin.EZ_CHARGE_MNG ecm
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
AND ecm.USE_YN ='Y'
AND ecm.CHRG_SEQ = #{chrgSeq}
ORDER BY ecm.CHRG_SEQ DESC
</select>
<!-- 이용자 충전번호 조회(채번) -->
@@ -1228,10 +1240,11 @@
</insert>
<update id="updateChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
hubez_admin.EZ_CHARGE_MNG
set
ecm.USE_YN ='N'
WHERE USER_SEQ = (SELECT USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID = #{userId})
UPDATE
hubez_admin.EZ_CHARGE_MNG ecm
set
ecm.USE_YN ='N'
WHERE ecm.CHRG_SEQ = #{chrgSeq}
</update>
<insert id="addChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
@@ -1247,27 +1260,27 @@
, REG_DT
, CHG_ID
, CHG_DT
)
) VALUES(
#{chrgSeq}
, #{userSeq}
, 'Y'
, #{startDt}
, #{endDt}
, 'E'
, #{strtYm}
, #{endYm}
, #{chrgAmt}
, 'Y'
, #{regId}
, NOW()
, #{regId}
, NOW()
)
)
</insert>
<update id="deleteChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
UPDATE
hubez_admin.EZ_CHARGE_MNG
hubez_admin.EZ_CHARGE_MNG ecm
set
ecm.USE_YN ='N'
WHERE USER_SEQ = (SELECT USER_SEQ FROM hubez_common.EZ_SVC_USER WHERE USER_ID = #{userId})
WHERE ecm.CHRG_SEQ = #{chrgSeq}
</update>