|
|
@@ -242,7 +242,7 @@
|
|
|
LEFT OUTER JOIN TB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
|
|
|
WHERE 1=1
|
|
|
<if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
|
|
|
- <include refid="getGoodsListContion_sql"/>
|
|
|
+ <include refid="getGoodsListCondition_sql"/>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
@@ -351,17 +351,17 @@
|
|
|
LEFT OUTER JOIN TB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
|
|
|
WHERE 1=1
|
|
|
<if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
|
|
|
- <include refid="getGoodsListContion_sql"/>
|
|
|
+ <include refid="getGoodsListCondition_sql"/>
|
|
|
ORDER BY G.REG_DT DESC, G.GOODS_CD
|
|
|
</if>
|
|
|
<if test="searchGb != null and searchGb =='EXCEL'">
|
|
|
ORDER BY SD.TMP_DISP_ORD
|
|
|
</if>
|
|
|
- <include refid="getListPagingContion_sql"/>
|
|
|
+ <include refid="getListPagingCondition_sql"/>
|
|
|
</select>
|
|
|
|
|
|
<!-- 상품 목록 조건 정보 -->
|
|
|
- <sql id="getGoodsListContion_sql">
|
|
|
+ <sql id="getGoodsListCondition_sql">
|
|
|
<if test='conditionList != null and conditionList.length>0'>
|
|
|
<choose>
|
|
|
<when test='search != null and search == "searchGoodsCd"'>
|
|
|
@@ -574,7 +574,7 @@
|
|
|
</sql>
|
|
|
|
|
|
<!-- 목록 페이징 정보 -->
|
|
|
- <sql id="getListPagingContion_sql">
|
|
|
+ <sql id="getListPagingCondition_sql">
|
|
|
<choose>
|
|
|
<when test="pageable != null">
|
|
|
) A
|
|
|
@@ -673,7 +673,7 @@
|
|
|
LEFT OUTER JOIN TB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD
|
|
|
WHERE 1=1
|
|
|
<if test="searchGb == null or searchGb =='BASIC' or searchGb =='EXTEND' or searchGb =='MASTER'" >
|
|
|
- <include refid="getGoodsListContion_sql"/>
|
|
|
+ <include refid="getGoodsListCondition_sql"/>
|
|
|
ORDER BY G.REG_DT DESC
|
|
|
</if>
|
|
|
<if test="searchGb == null or searchGb =='EXCEL'">
|
|
|
@@ -1604,119 +1604,49 @@
|
|
|
<select id="getGoodsTitleReserveCount" parameterType="GoodsSearch" resultType="int">
|
|
|
/* TsaGoods.getGoodsTitleReserveCount */
|
|
|
SELECT COUNT(*) AS TOTCNT
|
|
|
- FROM TB_BRAND B
|
|
|
- , TB_SUPPLY_COMPANY S
|
|
|
- <if test="searchGb == null or searchGb =='BASIC'">
|
|
|
- , TB_GOODS G
|
|
|
- <if test="siteCd != null and siteCd != ''">
|
|
|
- , (SELECT DISTINCT B.GOODS_CD, A.SITE_CD
|
|
|
- FROM TB_CATEGORY_4SRCH A
|
|
|
- , TB_CATEGORY_GOODS B
|
|
|
- WHERE A.LEAF_CATE_CD = B.CATE_CD
|
|
|
- AND A.CATE_GB = B.CATE_GB
|
|
|
- AND A.SITE_CD IN
|
|
|
- <foreach collection="siteCd" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- ) D
|
|
|
- </if>
|
|
|
- </if>
|
|
|
- <if test="searchGb != null and searchGb =='EXCEL'">
|
|
|
- , (SELECT P.*
|
|
|
- , TMP_DISP_ORD
|
|
|
- FROM TB_GOODS P
|
|
|
- , (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
|
|
|
- FROM TB_SEARCH_DATA
|
|
|
- WHERE REG_ID = #{regId}
|
|
|
- GROUP BY SEARCH_CD) T
|
|
|
- WHERE P.GOODS_CD LIKE T.SEARCH_CD||'%'
|
|
|
- OR P.SUPPLY_GOODS_CD LIKE T.SEARCH_CD||'%'
|
|
|
- <if test="mdId != null and mdId != ''">
|
|
|
- AND P.BRAND_CD IN (
|
|
|
- SELECT DISTINCT BRAND_CD
|
|
|
- FROM TB_BRAND_MD
|
|
|
- WHERE MD_ID = #{mdId}
|
|
|
- )
|
|
|
- </if>
|
|
|
- ) G
|
|
|
- </if>
|
|
|
- , TB_GOODS_TNM_RES GR
|
|
|
- WHERE 1=1
|
|
|
- AND G.BRAND_CD = B.BRAND_CD
|
|
|
- AND G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
|
|
|
- AND G.GOODS_CD = GR.GOODS_CD
|
|
|
- <if test="searchGb == null or searchGb =='BASIC'">
|
|
|
- <if test="siteCd != null and siteCd != ''">
|
|
|
- AND G.GOODS_CD = D.GOODS_CD
|
|
|
- </if>
|
|
|
+ FROM TB_GOODS G
|
|
|
+ INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
|
|
|
+ INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
|
|
|
+ INNER JOIN TB_GOODS_TNM_RES GR ON G.GOODS_CD = GR.GOODS_CD
|
|
|
+ <if test="searchGb == null or searchGb =='BASIC'" >
|
|
|
<if test="applyStdt != null and applyStdt != ''">
|
|
|
- AND GR.APPLY_EDDT >= TO_DATE(#{applyStdt}, 'YYYY-MM-DD')
|
|
|
+ AND GR.APPLY_EDDT >= DATE_FORMAT(#{applyStdt}, '%Y-%m-%d %H:%i:%S')
|
|
|
</if>
|
|
|
<if test="applyEddt != null and applyEddt != ''">
|
|
|
- <![CDATA[
|
|
|
- AND GR.APPLY_STDT <= TO_DATE(#{applyEddt}, 'YYYY-MM-DD') + 0.99999
|
|
|
- ]]>
|
|
|
+ <![CDATA[
|
|
|
+ AND GR.APPLY_STDT < DATE_FORMAT(DATE_ADD(#{applyEddt}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
|
|
|
+ ]]>
|
|
|
</if>
|
|
|
<if test='beforSkipFlag != null and beforSkipFlag == "Y"'>
|
|
|
- AND SYSDATE <![CDATA[<=]]> GR.APPLY_EDDT
|
|
|
- </if>
|
|
|
- <if test='goodsTnm != null and goodsTnm != ""'>
|
|
|
- AND UPPER(GR.GOODS_TNM) LIKE UPPER('%'|| #{goodsTnm} || '%')
|
|
|
- </if>
|
|
|
- <if test="supplyCompCd != null and supplyCompCd != ''">
|
|
|
- AND G.SUPPLY_COMP_CD = #{supplyCompCd}
|
|
|
- </if>
|
|
|
- <if test="brandCd != null and brandCd != ''">
|
|
|
- AND G.BRAND_CD = UPPER(#{brandCd})
|
|
|
- </if>
|
|
|
- <if test="multiBrand != null and multiBrand != ''">
|
|
|
- AND G.BRAND_CD IN
|
|
|
- <foreach collection="multiBrand" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test='conditionList != null and conditionList.length>0'>
|
|
|
- <choose>
|
|
|
- <when test='search != null and search == "searchGoodsCd"'>
|
|
|
- AND (
|
|
|
- <foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- REGEXP_LIKE(UPPER(G.GOODS_CD), UPPER(#{item}))
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </when>
|
|
|
- <when test='search != null and search == "searchGoodsNum"'>
|
|
|
- AND (
|
|
|
- <foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- REGEXP_LIKE(UPPER(G.GOODS_NUM), UPPER(#{item}))
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </when>
|
|
|
- <when test='search != null and search == "searchSupplyGoodsCd"'>
|
|
|
- AND (
|
|
|
- <foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- REGEXP_LIKE(UPPER(G.SUPPLY_GOODS_CD), UPPER(#{item}))
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
- <if test="multiStyleYear != null and multiStyleYear != ''">
|
|
|
- AND G.STYLE_YEAR IN (SELECT CD_NM
|
|
|
- FROM TB_COMMON_CODE
|
|
|
- WHERE CD_GB='G023'
|
|
|
- AND CD IN
|
|
|
- <foreach collection="multiStyleYear" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </if>
|
|
|
- <if test="multiSeasonCd != null and multiSeasonCd != ''">
|
|
|
- AND G.SEASON_CD IN
|
|
|
- <foreach collection="multiSeasonCd" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
+ AND GR.APPLY_EDDT >= NOW()
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="searchGb != null and searchGb =='EXCEL'">
|
|
|
+ INNER JOIN (
|
|
|
+ SELECT SEARCH_CD
|
|
|
+ , TMP_DISP_ORD
|
|
|
+ FROM (
|
|
|
+ SELECT SEARCH_CD
|
|
|
+ , MIN(DISP_ORD) AS TMP_DISP_ORD
|
|
|
+ FROM TB_SEARCH_DATA
|
|
|
+ WHERE REG_NO = #{regNo}
|
|
|
+ GROUP BY SEARCH_CD) T
|
|
|
+ ) SD
|
|
|
+ ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
|
|
|
+ OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%'))
|
|
|
+ <if test="mdId != null and mdId != ''">
|
|
|
+ AND G.BRAND_CD IN (
|
|
|
+ SELECT DISTINCT BRAND_CD
|
|
|
+ FROM TB_BRAND_MD
|
|
|
+ WHERE MD_ID = #{mdId}
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ WHERE 1=1
|
|
|
+ <if test="searchGb == null or searchGb =='BASIC'" >
|
|
|
+ <include refid="getGoodsListCondition_sql"/>
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!-- 상품 타이틀 예약관리 목록 -->
|
|
|
@@ -1724,7 +1654,7 @@
|
|
|
/* TsaGoods.getGoodsTitleReserveList */
|
|
|
SELECT Z.*
|
|
|
FROM (
|
|
|
- SELECT A.*, ROWNUM RNUM FROM (
|
|
|
+ SELECT A.*, @rownum := @rownum + 1 AS RNUM FROM (
|
|
|
SELECT
|
|
|
G.GOODS_CD
|
|
|
, B.BRAND_ENM
|
|
|
@@ -1738,130 +1668,68 @@
|
|
|
, G.GOODS_STAT
|
|
|
, GR.GOODS_TNM_RES_SQ
|
|
|
, GR.GOODS_TNM AS REG_GOODS_TNM
|
|
|
- , TO_CHAR(GR.APPLY_STDT,'YYYYMMDDHH24MISS') AS APPLY_STDT
|
|
|
- , TO_CHAR(GR.APPLY_EDDT,'YYYYMMDDHH24MISS') AS APPLY_EDDT
|
|
|
- , GR.REG_ID
|
|
|
- , TO_CHAR(GR.REG_DT,'YYYYMMDDHH24MISS') AS REG_DT
|
|
|
- FROM TB_BRAND B
|
|
|
- , TB_SUPPLY_COMPANY S
|
|
|
- <if test="searchGb == null or searchGb =='BASIC'">
|
|
|
- , TB_GOODS G
|
|
|
- <if test="siteCd != null and siteCd != ''">
|
|
|
- , (SELECT DISTINCT B.GOODS_CD, A.SITE_CD
|
|
|
- FROM TB_CATEGORY_4SRCH A
|
|
|
- , TB_CATEGORY_GOODS B
|
|
|
- WHERE A.LEAF_CATE_CD = B.CATE_CD
|
|
|
- AND A.CATE_GB = B.CATE_GB
|
|
|
- AND A.SITE_CD IN
|
|
|
- <foreach collection="siteCd" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- ) D
|
|
|
- </if>
|
|
|
- </if>
|
|
|
- <if test="searchGb != null and searchGb =='EXCEL'">
|
|
|
- , (SELECT P.*
|
|
|
- , TMP_DISP_ORD
|
|
|
- FROM TB_GOODS P
|
|
|
- , (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
|
|
|
- FROM TB_SEARCH_DATA
|
|
|
- WHERE REG_ID = #{regId}
|
|
|
- GROUP BY SEARCH_CD) T
|
|
|
- WHERE P.GOODS_CD LIKE T.SEARCH_CD||'%'
|
|
|
- OR P.SUPPLY_GOODS_CD LIKE T.SEARCH_CD||'%'
|
|
|
- <if test="mdId != null and mdId != ''">
|
|
|
- AND P.BRAND_CD IN (
|
|
|
- SELECT DISTINCT BRAND_CD
|
|
|
- FROM TB_BRAND_MD
|
|
|
- WHERE MD_ID = #{mdId}
|
|
|
- )
|
|
|
- </if>
|
|
|
- ) G
|
|
|
- </if>
|
|
|
- , TB_GOODS_TNM_RES GR
|
|
|
- WHERE 1=1
|
|
|
- AND G.BRAND_CD = B.BRAND_CD
|
|
|
- AND G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
|
|
|
- AND G.GOODS_CD = GR.GOODS_CD
|
|
|
- <if test="searchGb == null or searchGb =='BASIC'">
|
|
|
- <if test="siteCd != null and siteCd != ''">
|
|
|
- AND G.GOODS_CD = D.GOODS_CD
|
|
|
- </if>
|
|
|
+ , DATE_FORMAT(GR.APPLY_STDT,'%Y%m%d%H%i%S') AS APPLY_STDT
|
|
|
+ , DATE_FORMAT(GR.APPLY_EDDT,'%Y%m%d%H%i%S') AS APPLY_EDDT
|
|
|
+ , GR.REG_NO
|
|
|
+ , FN_GET_USER_NM(GR.REG_NO) AS REG_NM
|
|
|
+ , DATE_FORMAT(GR.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
|
|
|
+ FROM TB_GOODS G
|
|
|
+ JOIN ( SELECT @rownum := 0) R
|
|
|
+ INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
|
|
|
+ INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
|
|
|
+ INNER JOIN TB_GOODS_TNM_RES GR ON G.GOODS_CD = GR.GOODS_CD
|
|
|
+ <if test="searchGb == null or searchGb =='BASIC'" >
|
|
|
<if test="applyStdt != null and applyStdt != ''">
|
|
|
- AND GR.APPLY_EDDT >= TO_DATE(#{applyStdt}, 'YYYY-MM-DD')
|
|
|
+ AND GR.APPLY_EDDT >= DATE_FORMAT(#{applyStdt}, '%Y-%m-%d %H:%i:%S')
|
|
|
</if>
|
|
|
<if test="applyEddt != null and applyEddt != ''">
|
|
|
<![CDATA[
|
|
|
- AND GR.APPLY_STDT <= TO_DATE(#{applyEddt}, 'YYYY-MM-DD') + 0.99999
|
|
|
+ AND GR.APPLY_STDT < DATE_FORMAT(DATE_ADD(#{applyEddt}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
|
|
|
]]>
|
|
|
</if>
|
|
|
<if test='beforSkipFlag != null and beforSkipFlag == "Y"'>
|
|
|
- AND SYSDATE <![CDATA[<=]]> GR.APPLY_EDDT(+)
|
|
|
- </if>
|
|
|
- <if test='goodsTnm != null and goodsTnm != ""'>
|
|
|
- AND UPPER(GR.GOODS_TNM) LIKE UPPER('%'|| #{goodsTnm} || '%')
|
|
|
+ AND GR.APPLY_EDDT >= NOW()
|
|
|
</if>
|
|
|
- <if test="supplyCompCd != null and supplyCompCd != ''">
|
|
|
- AND G.SUPPLY_COMP_CD = #{supplyCompCd}
|
|
|
- </if>
|
|
|
- <if test="multiBrand != null and multiBrand != ''">
|
|
|
- AND G.BRAND_CD IN
|
|
|
- <foreach collection="multiBrand" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test='conditionList != null and conditionList.length>0'>
|
|
|
- <choose>
|
|
|
- <when test='search != null and search == "searchGoodsCd"'>
|
|
|
- AND (
|
|
|
- <foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- REGEXP_LIKE(UPPER(G.GOODS_CD), UPPER(#{item}))
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </when>
|
|
|
- <when test='search != null and search == "searchGoodsNum"'>
|
|
|
- AND (
|
|
|
- <foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- REGEXP_LIKE(UPPER(G.GOODS_NUM), UPPER(#{item}))
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </when>
|
|
|
- <when test='search != null and search == "searchSupplyGoodsCd"'>
|
|
|
- AND (
|
|
|
- <foreach collection="conditionList" item="item" index="index" separator="or">
|
|
|
- REGEXP_LIKE(UPPER(G.SUPPLY_GOODS_CD), UPPER(#{item}))
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
- <if test="multiStyleYear != null and multiStyleYear != ''">
|
|
|
- AND G.STYLE_YEAR IN (SELECT CD_NM
|
|
|
- FROM TB_COMMON_CODE
|
|
|
- WHERE CD_GB='G023'
|
|
|
- AND CD IN
|
|
|
- <foreach collection="multiStyleYear" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- )
|
|
|
- </if>
|
|
|
- <if test="multiSeasonCd != null and multiSeasonCd != ''">
|
|
|
- AND G.SEASON_CD IN
|
|
|
- <foreach collection="multiSeasonCd" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- ORDER BY GR.APPLY_STDT DESC, GR.APPLY_EDDT DESC, G.GOODS_CD, GR.GOODS_TNM_RES_SQ
|
|
|
</if>
|
|
|
- <include refid="getListPagingContion_sql"/>
|
|
|
+ <if test="searchGb != null and searchGb =='EXCEL'">
|
|
|
+ INNER JOIN (
|
|
|
+ SELECT SEARCH_CD
|
|
|
+ , TMP_DISP_ORD
|
|
|
+ FROM (
|
|
|
+ SELECT SEARCH_CD
|
|
|
+ , MIN(DISP_ORD) AS TMP_DISP_ORD
|
|
|
+ FROM TB_SEARCH_DATA
|
|
|
+ WHERE REG_NO = #{regNo}
|
|
|
+ GROUP BY SEARCH_CD) T
|
|
|
+ ) SD
|
|
|
+ ON ( (G.GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%')
|
|
|
+ OR G.SUPPLY_GOODS_CD LIKE CONCAT(SD.SEARCH_CD,'%'))
|
|
|
+ <if test="mdId != null and mdId != ''">
|
|
|
+ AND G.BRAND_CD IN (
|
|
|
+ SELECT DISTINCT BRAND_CD
|
|
|
+ FROM TB_BRAND_MD
|
|
|
+ WHERE MD_ID = #{mdId}
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ WHERE 1=1
|
|
|
+ <if test="searchGb == null or searchGb =='BASIC'" >
|
|
|
+ <include refid="getGoodsListCondition_sql"/>
|
|
|
+ ORDER BY GR.APPLY_STDT DESC, GR.APPLY_EDDT DESC, G.GOODS_CD, GR.GOODS_TNM_RES_SQ
|
|
|
+ </if>
|
|
|
+ <if test="searchGb != null and searchGb =='EXCEL'">
|
|
|
+ ORDER BY SD.TMP_DISP_ORD
|
|
|
+ </if>
|
|
|
+ <include refid="getListPagingCondition_sql"/>
|
|
|
</select>
|
|
|
|
|
|
<!-- 상품 타이틀 예약조회(기간 체크용) -->
|
|
|
<select id="getGoodsTnm" parameterType="GoodsTnmRes" resultType="GoodsTnmRes">
|
|
|
/* TsaGoods.getGoodsTnm */
|
|
|
SELECT GOODS_CD
|
|
|
- , TO_CHAR(APPLY_STDT, 'YYYYMMDDHH24MISS') AS APPLY_STDT
|
|
|
- , TO_CHAR(APPLY_EDDT, 'YYYYMMDDHH24MISS') AS APPLY_EDDT
|
|
|
+ , DATE_FORMAT(APPLY_STDT,'%Y%m%d%H%i%S') AS APPLY_STDT
|
|
|
+ , DATE_FORMAT(APPLY_EDDT, '%Y%m%d%H%i%S') AS APPLY_EDDT
|
|
|
FROM TB_GOODS_TNM_RES
|
|
|
WHERE 1=1
|
|
|
AND GOODS_CD = #{goodsCd}
|
|
|
@@ -1876,21 +1744,21 @@
|
|
|
, GOODS_TNM
|
|
|
, APPLY_STDT
|
|
|
, APPLY_EDDT
|
|
|
- , REG_ID
|
|
|
+ , REG_NO
|
|
|
, REG_DT
|
|
|
- , UPD_ID
|
|
|
+ , UPD_NO
|
|
|
, UPD_DT
|
|
|
)
|
|
|
VALUES(
|
|
|
- SEQ_GOODS_TNM_RES.NEXTVAL
|
|
|
+ NULL
|
|
|
, #{goodsCd}
|
|
|
, #{goodsTnm}
|
|
|
- , TO_DATE(#{applyStdt},'YYYYMMDDHH24MISS')
|
|
|
- , TO_DATE(#{applyEddt},'YYYYMMDDHH24MISS')
|
|
|
- , #{regId}
|
|
|
- , SYSDATE
|
|
|
- , #{updId}
|
|
|
- , SYSDATE
|
|
|
+ , STR_TO_DATE(#{applyStdt},'%Y%m%d%H%i%S')
|
|
|
+ , STR_TO_DATE(#{applyEddt},'%Y%m%d%H%i%S')
|
|
|
+ , #{regNo}
|
|
|
+ , NOW()
|
|
|
+ , #{updNo}
|
|
|
+ , NOW()
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
@@ -1899,15 +1767,15 @@
|
|
|
/* TsaGoods.updateGoodTnm */
|
|
|
UPDATE TB_GOODS
|
|
|
SET GOODS_TNM = #{goodsTnm}
|
|
|
- , UPD_ID = #{updId}
|
|
|
- , UPD_DT = SYSDATE
|
|
|
+ , UPD_NO = #{updNo}
|
|
|
+ , UPD_DT = NOW()
|
|
|
WHERE GOODS_CD = #{goodsCd}
|
|
|
</update >
|
|
|
|
|
|
<!-- 상품 타이틀 예약 삭제 -->
|
|
|
<delete id="deleteGoodTnmRes" parameterType="GoodsTnmRes">
|
|
|
/* TsaGoods.deleteGoodTnmRes */
|
|
|
- DELETE TB_GOODS_TNM_RES
|
|
|
+ DELETE FROM TB_GOODS_TNM_RES
|
|
|
WHERE GOODS_TNM_RES_SQ = #{goodsTnmResSq}
|
|
|
</delete>
|
|
|
|
|
|
@@ -1915,8 +1783,8 @@
|
|
|
<update id="updateGoodTnmInit" parameterType="Goods">
|
|
|
/* TsaGoods.updateGoodTnmInit */
|
|
|
UPDATE TB_GOODS
|
|
|
- SET UPD_ID = #{updId}
|
|
|
- , UPD_DT = SYSDATE
|
|
|
+ SET UPD_NO = #{updNo}
|
|
|
+ , UPD_DT = NOW()
|
|
|
, GOODS_TNM = (SELECT S.GOODS_TNM
|
|
|
FROM (
|
|
|
SELECT GT.GOODS_CD
|
|
|
@@ -1924,7 +1792,7 @@
|
|
|
, RANK() OVER(PARTITION BY GT.GOODS_CD ORDER BY GT.GOODS_TNM_RES_SQ DESC) RANK
|
|
|
FROM TB_GOODS_TNM_RES GT
|
|
|
WHERE GT.APPLYC_YN = 'N'
|
|
|
- AND SYSDATE BETWEEN GT.APPLY_STDT AND GT.APPLY_EDDT
|
|
|
+ AND NOW() BETWEEN GT.APPLY_STDT AND GT.APPLY_EDDT
|
|
|
AND GT.GOODS_CD = #{goodsCd}
|
|
|
) S
|
|
|
WHERE S.RANK = 1
|
|
|
@@ -1944,12 +1812,13 @@
|
|
|
, RANK() OVER(PARTITION BY GT.GOODS_CD ORDER BY GT.GOODS_TNM_RES_SQ DESC) RANK
|
|
|
FROM TB_GOODS_TNM_RES GT
|
|
|
WHERE GT.APPLYC_YN = 'N'
|
|
|
- AND SYSDATE BETWEEN GT.APPLY_STDT AND GT.APPLY_EDDT
|
|
|
+ AND NOW() BETWEEN GT.APPLY_STDT AND GT.APPLY_EDDT
|
|
|
AND GT.GOODS_CD = #{goodsCd}
|
|
|
) S
|
|
|
WHERE S.RANK = 1
|
|
|
) AS GOOD_TNM_INIT
|
|
|
FROM TB_GOODS
|
|
|
WHERE GOODS_CD = #{goodsCd}
|
|
|
- </select >
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|