Browse Source

마케팅 동의 칼럼 추가

jsshin 5 years ago
parent
commit
49da1185e5
1 changed files with 14 additions and 3 deletions
  1. 14 3
      src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml

+ 14 - 3
src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml

@@ -97,6 +97,8 @@
 		     , EMAIL
 		     , EMAIL_AGREE_YN
 		     , DATE_FORMAT(EMAIL_AGREE_DT, '%Y%m%d%H%i%S') AS EMAIL_AGREE_DT
+		     , MK_AGREE_YN
+		     , DATE_FORMAT(MK_AGREE_DT, '%Y%m%d%H%i%S') AS MK_AGREE_DT
 		     , HOME_ZIPCODE
 		     , HOME_BASE_ADDR
 		     , HOME_DTL_ADDR
@@ -163,6 +165,9 @@
 		<if test="appAgreeYn != null and appAgreeYn != ''">
 		AND   APP_AGREE_YN = #{appAgreeYn}
 		</if>
+		<if test="mkAgreeYn != null and mkAgreeYn != ''">
+		AND   MK_AGREE_YN = #{mkAgreeYn}
+		</if>
 		<if test="stDate != null and edDate != '' and stDate != null and edDate != ''">
 		     <if test="searchDateGb == 'joinDt'">
 		AND   JOIN_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
@@ -191,8 +196,7 @@
 	<update id="updateCustomerInfo" parameterType="Customer">
 		/* TsaCustomer.updateCustomerInfo */
 		UPDATE TB_CUSTOMER
-		<set>
-		      CUST_GB = #{custGb}
+		SET   CUST_GB = #{custGb}
 		    , CUST_GRADE = #{custGrade}
 		    <if test="emailAgreeYn != null and emailAgreeYn != ''">
 		    , EMAIL_AGREE_DT = NOW()
@@ -202,6 +206,14 @@
 		    , SMS_AGREE_DT = NOW()
 		    , SMS_AGREE_YN = #{smsAgreeYn}
 		    </if>
+		    <if test="appAgreeYn != null and appAgreeYn != ''">
+		    , APP_AGREE_DT = NOW()
+		    , APP_AGREE_YN = #{appAgreeYn}
+		    </if>
+		    <if test="mkAgreeYn != null and mkAgreeYn != ''">
+		    , MK_AGREE_DT = NOW()
+		    , MK_AGREE_YN = #{mkAgreeYn}
+		    </if>
 		    <if test="homeZipcode != null and homeZipcode != ''">
 		    , HOME_ZIPCODE = #{homeZipcode}
 		    </if>
@@ -233,7 +245,6 @@
 		    </if>
 		    , UPD_NO = #{updNo}
 		    , UPD_DT = NOW()
-		</set>
 		WHERE CUST_NO = #{custNo}
 	</update>