Просмотр исходного кода

쿠폰테이블 컬럼변경 관련 임시 수정

bin2107 5 лет назад
Родитель
Сommit
78a982b2c2

+ 3 - 3
src/main/java/com/style24/persistence/domain/Coupon.java

@@ -45,8 +45,8 @@ public class Coupon extends TscBaseDomain {
     private String reissuance;				// 쿠폰재발급여부(공통코드G231)
     private String cpnStat;				    // 쿠폰상태(공통코드G232)
     private String endAlimYn;				// 만료알림여부
-    private String firstYn;				    // 첫구매여부 (Y:구매이력이없음 | N:구매이력있음)
-    private String downYn;					// 다운로드가능여부(마이페이지, 상품상세) --> EP쿠폰, 난수쿠폰
+    private String firstOrdYn;				// 첫구매여부 (Y:구매이력이없음 | N:구매이력있음)
+    private String downAblYn;				// 다운로드가능여부(마이페이지, 상품상세) --> EP쿠폰, 난수쿠폰
     private String custJoinStdt;			// 회원가입일자(FROM) 20200101 (신규회원여부의 판단을 가입일자로 설정함)
     private String custJoinEddt;			// 회원가입일자(FROM) 20200101 (신규회원여부의 판단을 가입일자로 설정함)
     private String buyStdt;				    // 회원가입일자(FROM) 20200101 (구매기간일자(FROM) (해당기간에 구매이력이 없으면 다운로드 가능))
@@ -54,7 +54,7 @@ public class Coupon extends TscBaseDomain {
     private int    issueCnt;				// 쿠폰발급개수
     private int    useCnt;					// 쿠폰사용개수
     private String payType;                 // 결제수단
-    private String custJoinYn;              // 신규회원여부
+    private String newCustYn;              // 신규회원여부
     private String afChannel;               // 제휴링크
     private String dcCdGb;                  // 할인코드유형 (공통코드G233)
     private String rdCpnNm;                 // 랜덤쿠폰 사용키 (시리얼명 or 난수)

+ 20 - 41
src/main/java/com/style24/persistence/mybatis/shop/TsaCoupon.xml

@@ -11,7 +11,6 @@
 				SELECT SITE_CD
 					 , CPN_ID
 					 , CPN_NM
-					 , USABLE_CUST_GB
 					 , CPN_TYPE
 					 , DC_WAY
 					 , DC_PVAL
@@ -56,7 +55,6 @@
 		GROUP BY  T.SITE_CD
 				, T.CPN_ID
 				, T.CPN_NM
-				, T.USABLE_CUST_GB
 				, T.CPN_TYPE
 				, T.DC_WAY
 				, T.DC_PVAL
@@ -113,8 +111,6 @@
 		    CPN_NM
 		  , SITE_CD
 		  , AF_LINK_CD
-		  , USABLE_CUST_GB
-		  , USABLE_CUST_GRADE
 		  , CPN_TYPE
 		  , APPLY_SCOPE
 		  , DC_WAY
@@ -142,22 +138,17 @@
 		  , REG_DT
 		  , UPD_NO
 		  , UPD_DT
-		  , FIRST_YN
-		  , DOWN_YN
+		  , FIRST_ORD_YN
+		  , DOWN_ABL_YN
 		  , CUST_JOIN_STDT
 		  , CUST_JOIN_EDDT
 		  , BUY_STDT
 		  , BUY_EDDT
-		  <if test='cpnType != null and cpnType == "G230_20"'>
-		  , PAY_TYPE
-		  </if>
-		  , CUST_JOIN_YN
+		  , NEW_CUST_YN
 		) VALUES (
 		    #{cpnNm}
 		  , #{siteCd}
 		  , #{afLinkCd}
-		  , #{usableCustGb}
-		  , #{usableCustGrade}
 		  , #{cpnType}
 		  , #{applyScope}
 		  , #{dcWay}
@@ -194,38 +185,33 @@
 		  , now()
 		  , #{updNo}
 		  , now()
-		  , #{firstYn}
-		  , #{downYn}
+		  , #{firstOrdYn}
+		  , #{downAblYn}
 		  <choose>
-			  <when test='custJoinYn != null and custJoinYn == "Y"'>
+			  <when test='newCustYn != null and newCustYn == "Y"'>
 		  , DATE_FORMAT(#{custJoinStdt} , '%Y-%m-%d %H:%i:%s')
 		  , DATE_FORMAT(#{custJoinEddt} , '%Y-%m-%d %H:%i:%s')
 			  </when>
-			  <when test='custJoinYn != null and custJoinYn == "N"'>
+			  <when test='newCustYn != null and newCustYn == "N"'>
 		  , null
 		  , null
 			  </when>
 		  </choose>
 		  <choose>
-			  <when test='firstYn != null and firstYn == "Y"'>
+			  <when test='firstOrdYn != null and firstOrdYn == "Y"'>
 		  , DATE_FORMAT(#{buyStdt} , '%Y-%m-%d %H:%i:%s')
 		  , DATE_FORMAT(#{buyEddt} , '%Y-%m-%d %H:%i:%s')
 			  </when>
-			  <when test='firstYn != null and firstYn == "N"'>
+			  <when test='firstOrdYn != null and firstOrdYn == "N"'>
 		  , DATE_FORMAT(#{buyStdt} , '%Y-%m-%d %H:%i:%s')
 		  , DATE_FORMAT(#{buyEddt} , '%Y-%m-%d %H:%i:%s')
 			  </when>
 		  </choose>
-		  <if test='cpnType != null and cpnType == "G230_20"'>
-		  , #{payType}
-		  </if>
-		  , #{custJoinYn}
+		  , #{newCustYn}
 		) ON DUPLICATE KEY UPDATE
 		    CPN_NM = #{cpnNm}
 		  , SITE_CD = #{siteCd}
 		  , AF_LINK_CD = #{afLinkCd}
-		  , USABLE_CUST_GB = #{usableCustGb}
-		  , USABLE_CUST_GRADE = #{usableCustGrade}
 		  , CPN_TYPE = #{cpnType}
 		  , APPLY_SCOPE = #{applyScope}
 		  , DC_WAY = #{dcWay}
@@ -258,32 +244,29 @@
 		  , END_ALIM_YN = #{endAlimYn}
 		  , UPD_NO = #{updNo}
 		  , UPD_DT = now()
-		  , FIRST_YN = #{firstYn}
-		  , DOWN_YN = #{downYn}
+		  , FIRST_ORD_YN = #{firstOrdYn}
+		  , DOWN_ABL_YN = #{downAblYn}
 		<choose>
-			<when test='custJoinYn != null and custJoinYn == "Y"'>
+			<when test='newCustYn != null and newCustYn == "Y"'>
 		  , CUST_JOIN_STDT = DATE_FORMAT(#{custJoinStdt} , '%Y-%m-%d %H:%i:%s')
 		  , CUST_JOIN_EDDT = DATE_FORMAT(#{custJoinEddt} , '%Y-%m-%d %H:%i:%s')
 			</when>
-			<when test='custJoinYn != null and custJoinYn == "N"'>
+			<when test='newCustYn != null and newCustYn == "N"'>
 		  , CUST_JOIN_STDT = null
 		  , CUST_JOIN_EDDT = null
 			</when>
 		</choose>
 		<choose>
-			<when test='firstYn != null and firstYn == "Y"'>
+			<when test='firstOrdYn != null and firstOrdYn == "Y"'>
 		  , BUY_STDT = DATE_FORMAT(#{buyStdt} , '%Y-%m-%d %H:%i:%s')
 		  , BUY_EDDT = DATE_FORMAT(#{buyEddt} , '%Y-%m-%d %H:%i:%s')
 			</when>
-			<when test='firstYn != null and firstYn == "N"'>
+			<when test='firstOrdYn != null and firstOrdYn == "N"'>
 		  , BUY_STDT = null
 		  , BUY_EDDT = null
 			</when>
 		</choose>
-		<if test='cpnType != null and cpnType == "G230_20"'>
-		  , PAY_TYPE = #{payType}
-		</if>
-		  , CUST_JOIN_YN = #{custJoinYn}
+		  , NEW_CUST_YN = #{newCustYn}
 	</insert>
 
 	<!-- 쿠폰조회 목록 -->
@@ -292,7 +275,6 @@
 		SELECT A.CPN_ID                                               /*쿠폰ID*/
 		     , A.CPN_NM                                               /*쿠폰명*/
 		     , A.SITE_CD                                              /*사이트코드(공통코드G000)*/
-		     , A.USABLE_CUST_GB                                       /*사용가능고객구분(공통코드G100)*/
 		     , A.CPN_TYPE                                             /*쿠폰유형(공통코드G230)*/
 		     , A.DC_WAY                                               /*할인방식(공통코드G240)*/
 		     , A.DC_PVAL                                              /*할인값(PC). 할인방식이 금액이면 할인금액, 율이면 할인율*/
@@ -415,8 +397,6 @@
 			 , B.CPN_NM
 			 , B.SITE_CD
 			 , B.AF_LINK_CD
-			 , B.USABLE_CUST_GB
-			 , B.USABLE_CUST_GRADE
 			 , B.CPN_TYPE
 			 , B.APPLY_SCOPE
 			 , B.DC_WAY
@@ -439,15 +419,14 @@
 			 , B.REISSUANCE
 			 , B.CPN_STAT
 			 , B.END_ALIM_YN
-			 , B.FIRST_YN
-			 , B.DOWN_YN
+			 , B.FIRST_ORD_YN
+			 , B.DOWN_ABL_YN
 		     , B.DC_CD_GB
 			 , B.CUST_JOIN_STDT
 			 , B.CUST_JOIN_EDDT
 			 , B.BUY_STDT
 			 , B.BUY_EDDT
-			 , B.PAY_TYPE
-			 , B.CUST_JOIN_YN
+			 , B.NEW_CUST_YN
 			 , (SELECT AF_CHANNEL
 			      FROM TB_AF_LINK A
 			     WHERE A.AF_LINK_CD = B.AF_LINK_CD) AS AF_CHANNEL

+ 3 - 3
src/main/webapp/WEB-INF/views/marketing/CouponListForm.html

@@ -142,7 +142,7 @@
 		var cpnTypeList = gagajf.convertToArray([[${cpnTypeList}]]);
 		var siteCdList = gagajf.convertToArray([[${siteCdList}]]);
 		var dcWayList = gagajf.convertToArray([[${dcWayList}]]);
-		var usableCustGbList = gagajf.convertToArray([[${usableCustGbList}]]);
+		//var usableCustGbList = gagajf.convertToArray([[${usableCustGbList}]]);
 		var pdGbList = { "P":"기간", "D":"일수" };
 
 		var columnDefs = [];
@@ -157,12 +157,12 @@
 			{headerName: "쿠폰명", field: "cpnNm", width: 140, cellClass: 'text-center' , cellRenderer: function (params) {
 				return "<a href=\"javascript:void(0);\" onclick=\"cfnCouponCreatePopup('" + params.data.cpnId + "');\">" + params.value + "</a>";
 			}},
-			{headerName: "사용가능고객구분", field: "usableCustGb", width: 140, cellClass: 'text-center' ,
+			/*{headerName: "사용가능고객구분", field: "usableCustGb", width: 140, cellClass: 'text-center' ,
 				cellEditor: 'agRichSelectCellEditor',
 				cellEditorParams: { values: gagaAgGrid.extractValues(usableCustGbList) },
 				valueFormatter: function (params) { return gagaAgGrid.lookupValue(usableCustGbList, params.value); },
 				valueParser: function (params) { return gagaAgGrid.lookupKey(usableCustGbList, params.newValue);}
-			},
+			},*/
 			{headerName: "쿠폰유형", field: "cpnType", width: 140, cellClass: 'text-center' ,
 				cellEditor: 'agRichSelectCellEditor',
 				cellEditorParams: { values: gagaAgGrid.extractValues(cpnTypeList) },

+ 30 - 30
src/main/webapp/WEB-INF/views/marketing/CouponPopupForm.html

@@ -232,7 +232,7 @@
 										<tr class="firstBuyTr">
 											<th>첫구매여부<em class="required" title="필수"></em></th>
 											<td>
-												<select name="firstYn" id="firstYn" onchange="firstYnChange(this)" required="required" data-valid-name="첫구매여부">
+												<select name="firstOrdYn" id="firstOrdYn" onchange="firstOrdYnChange(this)" required="required" data-valid-name="첫구매여부">
 													<option value="Y">Y</option>
 													<option value="N" selected="selected">N</option>
 												</select>
@@ -264,7 +264,7 @@
 										<tr class="custJoinTr">
 											<th>신규회원여부<em class="required" title="필수"></em></th>
 											<td>
-												<select name="custJoinYn" id="custJoinYn" onchange="custJoinYnChange(this)" required="required" data-valid-name="신규회원여부">
+												<select name="newCustYn" id="newCustYn" onchange="newCustYnChange(this)" required="required" data-valid-name="신규회원여부">
 													<option value="Y">Y</option>
 													<option value="N" selected="selected">N</option>
 												</select>
@@ -312,7 +312,7 @@
 											</td>
 											<th>다운로드가능여부<em class="required" title="필수"></em></th>
 											<td>
-												<select name="downYn" id="downYn" required="required" data-valid-name="다운로드가능여부">
+												<select name="downAblYn" id="downAblYn" required="required" data-valid-name="다운로드가능여부">
 													<option value="Y">Y</option>
 													<option value="Y" selected="selected">N</option>
 												</select>
@@ -332,7 +332,7 @@
 												</select>
 											</td>
 										</tr>-->
-										<tr class="payTypeTr" style="display: none;">
+										<!--<tr class="payTypeTr" style="display: none;">
 											<th>결제수단<em class="required" title="필수"></em></th>
 											<td colspan="5">
 												<select name="payType" id="payType" data-valid-name="결제수단">
@@ -346,7 +346,7 @@
 											<td colspan="5">
 
 											</td>
-										</tr>
+										</tr>-->
 										<tr>
 											<th>쿠폰상태<em class="required" title="필수"></em></th>
 											<td>
@@ -762,7 +762,7 @@
 
 	function checkValidation(){
 		//신규가입 지급한다면 validation 체크
-		if( $('#custJoinYn option:selected').val() == "Y" ){
+		if( $('#newCustYn option:selected').val() == "Y" ){
 			var fromDate = $('#CouponForm input[name=custJoinStdt]').val();
 			var toDate = $('#CouponForm input[name=custJoinEddt]').val();
 
@@ -788,7 +788,7 @@
 		}
 
 		// 첫구매 지급하면 validation 체크
-		if( $('#firstYn option:selected').val() == "Y" ){
+		if( $('#firstOrdYn option:selected').val() == "Y" ){
 			var fromDate = $('#CouponForm input[name=buyStdt]').val();
 			var toDate = $('#CouponForm input[name=buyEddt]').val();
 
@@ -923,12 +923,12 @@
 
 		// 주문서 쿠폰 선택시 결제수단 노출
 		if(radioValue == 'G230_20') {
-			$('#CouponForm .payTypeTr').show();
-			$('#CouponForm #payType').attr('required' , true);
+			//$('#CouponForm .payTypeTr').show();
+			//$('#CouponForm #payType').attr('required' , true);
 			$("#CouponForm .dcCdGb").show();		// 할인쿠폰유형 노출
 		} else {
-			$('#CouponForm .payTypeTr').hide();
-			$('#CouponForm #payType').attr('required' , false );
+			//$('#CouponForm .payTypeTr').hide();
+			//$('#CouponForm #payType').attr('required' , false );
 			$("#CouponForm .dcCdGb").hide();		// 할인쿠폰유형 숨김
 			$("#CouponForm input:radio[name='dcCdGb']:radio[value='G233_00']").prop('checked', true);		// 주문서 쿠폰이 아닐 경우 일반 쿠폰으로 설정
 		}
@@ -943,7 +943,7 @@
 			$("#CouponForm .dcCdCheck2").show();
 			$("#CouponForm .serialCpnArea").hide();
 			$("#CouponForm .randomCpnArea").hide();
-			$("#CouponForm #custJoinYn").parent().attr("colspan", "");
+			$("#CouponForm #newCustYn").parent().attr("colspan", "");
 			$("#CouponForm .normalCol").attr("colspan", "5");
 			$('#CouponForm input[name="serialCpnNm"]').attr('required' , false);
 			$('#CouponForm input[name="serialCpnQty"]').attr('required' , false);
@@ -966,7 +966,7 @@
 			}
 			$("#CouponForm .dcCdCheck1").hide();								// 총발행제한수량, 1회발행수량, 1인당발행제한수량 숨김
 			$("#CouponForm .dcCdCheck2").hide();								// 총발행제한수량, 1회발행수량, 1인당발행제한수량 숨김
-			$("#CouponForm #custJoinYn").parent().attr("colspan", "5");		// 총발행제한 수량을 없애면서 신규회원여부 colspan 수정
+			$("#CouponForm #newCustYn").parent().attr("colspan", "5");		// 총발행제한 수량을 없애면서 신규회원여부 colspan 수정
 		}
 	});
 
@@ -1283,12 +1283,12 @@
 	}
 
 	// 첫구매여부 변경시
-	function firstYnChange(pThis){
+	function firstOrdYnChange(pThis){
 		var selectVal = $(pThis).val();
 
 		if(typeof selectVal == "undefined") {
 			if(mode == "U") {
-				selectVal = cpnDetail.firstYn;
+				selectVal = cpnDetail.firstOrdYn;
 			} else {
 				selectVal = "N";
 			}
@@ -1306,12 +1306,12 @@
 	}
 
 	// 신규회원여부 변경시
-	function custJoinYnChange(pThis){
+	function newCustYnChange(pThis){
 		var selectVal = $(pThis).val();
 
 		if(typeof selectVal == "undefined") {
 			if(mode == "U") {
-				selectVal = cpnDetail.custJoinYn;
+				selectVal = cpnDetail.newCustYn;
 			} else {
 				selectVal = "N";
 			}
@@ -1485,16 +1485,16 @@
 			$("#CouponForm #usableCustGb").val(cpnDetail.usableCustGb).prop("selected", true);
 			$("#CouponForm #usableCustGrade").val(cpnDetail.usableCustGrade).prop("selected", true);
 			$("#CouponForm #endAlimYn").val(cpnDetail.endAlimYn).prop("selected", true);
-			$("#CouponForm #firstYn").val(cpnDetail.firstYn).prop("selected", true);
+			$("#CouponForm #firstOrdYn").val(cpnDetail.firstOrdYn).prop("selected", true);
 			$("#CouponForm #reissuance").val(cpnDetail.reissuance).prop("selected", true);
 			$("#CouponForm #dnGb").val(cpnDetail.dnGb).prop("selected", true);
 			$("#CouponForm #cpnStat").val(cpnDetail.cpnStat).prop("selected", true);
-			$("#CouponForm #custJoinYn").val(cpnDetail.custJoinYn).prop("selected", true);
+			$("#CouponForm #newCustYn").val(cpnDetail.newCustYn).prop("selected", true);
 			$("#CouponForm #pdGb").val(cpnDetail.pdGb).prop("selected", true);
 			$("#CouponForm #siteCd").val(cpnDetail.siteCd).prop("selected", true);
 			$("#CouponForm #afChannel").val(cpnDetail.afChannel).prop("selected", true);
 			$("#CouponForm #cpnNm").val(cpnDetail.cpnNm);
-			$("#CouponForm #downYn").val(cpnDetail.downYn);
+			$("#CouponForm #downAblYn").val(cpnDetail.downAblYn);
 			$("#CouponForm #buyLimitAmt").val(cpnDetail.buyLimitAmt);
 			$("#CouponForm #cpnId").val(cpnDetail.cpnId);
 
@@ -1568,18 +1568,18 @@
 				$("#CouponForm #usableCustGrade").attr('disabled', true);
 				$("#CouponForm #endAlimYn").attr('readonly', true);
 				$("#CouponForm #endAlimYn").attr('disabled', true);
-				$("#CouponForm #firstYn").attr('readonly', true);
-				$("#CouponForm #firstYn").attr('disabled', true);
+				$("#CouponForm #firstOrdYn").attr('readonly', true);
+				$("#CouponForm #firstOrdYn").attr('disabled', true);
 				$("#CouponForm #reissuance").attr('readonly', true);
 				$("#CouponForm #reissuance").attr('disabled', true);
 				$("#CouponForm #dnGb").attr('readonly', true);
 				$("#CouponForm #dnGb").attr('disabled', true);
-				$("#CouponForm #custJoinYn").attr('readonly', true);
-				$("#CouponForm #custJoinYn").attr('disabled', true);
+				$("#CouponForm #newCustYn").attr('readonly', true);
+				$("#CouponForm #newCustYn").attr('disabled', true);
 				$("#CouponForm #pdGb").attr('readonly', true);
 				$("#CouponForm #pdGb").attr('disabled', true);
-				$("#CouponForm #downYn").attr('readonly', true);
-				$("#CouponForm #downYn").attr('disabled', true);
+				$("#CouponForm #downAblYn").attr('readonly', true);
+				$("#CouponForm #downAblYn").attr('disabled', true);
 				$("#CouponForm #siteCd").attr('readonly', true);
 				$("#CouponForm #siteCd").attr('disabled', true);
 				$("#CouponForm #cpnNm").attr('readonly', true);
@@ -1637,7 +1637,7 @@
 
 			}
 			// 첫구매여부 적용하는 경우 날짜 세팅
-			if (cpnDetail.firstYn == "Y") {
+			if (cpnDetail.firstOrdYn == "Y") {
 				splitDate("start", cpnDetail.buyStdt, "buy");
 				splitDate("end", cpnDetail.buyEddt, "buy");
 				if(issueCnt > 0) {
@@ -1650,7 +1650,7 @@
 				}
 			}
 			// 신규회원여부 적용하는 경우 날짜 세팅
-			if (cpnDetail.custJoinYn == "Y") {
+			if (cpnDetail.newCustYn == "Y") {
 				splitDate("start", cpnDetail.custJoinStdt, "custJoin");
 				splitDate("end", cpnDetail.custJoinEddt, "custJoin");
 				if(issueCnt > 0) {
@@ -1665,8 +1665,8 @@
 		}
 		// 기본세팅
 		pdGbChange();
-		firstYnChange();
-		custJoinYnChange();
+		firstOrdYnChange();
+		newCustYnChange();
 		fnChangeAfLinkCdList();
 
 		// 제휴채널2뎁스 기본세팅