فهرست منبع

Merge branch 'develop' into bin2107

bin2107 5 سال پیش
والد
کامیت
61f19085a3

+ 10 - 0
src/main/java/com/style24/front/biz/dao/TsfPlanningDao.java

@@ -170,6 +170,16 @@ public interface TsfPlanningDao {
 	 * @date 2021. 3. 22
 	 */
 	Collection<Plan> getPlanImageInfo(Plan plan);
+	
+	/**
+	 * 기획전 템플릿 유의사항
+	 *
+	 * @param 기획전 번호
+	 * @return
+	 * @author sowon
+	 * @date 2021. 5. 26
+	 */
+	Collection<Plan> getPlanNoticeInfo(Plan plan);
 
 	/**
 	 * 기획전 템플릿 상품 1열

+ 8 - 6
src/main/java/com/style24/front/biz/service/TsfCustomerService.java

@@ -1117,14 +1117,14 @@ public class TsfCustomerService {
 	 * @since 2021. 05. 20
 	 */
 	@Transactional("shopTxnManager")
-	public void updateAppAgreeYn(String appAppAgreeYn) {
+	public int updateAppAgreeYn(String appAppAgreeYn) {
 		if (!TsfSession.isLogin()) {
 			throw new IllegalStateException("로그인 후 다시 시도하시기 바랍니다.");
 		}
 
 		Integer custNo = TsfSession.getInfo().getCustNo();
 		Customer customer = getCustomerFindByCustNo(custNo);
-
+		int resultCnt = 0;
 		if (customer != null) {
 			if (!customer.getAppAgreeYn().equals(appAppAgreeYn)) {
 				Customer custInfo = new Customer();
@@ -1136,9 +1136,10 @@ public class TsfCustomerService {
 
 				coreCustomerService.createCustomerHistory(custInfo);
 
-				customerDao.updateAppAgreeYn(custInfo);
+				resultCnt = customerDao.updateAppAgreeYn(custInfo);
 			}
 		}
+		return resultCnt;
 	}
 
 	/*
@@ -1149,14 +1150,14 @@ public class TsfCustomerService {
 	 * @since 2021. 05. 20
 	 */
 	@Transactional("shopTxnManager")
-	public void updateMkAgreeYn(String mkAgreeYn) {
+	public int updateMkAgreeYn(String mkAgreeYn) {
 		if (!TsfSession.isLogin()) {
 			throw new IllegalStateException("로그인 후 다시 시도하시기 바랍니다.");
 		}
 
 		Integer custNo = TsfSession.getInfo().getCustNo();
 		Customer customer = getCustomerFindByCustNo(custNo);
-
+		int resultCnt = 0;
 		if (customer != null) {
 			if (!customer.getMkAgreeYn().equals(mkAgreeYn)) {
 				Customer custInfo = new Customer();
@@ -1168,9 +1169,10 @@ public class TsfCustomerService {
 
 				coreCustomerService.createCustomerHistory(custInfo);
 
-				customerDao.updateMkAgreeYn(custInfo);
+				resultCnt = customerDao.updateMkAgreeYn(custInfo);
 			}
 		}
+		return resultCnt;
 	}
 
 

+ 12 - 0
src/main/java/com/style24/front/biz/service/TsfPlanningService.java

@@ -260,6 +260,18 @@ public class TsfPlanningService {
 	public Collection<Plan> getPlanImageInfo(Plan plan) {
 		return planningDao.getPlanImageInfo(plan);
 	}
+	
+	/**
+	 * 기획전 템플릿 유의사항
+	 *
+	 * @param
+	 * @return
+	 * @author sowon
+	 * @since 2021. 5. 26
+	 */
+	public Collection<Plan> getPlanNoticeInfo(Plan plan) {
+		return planningDao.getPlanNoticeInfo(plan);
+	}
 
 	/**
 	 * 기획전 템플릿 상품

+ 13 - 8
src/main/java/com/style24/front/biz/web/TsfAppController.java

@@ -1,5 +1,6 @@
 package com.style24.front.biz.web;
 
+import com.gagaframework.web.parameter.GagaMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -57,9 +58,9 @@ public class TsfAppController extends TsfBaseController {
 		ModelAndView mav = new ModelAndView();
 
 		// 정책에 등록된 앱버전
-		if (TsfSession.getAttribute("osType").equals("I")) {
+		if ("I".equals(TsfSession.getAttribute("osType"))) {
 			mav.addObject("regAppVersion", envsetService.getIosAppVersion(TscConstants.Site.STYLE24.value()));
-		} else if (TsfSession.getAttribute("osType").equals("A")) {
+		} else if ("A".equals(TsfSession.getAttribute("osType"))) {
 			mav.addObject("regAppVersion", envsetService.getAosAppVersion(TscConstants.Site.STYLE24.value()));
 		}
 
@@ -80,9 +81,11 @@ public class TsfAppController extends TsfBaseController {
 	 */
 	@PostMapping("/appagree/update")
 	@ResponseBody
-	public GagaResponse updateAppAgreeYn(@RequestBody Customer customer) {
-		customerService.updateAppAgreeYn(customer.getAppAgreeYn());
-		return super.ok(message.getMessage("SUCC_0004"));
+	public GagaMap updateAppAgreeYn(@RequestBody Customer customer) {
+		GagaMap result = new GagaMap();
+		int resultCnt = customerService.updateAppAgreeYn(customer.getAppAgreeYn());
+		result.setInt("resultCnt", resultCnt);
+		return result;
 	}
 
 	/**
@@ -94,9 +97,11 @@ public class TsfAppController extends TsfBaseController {
 	 */
 	@PostMapping("/mkagree/update")
 	@ResponseBody
-	public GagaResponse updateMkAgreeYn(@RequestBody Customer customer) {
-		customerService.updateMkAgreeYn(customer.getMkAgreeYn());
-		return super.ok(message.getMessage("SUCC_0004"));
+	public GagaMap updateMkAgreeYn(@RequestBody Customer customer) {
+		GagaMap result = new GagaMap();
+		int resultCnt = customerService.updateMkAgreeYn(customer.getMkAgreeYn());
+		result.setInt("resultCnt", resultCnt);
+		return result;
 	}
 
 	/**

+ 3 - 0
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -206,6 +206,9 @@ public class TsfPlanningController extends TsfBaseController {
 		// 이미지
 		mav.addObject("imageInfo", planningService.getPlanImageInfo(plan));
 		
+		// 유의사항
+		mav.addObject("noticeInfo", planningService.getPlanNoticeInfo(plan));
+		
 		plan.setFrontGb(TsfSession.getFrontGb());
 		// 상품1열 전시
 		plan.setTmplType("G082_50");

+ 20 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfPlanning.xml

@@ -869,6 +869,26 @@
 		 AND PC.DISP_YN = 'Y'
 	</select>
 	
+	<select id="getPlanNoticeInfo" parameterType="Plan" resultType="Plan">
+		/* TsfPlanning.getPlanNoticeInfo*/
+		SELECT PC.PLAN_CONT_SQ
+		      ,PC.PLAN_SQ
+		      ,PC.TMPL_TYPE
+		      ,PC.TITLE
+		      ,PC.DISP_YN
+		      ,PC.DISP_ORD
+		      ,PCI.PLAN_CONT_ITEM_SQ
+		      ,PCI.ITEM_VAL
+		      ,PCI.LINK_URL
+		      ,PCI.LINK_OPEN_GB
+		      ,PCI.DISP_ORD
+		FROM TB_PLAN_CONTENTS PC INNER JOIN TB_PLAN_CONTENTS_ITEM PCI ON PC.PLAN_CONT_SQ = PCI.PLAN_CONT_SQ 
+		WHERE 1=1
+		 AND PC.TMPL_TYPE = 'G082_60'
+		 AND PC.PLAN_SQ = #{planSq}
+		 AND PC.DISP_YN = 'Y'
+	</select>
+	
 	<!-- 기획전 상품  전시 -->
 	<select id="getPlanGoodsDisplayList" parameterType="Plan" resultType="Plan">
 		/* TsfPlanning.getPlanGoodsDisplayList */

+ 61 - 29
src/main/webapp/WEB-INF/views/mob/app/SettingFormMob.html

@@ -99,14 +99,17 @@
 
 <script th:inline="javascript">
 	const isLogin = [[${isLogin}]];
+	let appAgreeYn = [[${appAgreeYn}]];
+	let appMkAgreeYn = [[${appMkAgreeYn}]];
 
 	$(document).ready(function(){
 		$('#htopTitle').text('설정');
 
-		// 앱으로 푸시 상태값 조회. 앱에서 settingsSwtichPush 함수를 호출함.
+		// 앱으로 푸시 상태값 조회. 앱에서 settingsSwtichPush, settingsSwtichAdvertise 함수를 호출함.
 		if (_isApp === 'true') {
 			if (_osType === 'A') {
-			window.style24.isAdEnable();
+				window.style24.isPushEnable(); // 정보성(푸시수신 API) settingsSwtichPush
+				window.style24.isAdEnable();   // 마케팅성(광고푸시 API) settingsSwtichAdvertise
 			} else if (_osType === 'I') {
 				// 아래와 같이 호출 시 settingsSwtichPush 함수가 앱에서 호출됨
 				window.webkit.messageHandlers.isAdEnable.postMessage({"dummy":"dummy"});
@@ -117,49 +120,67 @@
 
 
 	// 앱에서 호출되는 함수(앱푸시)
-	var settingsAppPush = function(onOff) {
-		if (onOff == 'ON') {
+	var settingsSwtichPush = function(onOff) {
+		if (onOff === 'ON') {
 			$('#btnPushSetting').prop('checked', true);
-		} else if (onOff == 'OFF') {
+		} else if (onOff === 'OFF') {
 			$('#btnPushSetting').prop('checked', false);
 		}
+
+		if (isLogin) {
+			// 데이터 상 앱푸시 여부(Y/N) 이랑 기기에 등록된 푸시수신 여부(ON/OFF)
+			if (appAgreeYn === 'Y' && onOff === 'OFF') {
+				fnAppPushAgreeUpdate('N');
+			} else if (appAgreeYn === 'N' && onOff === 'ON') {
+				fnAppPushAgreeUpdate('Y');
+			}
+		}
 	}
 
 	// 앱에서 호출되는 함수(마케팅동의)
-	var settingsMkPush = function (onOff) {
-		if (onOff == 'ON') {
+	var settingsSwtichAdvertise = function (onOff) {
+		if (onOff === 'ON') {
 			$('#btnMkSetting').prop('checked', true);
-		} else if (onOff == 'OFF') {
+		} else if (onOff === 'OFF') {
 			$('#btnMkSetting').prop('checked', false);
 		}
+
+		if (isLogin) {
+			// 데이터 상 마케팅동의 여부(Y/N) 이랑 기기에 등록된 푸시수신 여부(ON/OFF)
+			if (appMkAgreeYn === 'Y' && onOff === 'OFF') {
+				fnAppMkAgreeUpdate('N');
+			} else if (appMkAgreeYn === 'N' && onOff === 'ON') {
+				fnAppMkAgreeUpdate('Y');
+			}
+		}
 	}
 
 	$('#btnPushSetting').on('click', function() {
 		let appAgreeYn;
 		if (_isApp === 'true') {
 			if ($(this).is(":checked")) {
-				if (_osType == 'A') {
-					window.style24.adEnable('ON');
+				if (_osType === 'A') {
+					window.style24.pushEnable('ON');
 				} else if (_osType == 'I') {
 					window.webkit.messageHandlers.adEnable.postMessage({"status":"ON"});
 				}
 				appAgreeYn = 'Y';
 			} else {
-				if (_osType == 'A') {
-					window.style24.adEnable('OFF');
-				} else if(_osType == 'I') {
+				if (_osType === 'A') {
+					window.style24.pushEnable('OFF');
+					window.style24.adEnable('OFF'); // 정보성 푸시가 상위 개념이라 마케팅도 같이 OFF가 되어여함
+				} else if(_osType === 'I') {
 					window.webkit.messageHandlers.adEnable.postMessage({"status":"OFF"});
 				}
 				appAgreeYn = 'N';
 			}
-
 			if (isLogin) {
-				let params = {}
-				params.appAgreeYn = appAgreeYn;
-				let jsonData = JSON.stringify(params);
-				gagajf.ajaxJsonSubmit('/app/appagree/update', jsonData);
+				if (appAgreeYn === 'N') { // 마케팅도 N 처리
+					fnAppMkAgreeUpdate('N');
+					$('#btnMkSetting').prop('checked', false);
+				}
+				fnAppPushAgreeUpdate(appAgreeYn);
 			}
-
 		}
 	});
 
@@ -167,32 +188,43 @@
 		let mkAgreeYn;
 		if (_isApp === 'true') {
 			if ($(this).is(":checked")) {
-				if (_osType == 'A') {
+				if (_osType === 'A') {
 					window.style24.adEnable('ON');
-				} else if (_osType == 'I') {
+				} else if (_osType === 'I') {
 					window.webkit.messageHandlers.adEnable.postMessage({"status":"ON"});
 				}
 				mkAgreeYn = 'Y';
 			} else {
-				if (_osType == 'A') {
+				if (_osType === 'A') {
 					window.style24.adEnable('OFF');
-				} else if(_osType == 'I') {
+				} else if(_osType === 'I') {
 					window.webkit.messageHandlers.adEnable.postMessage({"status":"OFF"});
 				}
 				mkAgreeYn = 'N';
 			}
-
 			if (isLogin) {
-				let params = {}
-				params.mkAgreeYn = mkAgreeYn;
-				let jsonData = JSON.stringify(params);
-				gagajf.ajaxJsonSubmit('/app/mkagree/update', jsonData);
+				fnAppMkAgreeUpdate(mkAgreeYn);
 			}
-
 		}
 	});
 
 
+	// 앱푸시동의 데이터 처리
+	var fnAppPushAgreeUpdate = function (appAgreeYn) {
+		let params = {}
+		params.appAgreeYn = appAgreeYn;
+		let jsonData = JSON.stringify(params);
+		gagajf.ajaxJsonSubmit('/app/appagree/update', jsonData);
+	}
+
+	// 마케팅동의 데이터 처리
+	var fnAppMkAgreeUpdate = function (mkAgreeYn) {
+		let params = {}
+		params.mkAgreeYn = mkAgreeYn;
+		let jsonData = JSON.stringify(params);
+		gagajf.ajaxJsonSubmit('/app/mkagree/update', jsonData);
+	}
+
 	// 안드로이드 앱
 	$('#chk-2').on('click', function () {
 		document.location.href='update://?link=https://play.google.com/store/apps/details?id=';

+ 2 - 0
src/main/webapp/WEB-INF/views/mob/mypage/MypageCreExchangeDetailFormMob.html

@@ -303,6 +303,8 @@
 	let addrGb = '';
 	let memoGb = '';
 	let kcpReceiptUrl = [[${kcpReceiptUrl}]];
+	let oneData = [[${oneData}]];
+	let isLogin = [[${isLogin}]];
 
 	$(document).ready(function() {
 		// 타이틀명

+ 38 - 0
src/main/webapp/WEB-INF/views/mob/mypage/MypageOrderDetailFormMob.html

@@ -1183,6 +1183,44 @@
 			cfnGoToPage(_PAGE_MYPAGE_ORDER_DETAIL + ordNo);
 		});
 	}
+
+	// 전체구매확정 버튼 클릭 이벤트
+	var fnAllDecideOrder = function(param) {
+		let orderDecisionArr = [];
+		let ordNo = $(param).attr('ordNo');
+
+		// 주문상세번호 설정
+		$.each($('#mypageOrderDetailForm input[name=ordDtlNoArr]'), function(idx, item) {
+			orderDecisionArr.push($(item).val());
+		});
+
+		if (orderDecisionArr.length == 0) {
+			mcxDialog.alert('구매확정 가능한 상품이 없습니다.');
+			return false;
+		}
+
+		mcxDialog.confirm('구매확정 후에는 반품/교환이 불가합니다. 구매확정하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				let data = {};
+
+				data.ordNo = ordNo;
+				data.ordDtlNoArr = orderDecisionArr;
+
+				var jsonData = JSON.stringify(data);
+				gagajf.ajaxJsonSubmit('/mypage/order/decision'
+					, jsonData
+					, function() {
+						if (typeof(fnReloadStatusCount) == 'function') {
+							fnReloadStatusCount();
+						} else {
+							cfnGoToPage(_PAGE_MYPAGE_ORDER_DETAIL + ordNo);
+						}
+					});
+			}
+		});
+	}
 </script>
 
 </th:block>

+ 1 - 0
src/main/webapp/WEB-INF/views/mob/mypage/NoMemberCreExchangeDetailFormMob.html

@@ -292,6 +292,7 @@
 	/*<![CDATA[*/
 	let oneData = [[${oneData}]];
 	var isLogin = [[${isLogin}]];
+	let kcpReceiptUrl = [[${kcpReceiptUrl}]];
 	let addrGb = '';
 	let memoGb = '';
 

+ 29 - 3
src/main/webapp/WEB-INF/views/mob/planning/PlanningDetailFormMob.html

@@ -31,7 +31,7 @@
 					</div>
 				</div>
 				<div class="inner wide">
-					<div class="promotion_visual type1" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcMob,'&amplt;','<'),'&ampgt;','>')}">>
+					<div class="promotion_visual type1" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcMob,'&amplt;','<'),'&ampgt;','>')}">
 					</div>
 				</div>
 				<th:block th:each="a, template : ${templateOrd}">
@@ -69,9 +69,15 @@
 						<div class="inner" th:id="${a.tmplType + a.planContSq}">
                     	</div>
 					</th:block>
+					<th:block th:if="${a.tmplType == 'G082_60'}">
+						<div class="inner" th:id="${a.tmplType}">
+						</div>
+					</th:block>
 				</th:block>
-				
-				<div class="inner" th:if="${fsrcInfoBtm != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcMob,'&amplt;','<'),'&ampgt;','>')}"></div>
+				<div class="inner wide">
+					<div class="promotion_visual type1" th:if="${fsrcInfoBtm != null}"  th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcMob,'&amplt;','<'),'&ampgt;','>')}">
+					</div>
+				</div>
 				<div class="inner" th:if="${planInfo.pollSq != null}">
 					<div class="dp_btn_area">
 						<div class="btn_wrap">
@@ -267,6 +273,7 @@ let review = [[${reviewInfo}]];
 let coupon = [[${couponInfo}]];
 let plan = [[${planInfo}]];
 let image = [[${imageInfo}]];
+let notice = [[${noticeInfo}]];
 let goods1 = [[${goods1Info}]];
 let goods2 = [[${goods2Info}]];
 let goods4 = [[${goods4Info}]];
@@ -450,6 +457,25 @@ var fnReplySave = function() {
 	})
 }
 
+if (notice.length>0) {
+	var html = '';
+	
+	html += '<div class="announce_txt">';
+	html += '	<div class="note_txt">';
+	html += '		<img src="/images/mo/ico_content_find03.png" alt="유의사항">';
+	html += '		<p>유의사항</p>';
+	html += '	</div>';
+	html += '	<div class="announce_list">';
+	html += '		<ul>';
+	$.each(notice, function(idx, item)  {
+	html += '			<li>' +item.itemVal+ '</li>';
+	});
+	html += '		</ul>';
+	html += '	</div>';
+	html += '</div>';
+	
+	$("#G082_60").append(html);
+}
 
 if(planCornerList.length>0){
 	

+ 1 - 1
src/main/webapp/WEB-INF/views/web/mypage/MypageCreExchangeDetailFormWeb.html

@@ -296,7 +296,7 @@
 	var isLogin = [[${isLogin}]];
 	let oneData = [[${oneData}]];
 	let ordNo = oneData.ordNo;
-	let kcpReceiptUrl = [[${@environment.getProperty('pg.kcp.receipt.url')}]];
+	let kcpReceiptUrl = [[${kcpReceiptUrl}]];
 
 	// 추가배송비 전표 데이터 설정
 	let paymentInfo = {};

+ 1 - 1
src/main/webapp/WEB-INF/views/web/mypage/NoMemberCreExchangeDetailFormWeb.html

@@ -293,7 +293,7 @@
 	var isLogin = [[${isLogin}]];
 	let oneData = [[${oneData}]];
 	let ordNo = oneData.ordNo;
-	let kcpReceiptUrl = [[${@environment.getProperty('pg.kcp.receipt.url')}]];
+	let kcpReceiptUrl = [[${kcpReceiptUrl}]];
 
 	// 추가배송비 전표 데이터 설정
 	let paymentInfo = {};

+ 34 - 0
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -107,7 +107,11 @@
 				<th:block th:if="${a.tmplType == 'G082_52'}">
 						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
 				</th:block>
+				<th:block th:if="${a.tmplType == 'G082_60'}">
+						<div class="content dp_announce" th:id="${a.tmplType}"></div>
+				</th:block>
 			</th:block>
+			
 			<div class="coner_item01" th:if="${fsrcInfoBtm != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div>
 			<div class="coner_item01" th:if="${planInfo.pollSq != null}">
 				<div class="content dp_btn_area">
@@ -244,6 +248,7 @@ let review = [[${reviewInfo}]];
 let coupon = [[${couponInfo}]];
 let plan = [[${planInfo}]];
 let image = [[${imageInfo}]];
+let notice = [[${noticeInfo}]];
 let goods1 = [[${goods1Info}]];
 let goods2 = [[${goods2Info}]];
 let goods4 = [[${goods4Info}]];
@@ -253,6 +258,35 @@ let replyCount = [[${replyCount}]];
 let replyAttachList = [[${replyAttachList}]];
 let planCornerGoodsList = [[${planCornerGoodsList}]];
 let planCornerList = [[${planCornerList}]];
+
+if(notice.length>0){
+	var html = '';
+	
+	html += '    <div class="cont_head">';
+	html += '        <div>';
+	html += '            <h4>유의사항</h4>';
+	html += '        </div>';
+	html += '    </div>';
+	html += '    <div class="cont_body">';
+	html += '        <div class="announce_txt">';
+	html += '            <div class="note_txt">';
+	html += '                <img src="/images/pc/ico_content_find.png" alt="유의사항">';
+	html += '                <p>유의사항</p>';
+	html += '            </div>';
+	html += '            <div class="announce_list">';
+	html += '                <ul>';
+	$.each(notice, function(idx, item)  {
+		html += '				<li>' +item.itemVal+ '</li>';
+	});
+	html += '                </ul>';
+	html += '            </div>';
+	html += '        </div> ';
+	html += '    </div>';
+
+	$("#G082_60").append(html);
+}
+
+
 if(planCornerList.length>0){
 	var html = '';