|
|
@@ -145,11 +145,25 @@
|
|
|
<if test ="siteCd != null and siteCd !=''">
|
|
|
AND SITE_CD = #{siteCd}
|
|
|
</if>
|
|
|
- <if test="planSq != null and planSq != ''">
|
|
|
- AND PLAN_SQ = #{planSq}
|
|
|
- </if>
|
|
|
- <if test="planNm != null and planNm != ''">
|
|
|
- AND PLAN_NM LIKE UPPER('%' || #{planNm} || '%')
|
|
|
+ <if test="condition != null and condition !=''">
|
|
|
+ <if test="conditionList != null and conditionList.length>0">
|
|
|
+ <choose>
|
|
|
+ <when test="search != null and search == 'searchPlanNm'">
|
|
|
+ AND (
|
|
|
+ <foreach collection="conditionList" item="item" open="(" separator="," close=")">
|
|
|
+ UPPER(PLAN_NM) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ <when test="search != null and search == 'searchPlanSq'">
|
|
|
+ AND (
|
|
|
+ <foreach collection="conditionList" item="item" open="(" separator="," close=")">
|
|
|
+ UPPER(PLAN_SQ) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="openYn != null and openYn != ''">
|
|
|
AND OPEN_YN = #{openYn}
|
|
|
@@ -190,11 +204,23 @@
|
|
|
<if test ="siteCd != null and siteCd !=''">
|
|
|
AND SITE_CD = #{siteCd}
|
|
|
</if>
|
|
|
- <if test="planSq != null and planSq != ''">
|
|
|
- AND PLAN_SQ = #{planSq}
|
|
|
- </if>
|
|
|
- <if test="planNm != null and planNm != ''">
|
|
|
- AND PLAN_NM LIKE UPPER('%' || #{planNm} || '%')
|
|
|
+ <if test='condition != null and condition != "" '>
|
|
|
+ <choose>
|
|
|
+ <when test='search != null and search == "searchPlanNm"'>
|
|
|
+ AND (
|
|
|
+ <foreach collection="condition" item="item" index="index" separator="or">
|
|
|
+ UPPER(PLAN_NM) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ <when test='search != null and search == "searchPlanSq"'>
|
|
|
+ AND (
|
|
|
+ <foreach collection="condition" item="item" index="index" separator="or">
|
|
|
+ UPPER(PLAN_SQ) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
</if>
|
|
|
<if test="openYn != null and openYn != ''">
|
|
|
AND OPEN_YN = #{openYn}
|
|
|
@@ -225,6 +251,16 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 기획전 삭제처리 -->
|
|
|
+ <update id="deletePlan" parameterType="Plan">
|
|
|
+ /* TsaPlan.deletePlan */
|
|
|
+ UPDATE TB_PLAN
|
|
|
+ SET UPD_NO = #{updNo}
|
|
|
+ , UPD_DT = now()
|
|
|
+ , DEL_YN = 'Y'
|
|
|
+ WHERE PLAN_SQ = #{planSq}
|
|
|
+ </update>
|
|
|
+
|
|
|
|
|
|
<!-- 기획전 전체 조회 -->
|
|
|
<select id="getPlanAllList" parameterType="Plan" resultType="Plan">
|