Преглед изворни кода

Merge branch 'jsshin' into develop

jsshin пре 5 година
родитељ
комит
fd231de6de

+ 0 - 1
src/main/java/com/style24/front/biz/dao/TsfCustomerDao.java

@@ -1,7 +1,6 @@
 package com.style24.front.biz.dao;
 
 import com.style24.core.support.annotation.ShopDs;
-import com.style24.persistence.domain.CustDeliveryAddr;
 import com.style24.persistence.domain.CustGrade;
 import com.style24.persistence.domain.CustSnsInfo;
 import com.style24.persistence.domain.Customer;

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

@@ -7,7 +7,7 @@ import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 
-import com.gagaframework.web.util.GagaDateUtil;
+
 import com.style24.persistence.domain.CustGrade;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -284,6 +284,7 @@ public class TsfCustomerService {
 	 * @author jsshin
 	 * @since 2021. 02. 19
 	 */
+	@Transactional("shopTxnManager")
 	public boolean saveJoinCustomerSns (Customer customer) {
 		boolean isJoin = true;
 		String snsId = customer.getSnsType().equals(TscConstants.SnsType.YES24.value()) ? customer.getMemNo() : customer.getSnsId();

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

@@ -4,14 +4,11 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 
 import com.style24.front.biz.thirdparty.Yes24Login;
-import com.style24.front.support.env.TsfConstants;
 import com.style24.persistence.domain.CustSnsInfo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -96,7 +93,7 @@ public class TsfCustomerController extends TsfBaseController {
 		boolean isFind = false;
 
 		if (StringUtils.isBlank(customer.getAuthMethod())) {
-			throw new IllegalStateException("인증방법이 없습니다. <br>관리자에게 문의하시기 바랍니다.");
+			throw new IllegalStateException(message.getMessage("CUST_0005"));
 		}
 
 		Customer params = new Customer();
@@ -165,7 +162,7 @@ public class TsfCustomerController extends TsfBaseController {
 		boolean isFind = false;
 
 		if (StringUtils.isBlank(customer.getAuthMethod())) {
-			throw new IllegalStateException("인증방법이 없습니다. <br>관리자에게 문의하시기 바랍니다.");
+			throw new IllegalStateException(message.getMessage("CUST_0005"));
 		}
 
 		// 고객정보 찾기 - 아이디, 이름, 이메일
@@ -210,7 +207,7 @@ public class TsfCustomerController extends TsfBaseController {
 		boolean isFind = false;
 
 		if (StringUtils.isBlank(customer.getAuthMethod())) {
-			throw new IllegalStateException("인증방법이 없습니다. <br>관리자에게 문의하시기 바랍니다.");
+			throw new IllegalStateException(message.getMessage("CUST_0005"));
 		}
 
 		Customer params = new Customer();
@@ -875,8 +872,7 @@ public class TsfCustomerController extends TsfBaseController {
 
 		mav.addObject("custNm", customer.getCustNm());
 
-//		mav.setViewName(super.getDeviceViewName("customer/ConsentUseInfoForm"));
-		mav.setViewName("web/customer/ConsentUseInfoFormWeb");
+		mav.setViewName(super.getDeviceViewName("customer/ConsentUseInfoForm"));
 
 		return mav;
 	}

+ 1 - 0
src/main/resources/i18n/messages/message_ko_KR.properties

@@ -76,6 +76,7 @@ CUST_0001=\uC815\uC0C1\uC801\uC73C\uB85C \uD0C8\uD1F4\uB418\uC5C8\uC2B5\uB2C8\uB
 CUST_0002=\uC774\uBBF8 \uD0C8\uD1F4\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
 CUST_0003=\uC9C4\uD589\uC911\uC778 \uAC70\uB798\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uC9C4\uD589\uC911\uC778 \uAC70\uB798\uB97C \uC644\uB8CC \uD6C4 \uD0C8\uD1F4 \uC2E0\uCCAD\uC744 \uD574\uC8FC\uC138\uC694.
 CUST_0004=\uD0C8\uD1F4\uAC00 \uC815\uC0C1\uC801\uC73C\uB85C \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.
+CUST_0005=\uC778\uC99D\uBC29\uBC95\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. <br>\uAD00\uB9AC\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC2DC\uAE30 \uBC14\uB78D\uB2C8\uB2E4.
 
 #\uC0AC\uBC29\uB137
 SABANGNET_0001=\uC131\uACF5\uC801\uC73C\uB85C \uC0C1\uD488 \uC815\uBCF4\uAC00 \uC804\uC1A1\uB418\uC5C8\uC2B5\uB2C8\uB2E4.(\uCD1D {0}\uAC74 \uC911 {1}\uAC74 \uC131\uACF5)

+ 1 - 0
src/main/webapp/WEB-INF/views/mob/customer/UseTermsLayerFormMob.html

@@ -1,3 +1,4 @@
+<!DOCTYPE html>
 <html lang="ko"
 	  xmlns:th="http://www.thymeleaf.org">
 <!--

+ 191 - 0
src/main/webapp/WEB-INF/views/mob/mypage/MypageCustDeliveryAddrFormMob.html

@@ -0,0 +1,191 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+	layout:decorator="mob/common/layout/MypageLayoutMob">
+<!--
+ *******************************************************************************
+ * @source  : MypageCustDeliveryAddrFormMob.html
+ * @desc    : 마이페이지 > 배송지관리 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.05.03   jsshin      최초 작성
+ *******************************************************************************
+ -->
+<body>
+<th:block layout:fragment="content">
+<main class="container my">
+	<section class="content my_delivery">
+		<div class="inner">
+			<div class="inner wide">
+				<div id="custDeliveryList" class="delivery_list"></div>
+				<div id="nodata" class="nodata" style="display: none;">
+					<div class="txt_box">
+						<p>
+							등록된 배송지가 없습니다.<br/>
+						</p>
+					</div>
+				</div>
+				<div class="inner wide">
+					<div class="btn_group btn_group_flex">
+						<button type="button" class="btn btn_dark" id="btnAdrsaddPop">
+							<span>배송지 추가</span>
+						</button>
+					</div>
+				</div>
+			</div>
+		</div>
+	</section>
+</main>
+<script th:inline="javascript">
+	/*<![CDATA[*/
+
+	var fnCustDeliveryAddList = function () {
+		$.get('/mypage/customer/delivery/addr/list', fnCustDeliveryAddListCallback);
+	}
+
+	var fnCustDeliveryAddListCallback = function (result) {
+		let html = '';
+		if (result.length < 1) {
+			$('#nodata').show();
+		} else {
+			$('#nodata').hide();
+			$.each(result, function (idx, custDeliveryAddr){
+				if (custDeliveryAddr.defaultYn  === 'Y') {
+					html += '<div class="ship_info active">\n';
+				} else {
+					html += '<div class="ship_info">\n';
+				}
+				html +=	'        <dl>\n';
+				html +=	'            <div class="name">\n';
+				html +=	'                <dt><span class="sr-only">배송지명</span></dt>\n';
+				html +=	'                    <dd>\n';
+				html +=	'                       '+custDeliveryAddr.recipNm +'\n';
+				html +=	'                       <div class="badge_wrap">\n';
+				if (custDeliveryAddr.defaultYn  === 'Y') {
+					html += '                       <em class="order_badge">기본배송지</em>\n';
+				}
+				if (custDeliveryAddr.shotDelvUseYn  === 'Y') {
+					html += '                       <em class="order_badge order_bullet_badge">총알배송</em>\n';
+				}
+				html +=	'                       </div>\n';
+				html +=	'                    </dd>\n';
+				html +=	'            </div>\n';
+				html +=	'            <div class="phone">\n';
+				html +=	'                <dt><span class="sr-only">휴대폰 번호</span></dt>\n';
+				html +=	'                <dd>'+custDeliveryAddr.recipPhnno+'</dd>\n';
+				html +=	'            </div>\n';
+				html +=	'            <div class="addr">\n';
+				html +=	'               <dt><span class="sr-only">배송주소</span></dt>\n';
+				html +=	'               <dd>'+custDeliveryAddr.recipBaseAddr + custDeliveryAddr.recipDtlAddr +'</dd>\n';
+				html +=	'            </div>\n';
+				html +=	'            <div class="ship_request">\n';
+				html +=	'                <dl>\n';
+				html +=	'                    <dt>배송요청 사항</dt>\n';
+				html +=	'                    <dd>'+custDeliveryAddr.delvMemo+'</dd>\n';
+				html +=	'                </dl>\n';
+				html +=	'            </div>\n';
+				html +=	'        </dl>\n';
+				html +=	'        <div class="btn_group btn_group_flex">\n';
+				html +=	'            <div>\n';
+				html +=	'                <button type="button" class="btn btn_gost" onclick="fnModiFyCustDelvAddr(\''+custDeliveryAddr.custDelvAddrSq+'\')">\n';
+				html +=	'                    <span>수정</span>\n';
+				html +=	'                </button>\n';
+				html +=	'            </div>\n';
+				html +=	'            <div>\n';
+				html +=	'                <button type="button" class="btn btn_dark" onclick="fnDeleteCustDelvAddr(\''+custDeliveryAddr.custDelvAddrSq+'\')">\n';
+				html +=	'                   <span>삭제</span>\n';
+				html +=	'                </button>\n';
+				html +=	'            </div>\n';
+				html +=	'        </div>\n';
+				html +=	'   </div>\n';
+			});
+		}
+		$('#custDeliveryList').html(html);
+	}
+
+	// 배송지 추가
+	$('#btnAdrsaddPop').on('click', function () {
+		$.ajax( {
+			type		: "POST",
+			url 		: '/common/delvAddrAddPop',
+			dataType 	: 'html',
+			beforeSend : function(xhr, settings) {
+				xhr.setRequestHeader("AJAX"			, "true");
+				xhr.setRequestHeader('Accept'		, 'application/json');
+				xhr.setRequestHeader('Content-Type'	, 'application/json');
+			},
+			success 	: function(result) {
+				$("#adrsAddPop .modal-dialog .modal-content").html(result);
+				$("#adrsAddPop").modal("show");
+			}
+		});
+	});
+
+	var delvAddrSet = function (delvObj) {
+		if(!gagajf.isNull(delvObj.custDelvAddrSq)) {
+			fnCustDeliveryAddList();
+		}
+	};
+
+	var fnModiFyCustDelvAddr = function (custDelvAddrSq) {
+		let params = {}
+		params.custDelvAddrSq = custDelvAddrSq;
+
+		$.ajax( {
+			type		: "POST",
+			url 		: '/common/delvAddrModifyPop',
+			data		: JSON.stringify(params),
+			dataType 	: 'html',
+			beforeSend : function(xhr, settings) {
+				xhr.setRequestHeader("AJAX"			, "true");
+				xhr.setRequestHeader('Accept'		, 'application/json');
+				xhr.setRequestHeader('Content-Type'	, 'application/json');
+			},
+			success 	: function(result) {
+				$("#adrsModifyPop .modal-dialog .modal-content").html(result);
+				$("#adrsModifyPop").modal("show");
+			}
+		});
+	};
+
+	var fnDeleteCustDelvAddr = function (custDelvAddrSq) {
+		let params = {}
+		params.custDelvAddrSq = custDelvAddrSq;
+		let jsonData = JSON.stringify(params);
+		gagajf.ajaxJsonSubmit("/mypage/customer/delivery/addr/delete", jsonData, function (result) {
+			if (result.isSuccess) {
+				fnCustDeliveryAddList();
+			} else {
+				mcxDialog.alert("배송지 삭제를 실패 하였습니다.");
+				return;
+			}
+		})
+	}
+
+
+	$(document).ready(function() {
+
+		$('#htopTitle').text('배송지 관리');
+
+		// 배송목록 조회
+		fnCustDeliveryAddList();
+
+		// $(document).on("scroll",function(){
+		// 	if($(".tabbar").hasClass("fixed")) {
+		// 		$(".my .my_delivery .inner > .btn_group").addClass('active');
+		// 	}else{
+		// 		$(".my .my_delivery .inner > .btn_group").removeClass('active');
+		// 	}
+		// });
+	});
+
+	/*]]>*/
+</script>
+</th:block>
+</body>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/views/web/mypage/MypageCustDeliveryAddrFormWeb.html

@@ -52,7 +52,7 @@
 				<div id="nodata" class="nodata">
 					<div class="txt_box">
 						<p>
-							현재 노출 할 수 있는 데이터가 없습니다.<br>
+							등록된 배송지가 없습니다.<br/>
 						</p>
 					</div>
 				</div>
@@ -65,7 +65,7 @@
 		<!-- // CONT-BODY -->
 	</div>
 </div>
-	<script th:inline="javascript">
+<script th:inline="javascript">
 	/*<![CDATA[*/
 
 	var fnCustDeliveryAddList = function () {

+ 13 - 0
src/main/webapp/ux/mo/css/common_m.css

@@ -1765,6 +1765,19 @@ button.alertCls {-webkit-appearance: none;padding: 0;cursor: pointer;background:
 .modal.pop_fullCol .modal-body .pop_cont{max-height: 100%;}
 .modal.pop_fullCol .modal-body [class^="ui_col_"]{margin: 0;}
 
+
+
+.pop_cont .nodata {padding:8.0rem 0 10.0rem;  text-align:center;}
+.pop_cont .nodata .txt_box {color:#666; font-size:1.6rem; font-weight:300; line-height:2.6rem;}
+.pop_cont .nodata .txt_box::before {content:''; display:block; width:3.6rem; height:4.6rem; margin:0 auto 2.4rem; background:url('/images/mo/ico_content_none.png') no-repeat;}
+.pop_cont .nodata .txt_box span {color:#fd4802; font-weight:500;}
+.pop_cont .nodata .btn_box {margin-top:4.0rem;}
+.pop_cont .nodata .btn_box .btn span {color:#222; font-size:1.4rem; font-weight:300;}
+
+
+
+
+
 .modal::-webkit-scrollbar,.pop_cont::-webkit-scrollbar {width: 2px;}
 .modal::-webkit-scrollbar-thumb,.pop_cont::-webkit-scrollbar-thumb {background-color: #888888;border-radius: 0px;background-clip: padding-box;border: 0px solid transparent;}
 .modal::-webkit-scrollbar-track, .pop_cont::-webkit-scrollbar-track{background-color: #dddddd;border-radius: 0px;}

+ 0 - 6
src/main/webapp/ux/pc/js/common-ui.js

@@ -404,12 +404,6 @@ $(document).ready( function() {
 		return false;
 	});
 
-	// $(".jquery-modal").modal({
-	// 	escapeClose: false,
-	// 	clickClose: false
-	// });
-
-
 	/* 같은 데이터 노출시 동일 영역끼리 병합 */
 	$(".merge_row").each(function() {
 		var txtcont = $(this).text();