Quellcode durchsuchen

Merge branch 'jsshin' into develop

jsshin vor 5 Jahren
Ursprung
Commit
64a4d46c5c

+ 10 - 1
src/main/java/com/style24/front/biz/service/TsfCustomerService.java

@@ -264,7 +264,11 @@ public class TsfCustomerService {
 		customer.setCustStat(TscConstants.CustStat.ACTIVE.value());
 		customer.setCustGb(TscConstants.CustGb.NORMAL.value());
 		customer.setCustGrade(TscConstants.CustGrade.WELCOME.value());
-
+		// 앱이면 앱푸시 기본값으로 수신동의 처리
+		String isApp = TsfSession.getAttribute("isApp");
+		if ("true".equals(isApp)) {
+			customer.setAppAgreeYn("Y");
+		}
 		int custCnt = customerDao.createCustomer(customer);
 		customerDao.saveBatchBirth(customer);
 
@@ -298,6 +302,11 @@ public class TsfCustomerService {
 		customer.setCustStat(TscConstants.CustStat.ACTIVE.value());
 		customer.setCustGb(TscConstants.CustGb.NORMAL.value());
 		customer.setCustGrade(TscConstants.CustGrade.WELCOME.value());
+		// 앱이면 앱푸시 기본값으로 수신동의 처리
+		String isApp = TsfSession.getAttribute("isApp");
+		if ("true".equals(isApp)) {
+			customer.setAppAgreeYn("Y");
+		}
 
 		int custCnt = customerDao.createCustomer(customer);
 		customerDao.createCustomerSns(customer);

+ 1 - 1
src/main/java/com/style24/front/biz/web/TsfCustomerController.java

@@ -643,7 +643,7 @@ public class TsfCustomerController extends TsfBaseController {
 		String maskingCustId = TsfSession.getAttribute("maskingCustId");
 
 		mav.addObject("maskingCustId", maskingCustId);
-
+		mav.addObject("custNo", TsfSession.getInfo().getCustNo());
 		mav.setViewName(super.getDeviceViewName("customer/JoinCompleteForm"));
 
 		return mav;

+ 4 - 3
src/main/webapp/WEB-INF/views/mob/app/SettingFormMob.html

@@ -111,7 +111,8 @@
 				window.style24.isPushEnable(); // 정보성(푸시수신 API) settingsSwtichPush
 				window.style24.isAdEnable();   // 마케팅성(광고푸시 API) settingsSwtichAdvertise
 			} else if (_osType === 'I') {
-				// 아래와 같이 호출 시 settingsSwtichPush 함수가 앱에서 호출됨
+				// 아래와 같이 호출 시 settingsSwtichPush, settingsSwtichAdvertise 함수가 앱에서 호출됨
+				window.webkit.messageHandlers.isPushEnable.postMessage({"dummy":"dummy"});
 				window.webkit.messageHandlers.isAdEnable.postMessage({"dummy":"dummy"});
 			}
 		}
@@ -162,7 +163,7 @@
 				if (_osType === 'A') {
 					window.style24.pushEnable('ON');
 				} else if (_osType == 'I') {
-					window.webkit.messageHandlers.adEnable.postMessage({"status":"ON"});
+					window.webkit.messageHandlers.pushEnable.postMessage({"status":"ON"});
 				}
 				appAgreeYn = 'Y';
 			} else {
@@ -170,7 +171,7 @@
 					window.style24.pushEnable('OFF');
 					window.style24.adEnable('OFF'); // 정보성 푸시가 상위 개념이라 마케팅도 같이 OFF가 되어여함
 				} else if(_osType === 'I') {
-					window.webkit.messageHandlers.adEnable.postMessage({"status":"OFF"});
+					window.webkit.messageHandlers.pushEnable.postMessage({"status":"OFF"});
 				}
 				appAgreeYn = 'N';
 			}

+ 16 - 0
src/main/webapp/WEB-INF/views/mob/customer/JoinCompleteFormMob.html

@@ -90,6 +90,22 @@
 		</section>
 		<!-- ★ 컨텐츠 종료 -->
 	</main>
+<script th:inline="javascript">
+	const maskingCustId = [[${maskingCustId}]];
+
+	$(document).ready(function(){
+		if (_isApp === 'true') {
+			if (gagajf.isNull(maskingCustId)) {
+				document.location.href = "idsend://?id=" + [[${custNo}]] + "^link=";
+				if (_osType === 'A') {
+					window.style24.pushEnable('ON');
+				} else if (_osType === 'I') {
+					window.webkit.messageHandlers.pushEnable.postMessage({"status":"ON"});
+				}
+			}
+		}
+	});
+</script>
 </th:block>
 </body>
 </html>