fix : 관리자 구독서비스 상품변경 관리

This commit is contained in:
jazz
2026-02-09 11:36:45 +09:00
parent e9b53f049e
commit e6bf779b11
8 changed files with 866 additions and 17 deletions

View File

@@ -35,16 +35,16 @@
WHERE GO.USE_AT = 'Y'
AND GO.SUBSVC_AT = 'Y'
AND GO.SOPMAL_CD = #{sopmalCd}
<if test="srchSelSubsvcNm != null and srchSelSubsvcNm != ''">
<if test='srchSelSubsvcNm != null and srchSelSubsvcNm != ""'>
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
</if>
<if test="srchSelSubsvcGnr != null and srchSelSubsvcGnr != ''">
<if test='srchSelSubsvcGnr != null and srchSelSubsvcGnr != ""'>
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
</if>
<if test="srchSubsvcNm != null and srchSubsvcNm != ''">
<if test='srchSubsvcNm != null and srchSubsvcNm != ""'>
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
</if>
<if test="srchSubsvcGnrNm != null and srchSubsvcGnrNm != ''">
<if test='srchSubsvcGnrNm != null and srchSubsvcGnrNm != ""'>
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
</if>
) MAIN
@@ -57,32 +57,32 @@
]]>
</if>
<choose>
<when test="sortDv == 'subsvcGnrAsc'">
<when test='sortDv == "subsvcGnrAsc"'>
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
</when>
<when test="sortDv == 'subsvcGnrDesc'">
<when test='sortDv == "subsvcGnrDesc"'>
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
</when>
<when test="sortDv == 'mbrAsc'">
<when test='sortDv == "mbrAsc"'>
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
</when>
<when test="sortDv == 'mbrDesc'">
<when test='sortDv == "mbrDesc"'>
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
</when>
<when test="sortDv == 'ordrAsc'">
<when test='sortDv == "ordrAsc"'>
ORDER BY ORDR_INNB ASC /*주문번호순*/
</when>
<when test="sortDv == 'ordrDesc'">
<when test='sortDv == "ordrDesc"'>
ORDER BY ORDR_INNB DESC /*주문번호순*/
</when>
<when test="sortDv == 'lastPrcsDtAsc'">
<when test='sortDv == "lastPrcsDtAsc"'>
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
</when>
<when test="sortDv == 'lastPrcsDtDesc'">
<when test='sortDv == "lastPrcsDtDesc"'>
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
</when>
<otherwise>
ORDER BY GS.SUBSVC_NM ASC, GS.SUBSVC_GNR ASC
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC
</otherwise>
</choose>
) PV
@@ -235,6 +235,106 @@
WHERE GS.SOPMAL_CD = MAIN.SOPMAL_CD
AND GS.SUBSVC_INNB = MAIN.SUBSVC_INNB
</update>
<!--구독서비스 상품준비 관리 목록-->
<select id="selectBOSubsvcOrderMappedList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
SELECT *
FROM (
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
, COUNT(*) OVER() AS TOT_CNT
, MAIN.*
FROM (
SELECT ROW_NUMBER() OVER(PARTITION BY GO.ORDR_INNB ORDER BY GOI.ORDR_GOODS_INNB ASC, GOIO.ORDR_GOODS_OPTN_INNB ASC) AS CURT_PROCS_ODR /*차수*/
, GO.ORDR_INNB /*주문번호*/
, GOI.ORDR_GOODS_INNB
, GOIO.ORDR_GOODS_OPTN_INNB /*일괄처리 대상 주문상품옵션고유번호*/
, GOIO.ORDR_DLVY_INNB
, GS.SUBSVC_NM
, GS.SUBSVC_GNR
, GS.SUBSVC_GNR_NM
, GM.MBR_NM /*회원명*/
, GM.MBR_ID /*회원ID*/
, GM.MBR_DV_CD /*회원구분코드*/
, GM.MBR_INNB /*회원고유번호*/
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE /*회원등급*/
, MAX(GOIO.UPDT_DT) OVER(PARTITION BY GO.ORDR_INNB) AS LAST_PRCS_DT/*최종처리일*/
, GOIO.ORDR_STTUS_CD
, GOI.GOODS_IMG_COURS /*상품이미지*/
, GOI.GOODS_NM /*상품명*/
, GOIO.OPTN_NM_1 /*상품옵션명*/
, GOIO.OPTN_VAL_1 /*상품옵션값*/
, GOIO.UPDT_DT /*처리일자*/
FROM GC_ORDER GO
JOIN GC_SUBSVC GS ON GS.SOPMAL_CD = GO.SOPMAL_CD AND GS.SUBSVC_INNB = GO.SUBSVC_INNB
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
JOIN GC_ORDER_ITEM GOI ON GO.SOPMAL_CD =GOI.SOPMAL_CD AND GO.ORDR_INNB = GOI.ORDR_INNB
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
WHERE GO.USE_AT = 'Y'
AND GO.SUBSVC_AT = 'Y'
AND GO.SOPMAL_CD = #{sopmalCd}
<if test='srchSelSubsvcNm != null and srchSelSubsvcNm != ""'>
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
</if>
<if test='srchSelSubsvcGnr != null and srchSelSubsvcGnr != ""'>
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
</if>
<if test='srchSubsvcNm != null and srchSubsvcNm != ""'>
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
</if>
<if test='srchSubsvcGnrNm != null and srchSubsvcGnrNm != ""'>
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
</if>
<if test='srchOrdrInnb != null and srchOrdrInnb != ""'>
AND GO.ORDR_INNB = #{srchOrdrInnb} /*주문번호*/
</if>
<if test='srchMbrNm != null and srchMbrNm != ""'>
AND GM.MBR_NM LIKE CONCAT('%',#{srchMbrNm},'%') /*주문자명*/
</if>
<if test='srchMbrId != null and srchMbrId != ""'>
AND GM.MBR_ID LIKE CONCAT('%',#{srchMbrId},'%') /*주문자id*/
</if>
) MAIN
WHERE (@ROWNUM:=0)=0
AND MAIN.ORDR_STTUS_CD = '35'
<if test='srchCurMonExclude!= null and srchCurMonExclude == "Y"'>
<![CDATA[
AND MAIN.LAST_PRCS_DT < CONCAT(DATE_FORMAT(NOW(),'%Y-%m'),'-01') /*당월 처리자 제외*/
]]>
</if>
<choose>
<when test='sortDv == "subsvcGnrAsc"'>
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
</when>
<when test='sortDv == "subsvcGnrDesc"'>
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
</when>
<when test='sortDv == "mbrAsc"'>
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
</when>
<when test='sortDv == "mbrDesc"'>
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
</when>
<when test='sortDv == "ordrAsc"'>
ORDER BY ORDR_INNB ASC /*주문번호순*/
</when>
<when test='sortDv == "ordrDesc"'>
ORDER BY ORDR_INNB DESC /*주문번호순*/
</when>
<when test='sortDv == "lastPrcsDtAsc"'>
ORDER BY UPDT_DT ASC /*처리일순*/
</when>
<when test='sortDv == "lastPrcsDtDesc"'>
ORDER BY UPDT_DT ASC /*처리일순*/
</when>
<otherwise>
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC
</otherwise>
</choose>
) PV
WHERE 1=1
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
</select>
</mapper>