|
@@ -534,28 +534,28 @@
|
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
)
|
|
)
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
)
|
|
)
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchGoodsNum"'>
|
|
<when test='search != null and search == "searchGoodsNum"'>
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.GOODS_NUM) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.GOODS_NUM) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
)
|
|
)
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchSupplyGoodsCd"'>
|
|
<when test='search != null and search == "searchSupplyGoodsCd"'>
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.SUPPLY_GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.SUPPLY_GOODS_CD) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
)
|
|
)
|
|
|
</when>
|
|
</when>
|
|
@@ -571,7 +571,7 @@
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="goodsCd != null and goodsCd != ''">
|
|
<if test="goodsCd != null and goodsCd != ''">
|
|
|
- AND UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{goodsCd}),'%')
|
|
|
|
|
|
|
+ AND UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{goodsCd}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="arrGoodsCd != null and arrGoodsCd.length>0">
|
|
<if test="arrGoodsCd != null and arrGoodsCd.length>0">
|
|
|
AND UPPER(G.GOODS_CD) IN
|
|
AND UPPER(G.GOODS_CD) IN
|
|
@@ -580,7 +580,7 @@
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="goodsNm != null and goodsNm != ''">
|
|
<if test="goodsNm != null and goodsNm != ''">
|
|
|
- AND UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{goodsNm}),'%')
|
|
|
|
|
|
|
+ AND UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{goodsNm}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="goodsType != null and goodsType != ''">
|
|
<if test="goodsType != null and goodsType != ''">
|
|
|
AND G.GOODS_TYPE = #{goodsType}
|
|
AND G.GOODS_TYPE = #{goodsType}
|
|
@@ -1988,7 +1988,7 @@
|
|
|
AND GR.APPLY_EDDT >= NOW()
|
|
AND GR.APPLY_EDDT >= NOW()
|
|
|
</if>
|
|
</if>
|
|
|
<if test="goodsTnmRes != null and goodsTnmRes != ''">
|
|
<if test="goodsTnmRes != null and goodsTnmRes != ''">
|
|
|
- AND UPPER(GR.GOODS_TNM) LIKE CONCAT('%',UPPER(#{goodsTnmRes}),'%')
|
|
|
|
|
|
|
+ AND UPPER(GR.GOODS_TNM) LIKE CONCAT(UPPER(#{goodsTnmRes}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="searchGb != null and searchGb =='EXCEL'">
|
|
<if test="searchGb != null and searchGb =='EXCEL'">
|
|
@@ -2063,7 +2063,7 @@
|
|
|
AND GR.APPLY_EDDT >= NOW()
|
|
AND GR.APPLY_EDDT >= NOW()
|
|
|
</if>
|
|
</if>
|
|
|
<if test="goodsTnmRes != null and goodsTnmRes != ''">
|
|
<if test="goodsTnmRes != null and goodsTnmRes != ''">
|
|
|
- AND UPPER(GR.GOODS_TNM) LIKE CONCAT('%',UPPER(#{goodsTnmRes}),'%')
|
|
|
|
|
|
|
+ AND UPPER(GR.GOODS_TNM) LIKE CONCAT(UPPER(#{goodsTnmRes}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="searchGb != null and searchGb =='EXCEL'">
|
|
<if test="searchGb != null and searchGb =='EXCEL'">
|
|
@@ -2572,7 +2572,7 @@
|
|
|
AND A.USE_YN = #{useYn}
|
|
AND A.USE_YN = #{useYn}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="noticeTitle != null and noticeTitle !=''">
|
|
<if test="noticeTitle != null and noticeTitle !=''">
|
|
|
- AND LOWER(A.NOTICE_TITLE) LIKE CONCAT('%',LOWER(#{noticeTitle}),'%')
|
|
|
|
|
|
|
+ AND LOWER(A.NOTICE_TITLE) LIKE CONCAT(LOWER(#{noticeTitle}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test='conditionList != null and conditionList.length>0'>
|
|
<if test='conditionList != null and conditionList.length>0'>
|
|
|
AND A.NOTICE_SQ IN (
|
|
AND A.NOTICE_SQ IN (
|
|
@@ -2586,22 +2586,22 @@
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchGoodsNum"'>
|
|
<when test='search != null and search == "searchGoodsNum"'>
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.GOODS_NUM) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.GOODS_NUM) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchSupplyGoodsCd"'>
|
|
<when test='search != null and search == "searchSupplyGoodsCd"'>
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.SUPPLY_GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.SUPPLY_GOODS_CD) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</when>
|
|
</when>
|
|
|
</choose>
|
|
</choose>
|
|
@@ -2921,9 +2921,9 @@
|
|
|
</if>
|
|
</if>
|
|
|
<if test='brandEnm != null and brandEnm != "" '>
|
|
<if test='brandEnm != null and brandEnm != "" '>
|
|
|
AND (
|
|
AND (
|
|
|
- D.BRAND_ENM LIKE #{brandEnm}||'%'
|
|
|
|
|
|
|
+ D.BRAND_ENM LIKE CONCAT(#{brandEnm},'%')
|
|
|
OR
|
|
OR
|
|
|
- D.BRAND_KNM LIKE #{brandEnm}||'%'
|
|
|
|
|
|
|
+ D.BRAND_KNM LIKE CONCAT(#{brandEnm},'%')
|
|
|
)
|
|
)
|
|
|
</if>
|
|
</if>
|
|
|
<if test='stDate != null and stDate != "" '>
|
|
<if test='stDate != null and stDate != "" '>
|
|
@@ -2969,7 +2969,7 @@
|
|
|
#{videoSq}
|
|
#{videoSq}
|
|
|
, #{goodsCd}
|
|
, #{goodsCd}
|
|
|
, #{videoGb}
|
|
, #{videoGb}
|
|
|
- , #{kmcKey}
|
|
|
|
|
|
|
+ , CASE WHEN LENGTH(#{kmcKey}) = 0 THEN NULL ELSE #{kmcKey} END
|
|
|
, #{kufKey}
|
|
, #{kufKey}
|
|
|
, #{dispYn}
|
|
, #{dispYn}
|
|
|
, #{regNo}
|
|
, #{regNo}
|
|
@@ -2989,7 +2989,7 @@
|
|
|
UPDATE TB_GOODS_VIDEO SET
|
|
UPDATE TB_GOODS_VIDEO SET
|
|
|
DISP_YN = #{dispYn}
|
|
DISP_YN = #{dispYn}
|
|
|
, VIDEO_GB = #{videoGb}
|
|
, VIDEO_GB = #{videoGb}
|
|
|
- , KMC_KEY = #{kmcKey}
|
|
|
|
|
|
|
+ , KMC_KEY = CASE WHEN LENGTH(#{kmcKey}) = 0 THEN NULL ELSE #{kmcKey} END
|
|
|
, UPD_NO = #{updNo}
|
|
, UPD_NO = #{updNo}
|
|
|
, UPD_DT = NOW()
|
|
, UPD_DT = NOW()
|
|
|
WHERE VIDEO_SQ = #{videoSq}
|
|
WHERE VIDEO_SQ = #{videoSq}
|
|
@@ -3062,7 +3062,7 @@
|
|
|
INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
|
|
INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
|
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
|
<if test="goodsCd != null and goodsCd != ''">
|
|
<if test="goodsCd != null and goodsCd != ''">
|
|
|
- AND UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{goodsCd}),'%')
|
|
|
|
|
|
|
+ AND UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{goodsCd}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="supplyCompCd != null and supplyCompCd != ''">
|
|
<if test="supplyCompCd != null and supplyCompCd != ''">
|
|
|
AND G.SUPPLY_COMP_CD = #{supplyCompCd}
|
|
AND G.SUPPLY_COMP_CD = #{supplyCompCd}
|
|
@@ -3399,7 +3399,7 @@
|
|
|
AND A.USE_YN = #{useYn}
|
|
AND A.USE_YN = #{useYn}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="adKeyword != null and adKeyword !=''">
|
|
<if test="adKeyword != null and adKeyword !=''">
|
|
|
- AND LOWER(A.AD_KEYWORD) LIKE CONCAT('%',LOWER(#{adKeyword}),'%')
|
|
|
|
|
|
|
+ AND LOWER(A.AD_KEYWORD) LIKE CONCAT(LOWER(#{adKeyword}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test='goodsCd != null and goodsCd != "" '>
|
|
<if test='goodsCd != null and goodsCd != "" '>
|
|
|
AND A.AD_KEYWORD_SQ IN (
|
|
AND A.AD_KEYWORD_SQ IN (
|
|
@@ -3520,10 +3520,10 @@
|
|
|
<if test='condition != null and condition != "" '>
|
|
<if test='condition != null and condition != "" '>
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
|
- AND UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{condition}),'%')
|
|
|
|
|
|
|
+ AND UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{condition}),'%')
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
|
- AND UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{condition}),'%')
|
|
|
|
|
|
|
+ AND UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{condition}),'%')
|
|
|
</when>
|
|
</when>
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|
|
@@ -3609,10 +3609,10 @@
|
|
|
<if test='condition != null and condition != "" '>
|
|
<if test='condition != null and condition != "" '>
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
|
- AND UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{condition}),'%')
|
|
|
|
|
|
|
+ AND UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{condition}),'%')
|
|
|
</when>
|
|
</when>
|
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
|
- AND UPPER(G.GOODS_CD) LIKE CONCAT('%',UPPER(#{condition}),'%')
|
|
|
|
|
|
|
+ AND UPPER(G.GOODS_CD) LIKE CONCAT(UPPER(#{condition}),'%')
|
|
|
</when>
|
|
</when>
|
|
|
</choose>
|
|
</choose>
|
|
|
</if>
|
|
</if>
|
|
@@ -3743,7 +3743,7 @@
|
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
<when test='search != null and search == "searchGoodsNm"'>
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
<foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- UPPER(G.GOODS_NM) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(G.GOODS_NM) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
)
|
|
)
|
|
|
</when>
|
|
</when>
|
|
@@ -3795,9 +3795,9 @@
|
|
|
AND B.SELF_YN = 'Y'
|
|
AND B.SELF_YN = 'Y'
|
|
|
AND B.USE_YN = 'Y'
|
|
AND B.USE_YN = 'Y'
|
|
|
INNER JOIN TB_BRAND_SUPPLY S ON B.BRAND_CD = S.BRAND_CD
|
|
INNER JOIN TB_BRAND_SUPPLY S ON B.BRAND_CD = S.BRAND_CD
|
|
|
- WHERE GOODS_REG_GB IS NULL /* 온라인 미등록 상품 */
|
|
|
|
|
|
|
+ WHERE NULLIF(GOODS_REG_GB,'') IS NULL /* 온라인 미등록 상품 */
|
|
|
<if test="modelNo != null and modelNo != ''">
|
|
<if test="modelNo != null and modelNo != ''">
|
|
|
- AND UPPER(A.MODEL_NO) LIKE CONCAT('%',UPPER(#{modelNo}),'%')
|
|
|
|
|
|
|
+ AND UPPER(A.MODEL_NO) LIKE CONCAT(UPPER(#{modelNo}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="stDate != null and stDate != ''">
|
|
<if test="stDate != null and stDate != ''">
|
|
|
AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
|
|
AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
|
|
@@ -3847,9 +3847,9 @@
|
|
|
AND B.SELF_YN = 'Y'
|
|
AND B.SELF_YN = 'Y'
|
|
|
AND B.USE_YN = 'Y'
|
|
AND B.USE_YN = 'Y'
|
|
|
INNER JOIN TB_BRAND_SUPPLY S ON B.BRAND_CD = S.BRAND_CD
|
|
INNER JOIN TB_BRAND_SUPPLY S ON B.BRAND_CD = S.BRAND_CD
|
|
|
- WHERE GOODS_REG_GB IS NULL /* 온라인 미등록 상품 */
|
|
|
|
|
|
|
+ WHERE NULLIF(GOODS_REG_GB,'') IS NULL /* 온라인 미등록 상품 */
|
|
|
<if test="modelNo != null and modelNo != ''">
|
|
<if test="modelNo != null and modelNo != ''">
|
|
|
- AND UPPER(A.MODEL_NO) LIKE CONCAT('%',UPPER(#{modelNo}),'%')
|
|
|
|
|
|
|
+ AND UPPER(A.MODEL_NO) LIKE CONCAT(UPPER(#{modelNo}),'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="stDate != null and stDate != ''">
|
|
<if test="stDate != null and stDate != ''">
|
|
|
AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
|
|
AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
|
|
@@ -3938,7 +3938,7 @@
|
|
|
<if test="goodsCds != null and goodsCds != ''">
|
|
<if test="goodsCds != null and goodsCds != ''">
|
|
|
AND (
|
|
AND (
|
|
|
<foreach collection="goodsCds" item="item" index="index" separator="or">
|
|
<foreach collection="goodsCds" item="item" index="index" separator="or">
|
|
|
- UPPER(GOODS_CD) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
|
|
|
|
+ UPPER(GOODS_CD) LIKE CONCAT(UPPER(#{item}),'%')
|
|
|
</foreach>
|
|
</foreach>
|
|
|
)
|
|
)
|
|
|
</if>
|
|
</if>
|
|
@@ -4419,11 +4419,11 @@
|
|
|
-- LEFT OUTER JOIN TB_GOODS B ON A.GOODS_CD = B.GOODS_CD
|
|
-- LEFT OUTER JOIN TB_GOODS B ON A.GOODS_CD = B.GOODS_CD
|
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
|
<if test='condition != null and condition != "" '>
|
|
<if test='condition != null and condition != "" '>
|
|
|
- AND (UPPER(A.GOODS_NUM) LIKE CONCAT('%',UPPER(#{condition}),'%')
|
|
|
|
|
|
|
+ AND (UPPER(A.GOODS_NUM) LIKE CONCAT(UPPER(#{condition}),'%')
|
|
|
OR
|
|
OR
|
|
|
- UPPER(A.GOODS_CD) LIKE CONCAT('%',UPPER(#{condition}),'%')
|
|
|
|
|
|
|
+ UPPER(A.GOODS_CD) LIKE CONCAT(UPPER(#{condition}),'%')
|
|
|
OR
|
|
OR
|
|
|
- UPPER(A.SUPPLY_GOODS_CD) LIKE CONCAT('%',UPPER(#{condition}),'%')
|
|
|
|
|
|
|
+ UPPER(A.SUPPLY_GOODS_CD) LIKE CONCAT(UPPER(#{condition}),'%')
|
|
|
)
|
|
)
|
|
|
</if>
|
|
</if>
|
|
|
<if test='regSuccYn != null and regSuccYn != "" '>
|
|
<if test='regSuccYn != null and regSuccYn != "" '>
|