Преглед на файлове

Merge branch 'jsshin' into develop

jsshin преди 5 години
родител
ревизия
ba0ab92c98

+ 19 - 0
src/main/java/com/style24/admin/biz/dao/TsaCustomerDao.java

@@ -54,6 +54,15 @@ public interface TsaCustomerDao {
 	 */
 	void updateCustomerInfo(Customer customer);
 
+
+	/**
+	 * 회원 휴대전화번호 수정
+	 * @param customer - 고객정보
+	 * @author jsshin
+	 * @since 2021. 01. 25
+	 */
+	void updateCustomerCellPhnno(Customer customer);
+
 	/**
 	 * 회원 주문내역
 	 * @param custNo - 고객번호
@@ -101,6 +110,16 @@ public interface TsaCustomerDao {
 	 */
 	Collection<Coupon> getCustomerCouponList(Integer custNo);
 
+	/**
+	 * 회원상세-포인트
+	 *
+	 * @param custNo -고객일련번호
+	 * @return Point
+	 * @author jsshin
+	 * @since 2021. 01. 25
+	 */
+	Point getCustomerPoint(Integer custNo);
+
 	/**
 	 * 회원상세-포인트내역
 	 *

+ 27 - 0
src/main/java/com/style24/admin/biz/service/TsaCustomerService.java

@@ -89,6 +89,21 @@ public class TsaCustomerService {
 		coreCustomerService.updateCustomerPassword(customer);
 	}
 
+	/**
+	 * 회원 휴대전화번호 수정
+	 * @param customer - 고객정보
+	 * @author jsshin
+	 * @since 2020. 01. 25
+	 */
+	@Transactional("shopTxnManager")
+	public void updateCustomerCellphnno(Customer customer) {
+		Integer userNo = TsaSession.getInfo().getUserNo();
+		customer.setRegNo(userNo);
+		customer.setUpdNo(userNo);
+		coreCustomerService.createCustomerHistory(customer);
+		customerDao.updateCustomerCellPhnno(customer);
+	}
+
 	/**
 	 * 회원 주문내역
 	 * @param custNo - 고객번호
@@ -142,6 +157,18 @@ public class TsaCustomerService {
 		return customerDao.getCustomerCouponList(custNo);
 	}
 
+	/**
+	 * 회원상세-포인트
+	 *
+	 * @param custNo -고객일련번호
+	 * @return Point
+	 * @author jsshin
+	 * @since 2021. 01. 25
+	 */
+	public Point getCustomerPoint(Integer custNo){
+		return customerDao.getCustomerPoint(custNo);
+	}
+
 	/**
 	 * 회원상세-포인트내역
 	 *

+ 37 - 30
src/main/java/com/style24/admin/biz/service/TsaKakaoService.java

@@ -104,6 +104,42 @@ public class TsaKakaoService {
 		}
 	}
 
+	/**
+	 * 인증번호발송
+	 * @param customer - 인증번호 발송
+	 * @author jsshin
+	 * @since 2021. 01. 25
+	 */
+	public void sendCustomerCertNo(Customer customer) {
+		SsgDirectMessage dm = new SsgDirectMessage();
+		dm.setFdestine(customer.getCellPhnno());
+		dm.setFkkoresendtype("LMS");
+
+		GagaMap replaceInfo = new GagaMap();
+		replaceInfo.setString("siteNm", TscConstants.Style24Infomation.SITE_NAME.value());
+		replaceInfo.setString("custNm", customer.getCustNm());
+		replaceInfo.setString("certNo", customer.getCertNo());
+
+		kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.CertNoSend.value(), dm, replaceInfo);
+
+		try {
+			// 고객접촉이력 정보
+			Integer userNo = TsaSession.getInfo().getUserNo();
+			CustContactHst custContactHst = new CustContactHst();
+			custContactHst.setContactType(TscConstants.ContactType.CELLPHONE_AUTHENTICATION.value()); // 접촉유형:회원-휴대전화인증(공통코드G054)
+			custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
+			custContactHst.setContactContents("인증번호");
+			custContactHst.setReceiverNo(customer.getCustNo());
+			custContactHst.setSenderNo(userNo);
+			custContactHst.setRegNo(userNo);
+			custContactHst.setUpdNo(userNo);
+			coreCustomerService.createCustomerContactHistory(custContactHst);
+		} catch (Exception e) {
+			log.error("error", e);
+			// Do nothing
+		}
+	}
+
 //
 //	/**
 //	 * 일대일문의 답변 알림톡 발송
@@ -139,36 +175,7 @@ public class TsaKakaoService {
 //		}
 //	}
 //
-//	/**
-//	 * 인증번호발송
-//	 * @param customer - 인증번호 발송
-//	 * @author jsshin
-//	 * @since 2020. 4. 8
-//	 */
-//	public void sendCustomerCertNo(AdmCustomer customer) {
-//		SsgDirectMessage dm = new SsgDirectMessage();
-//		dm.setFdestine(customer.getCellPhnno());
-//		dm.setFkkoresendtype("LMS");
-//
-//		GagaMap replaceInfo = new GagaMap();
-//		replaceInfo.setString("siteNm", customer.getSiteNm());
-//		replaceInfo.setString("custNm", customer.getCustNm());
-//		replaceInfo.setString("certNo", customer.getCertNo());
-//
-//		kakaoSender.send(SsgKakaoSender.KakaoAnswerSq.CertNoSend.value(), dm, replaceInfo);
-//
-//		try {
-//			// 고객접촉이력 정보
-//			customer.setContactType("209"); // 접촉유형:1:1문의답변(공통코드G054)
-//			customer.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value()); // 접촉방법:알림톡+문자(공통코드G055)
-//			customer.setContactContents("인증번호");
-//			customer.setReceiverId(customer.getCustNo());
-//			customerService.createCustomerContactHistory(customer);
-//		} catch (Exception e) {
-//			log.error("error", e);
-//			// Do nothing
-//		}
-//	}
+
 //
 //	/**
 //	 * 품절에의한 주문취소 안내

+ 71 - 32
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -2,7 +2,9 @@ package com.style24.admin.biz.web;
 
 import java.util.Collection;
 
+import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.security.GagaPasswordEncoder;
+import com.gagaframework.web.util.GagaStringUtil;
 import com.style24.admin.biz.service.TsaCustomerService;
 import com.style24.admin.biz.service.TsaKakaoService;
 import com.style24.admin.biz.service.TsaSystemService;
@@ -500,6 +502,32 @@ public class TsaCustomerController extends TsaBaseController {
 		return super.ok(message.getMessage("SUCC_0005"));
 	}
 
+	/**
+	 * 메시지 발송 팝업 화면
+	 *
+	 * @param elementCellPhnno - 휴대폰
+	 * @param elementCustNo - 고객일련번호
+	 * @return ModelAndView
+	 * @author jsshin
+	 * @since 2021. 01. 25
+	 */
+	@GetMapping("/cellphone/change/popup/form")
+	public ModelAndView cellphoneChangePopupForm(@RequestParam(value = "elementCellPhnno", required = false) String elementCellPhnno
+			, @RequestParam(value = "elementCustNo") String elementCustNo) {
+		ModelAndView mav = new ModelAndView();
+		// 휴대폰 번호
+		mav.addObject("elementCellPhnno", elementCellPhnno);
+
+		// 고객 아이디
+		mav.addObject("elementCustNo", elementCustNo);
+
+		mav.addObject("callBack", TscConstants.CALLCENTER_TEL_NO);
+
+		mav.setViewName("customer/CellphoneChangePopupForm");
+
+		return mav;
+	}
+
 	/**
 	 * 인증번호 발송
 	 *
@@ -511,21 +539,25 @@ public class TsaCustomerController extends TsaBaseController {
 	@PostMapping("/certno/send")
 	@ResponseBody
 	public GagaResponse sendCustomerCertNo(@RequestBody Customer customer) {
-//		String certNo = GagaStringUtil.getRandomNumber(6);
-//		TsaSession.setAttribute("certNo", certNo);
-//		customer.setCertNo(certNo);
-//		log.info("certNo {}", certNo);
-//
-//		// 카카오알림톡 발송(카카오 템플릿 문구검수 후 변경 해야함)
-//		// 광고가 아니므로 SMS수신동의여부 체크할 필요 없음. 무조건 발송해야 함
-//		if (StringUtils.isNotBlank(customer.getCellPhnno())) {
-//			try {
-//				kakaoService.sendCustomerCertNo(customer);
-//			} catch (Exception e) {
-//				log.error(e.getMessage());
-//			}
-//
-//		}
+		String certNo = GagaStringUtil.getRandomNumber(6);
+		TsaSession.setAttribute("certNo", certNo);
+		TsaSession.setAttribute("cellPhnno", customer.getCellPhnno());
+
+		Customer custInfo = customerService.getCustomerInfo(customer.getCustNo());
+		customer.setCustNm(custInfo.getCustNm());
+		customer.setCertNo(certNo);
+		log.info("certNo {}", certNo);
+
+		// 카카오알림톡 발송(카카오 템플릿 문구검수 후 변경 해야함)
+		// 광고가 아니므로 SMS수신동의여부 체크할 필요 없음. 무조건 발송해야 함
+		if (StringUtils.isNotBlank(customer.getCellPhnno())) {
+			try {
+				kakaoService.sendCustomerCertNo(customer);
+			} catch (Exception e) {
+				log.error(e.getMessage());
+			}
+
+		}
 
 		return super.ok(message.getMessage("SUCC_0005"));
 	}
@@ -534,21 +566,28 @@ public class TsaCustomerController extends TsaBaseController {
 	 * 인증번호 확인
 	 *
 	 * @param customer -고객정보
-	 * @return Customer
+	 * @return GagaMap
 	 * @author jsshin
-	 * @since 2021. 01. 21
+	 * @since 2021. 01. 25
 	 */
 	@PostMapping("/certno/confirm")
 	@ResponseBody
-	public Customer confirmCustomerCertNo(@RequestBody Customer customer) {
-		Customer custResult = new Customer();
-//		String certNo = TsaSession.getAttribute("certNo");
-//		String result = "N";
-//		if (certNo.equals(customer.getCrtfdNo())) {
-//			result = "Y";
-//		}
-//		custResult.setCrtfdNoYn(result);
-		return custResult;
+	public GagaMap confirmCustomerCertNo(@RequestBody Customer customer) {
+		String certNo = TsaSession.getAttribute("certNo");
+		String cellPhnno = TsaSession.getAttribute("cellPhnno");
+		String crtfdNoYn = "N";
+
+		if (certNo.equals(customer.getCertNo())) {
+			customer.setCellPhnno(cellPhnno);
+			if (StringUtils.isNotBlank(cellPhnno)) {
+				customerService.updateCustomerCellphnno(customer);
+			}
+			crtfdNoYn = "Y";
+		}
+
+		GagaMap result = new GagaMap();
+		result.setString("crtfdNoYn", crtfdNoYn);
+		return result;
 	}
 
 	/**
@@ -668,15 +707,15 @@ public class TsaCustomerController extends TsaBaseController {
 	 * 회원상세-포인트
 	 *
 	 * @param custNo -고객일련번호
-	 * @return TsaPoint
+	 * @return Point
 	 * @author jsshin
 	 * @since 2021. 01. 21
 	 */
-	//	@GetMapping("/point/{custNo}")
-	//	@ResponseBody
-	//	public Point getCustomerPoint(@PathVariable Integer custNo) {
-	//		return customerService.getCustomerPoint(custNo);
-	//	}
+	@GetMapping("/point/{custNo}")
+	@ResponseBody
+	public Point getCustomerPoint(@PathVariable Integer custNo) {
+		return customerService.getCustomerPoint(custNo);
+	}
 
 	/**
 	 * 회원상세-포인트내역

+ 72 - 9
src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml

@@ -208,9 +208,6 @@
 		    <if test="birthYmd != null and birthYmd != ''">
 		     BIRTH_YMD = REPLACE(#{birthYmd}, '-', ''),
 		    </if>
-		    <if test="cellPhnno != null and cellPhnno != ''">
-		     CELL_PHNNO = #{cellPhnno},
-		    </if>
 		    <if test="email != null and email != ''">
 		     EMAIL = #{email},
 		    </if>
@@ -234,6 +231,16 @@
 		WHERE CUST_NO = #{custNo}
 	</update>
 
+	<!-- 회원 휴대전화번호 수정 -->
+	<update id="updateCustomerCellPhnno" parameterType="Customer">
+		/* TsaCustomer.updateCustomerCellPhnno */
+		UPDATE TB_CUSTOMER
+		SET    CELL_PHNNO = #{cellPhnno}
+		     , UPD_NO = #{updNo}
+		     , UPD_DT = NOW()
+		WHERE  CUST_NO = #{custNo}
+	</update>
+
 	<!-- 회원 주문내역 -->
 	<select id="getCustomerOrderList" parameterType="Integer" resultType="Order">
 		/* TsaCustomer.getCustomerOrderList */
@@ -317,7 +324,8 @@
 	<update id="saveCustomerDeliveryAddr" parameterType="Delivery">
 		/* TsaCustomer.saveCustomerDeliveryAddr */
 		INSERT INTO TB_CUST_DELIVERY_ADDR (
-		       CUST_NO
+		       CUST_DELV_ADDR_SQ
+		     , CUST_NO
 		     , DELV_ADDR_NM
 		     , DEFAULT_YN
 		     , RECIP_NM
@@ -334,7 +342,8 @@
 		     , UPD_DT
 		)
 		VALUES (
-		       #{custNo}
+		       #{custDelvAddrSq}
+		     , #{custNo}
 		     , #{delvAddrNm}
 		     , IFNULL(#{defaultYn}, 'N')
 		     , #{recipNm}
@@ -426,13 +435,67 @@
 		ORDER BY E.ORD_NO DESC, CC.REG_DT DESC
 	</select>
 
+	<select id="getCustomerPoint" parameterType="Integer" resultType="Point">
+		/* TsaCustomer.getCustomerPoint */
+		SELECT IFNULL((
+		               SELECT SUM(RM_PNT_AMT)
+		               FROM  TB_CUST_POINT
+		               WHERE CUST_NO = C.CUST_NO
+		               AND   EXP_CMP_DT IS NULL
+		               ), 0)                           AS RM_PNT_AMT -- 가용포인트
+		     , IFNULL((
+		                SELECT SUM(GV_PNT_AMT)
+		                FROM   TB_CUST_POINT
+		                WHERE  CUST_NO = C.CUST_NO
+		               ), 0)                           AS GV_PNT_AMT -- 누적포인트
+		     , IFNULL((
+		                SELECT SUM(US_PNT_AMT)
+		                FROM  TB_CUST_POINT
+		                WHERE CUST_NO = C.CUST_NO
+		               ), 0)                           AS US_PNT_AMT -- 사용포인트
+		     , IFNULL((
+		                SELECT SUM(RM_PNT_AMT)
+		                FROM  TB_CUST_POINT
+		                WHERE CUST_NO = C.CUST_NO
+		                AND   EXP_CMP_DT IS NOT NULL
+		               ), 0)                           AS EXPIRE_PNT_AMT -- 소멸포인트
+		     , IFNULL((
+		               SELECT SUM(A.PNT_AMT + B.PNT_AMT) AS PNT_AMT
+		               FROM (
+		                     SELECT SUM(PNT_AMT) AS PNT_AMT
+		                          , ORD_NO
+		                     FROM   TB_CUST_POINT_HST
+		                     WHERE  OCCUR_GB = 'G069_12' -- 적립예정
+		                     AND    CUST_NO = #{custNo}
+		                     GROUP BY ORD_NO
+		                    ) A
+		                 , (
+		                    SELECT SUM(PNT_AMT) AS PNT_AMT
+		                         , ORD_NO
+		                    FROM TB_CUST_POINT_HST
+		                    WHERE OCCUR_GB = 'G069_13' -- 적립예정취소
+		                    AND   CUST_NO = #{custNo}
+		                    GROUP BY ORD_NO
+		                    ) B
+		               WHERE A.ORD_NO = B.ORD_NO
+		               ), 0)                           AS EXPECTED_PNT_AMT -- 적립예정포인트
+		     , IFNULL((
+		               SELECT SUM(RM_PNT_AMT) AS RM_PNT_AMT
+		               FROM  TB_CUST_POINT
+		               WHERE EXP_BE_DT >= NOW()
+		               AND   EXP_BE_DT <![CDATA[<]]> DATE_ADD(NOW(),INTERVAL 31 DAY)
+		                ), 0)                          AS EXPECTED_EXPIRE_PNT_AMT -- 소멸예정포인트(30일)
+		FROM   TB_CUSTOMER C
+		WHERE  C.CUST_NO = #{custNo}
+	</select>
+
 
 	<!--회원 포인트내역  -->
 	<select id="getCustomerPointList" parameterType="Integer" resultType="Point">
 		/* TsaCustomer.getCustomerPointList */
 		SELECT CC.*
 		FROM (
-		      SELECT DATE_FORMAT(CASE WHEN CPH.PNT_UPLOAD_STAT = '30'
+		      SELECT DATE_FORMAT(CASE WHEN CPH.PNT_UPLOAD_STAT = 'G070_30'
 		                              THEN CPH.PNT_UPLOAD_DT
 		                          ELSE CPH.REG_DT END, '%Y-%m-%d' ) AS DT
 		           , CPH.PNT_HST_SQ
@@ -482,7 +545,7 @@
 	<select id="getCustomerReviewList" parameterType="Integer" resultType="Review">
 		/* TsaCustomer.getCustomerReviewList */
 		SELECT CASE WHEN REVIEW_GB = 'P'
-		            THEN '[포토]'||R.REVIEW_TITLE
+		            THEN '[포토/동영상]'||R.REVIEW_TITLE
 		            ELSE R.REVIEW_TITLE
 		       END                          AS REVIEW_TITLE
 		     , R.REVIEW_SQ
@@ -508,9 +571,9 @@
 		     , R.CONFIRM_YN
 		     , FN_GET_USER_NM(R.CONFIRM_UNO)             AS CONFIRM_UNM
 		     , DATE_FORMAT(R.CONFIRM_DT, '%Y%m%d%H%i%S') AS CONFIRM_DT
-		     , FN_GET_USER_NM(R.REG_NO) AS REG_NM
+		     , R.REG_NO
 		     , R.REG_DT
-		     , FN_GET_USER_NM(R.UPD_NO) AS UPD_NM
+		     , R.UPD_NO
 		     , R.UPD_DT
 		     , R.ADM_RPL
 		     , R.ADM_RPL_REG_NO

+ 135 - 0
src/main/webapp/WEB-INF/views/customer/CellphoneChangePopupForm.html

@@ -0,0 +1,135 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : CellphoneChangePopupForm.html
+ * @desc    : 휴대폰번호변경팝업 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.01.25   jsshin     최초 작성
+ *******************************************************************************
+ -->
+<div class="modalPopup" data-width="800">
+	<div class="panelStyle">
+		<!-- TITLE -->
+		<div class="panelTitle">
+			<strong >휴대전화번호변경팝업</strong>
+			<button type="button" class="close" onclick="uifnPopupClose('popupCellphoneForm')"><em class="fa fa-times"></em></button>
+		</div>
+		<!-- //TITLE -->
+		<!-- CONTENT -->
+		<div class="panelContent">
+			<div class="panelStyle">
+				<form id="cellPhoneForm" name="cellPhoneForm">
+					<input type="hidden" id="custNo" name="custNo">
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width:1%"/>
+							<col style="width:40%"/>
+						</colgroup>
+						<tbody>
+						<tr>
+							<span class="infoTxt cBlue"><i class="fa fa-info-circle"></i>인증번호 확인 후 번호변경가능 </span>
+							<span class="infoTxt cBlue"><i class="fa fa-info-circle"></i>변경 할 휴대폰번호 입력 후 전송</span> <br/>
+							<span class="infoTxt cBlue"><i class="fa fa-info-circle"></i>인증번호는 6자리 입니다.</span><br/>
+							<th>기존휴대전화번호<em class="star"></em></th>
+							<td>
+								<input type="text" class="w150" name="orgCellPhone" maxlength="13" readonly="readonly"/>
+							</td>
+							<th>변경할휴대전화번호<em class="star"></em></th>
+							<td>
+								<input type="text" class="w150" name="cellPhnno" required="required" maxlength="13" data-valid-name="휴대전화번호" />
+							</td>
+						</tr>
+						<tr id="trCertNo" style="display: none">
+							<th>인증번호</th>
+							<td>
+								<input type="text" class="w200" name="certNo" placeholder="인증번호 입력" style="display:none;">
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</form>
+			</div>
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" id="btnSendCustCrtfdNo" class="btn btn-success btn-lg" >인증번호발송</button>
+					<button type="button" id="btnCustCertNo" class="btn btn-success btn-lg" style="display: none">인증번호확인</button>
+				</li>
+			</ul>
+		</div>
+		<!-- //CONTENT -->
+	</div>
+</div>
+<script th:inline="javascript">
+	/*<![CDATA[*/
+	const elementCellPhnno = [[${elementCellPhnno}]];
+	const elementCustNo = [[${elementCustNo}]];
+
+
+	// 인증번호 전송
+	$('#btnSendCustCrtfdNo').on('click', function () {
+		//휴대폰번호
+		if (!gagajf.validation('#cellPhoneForm'))
+			return false;
+
+		mcxDialog.confirm("인증번호를 전송 하시겠습니까?", {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function () {
+				let jsonData = JSON.stringify($('#cellPhoneForm').serializeObject());
+				gagajf.ajaxJsonSubmit('/customer/certno/send', jsonData, function () {
+					$('#cellPhoneForm input[name=certNo]').val('');
+					$('#cellPhoneForm input[name=certNo]').show();
+					$('#trCertNo').show();
+					$('#btnCustCertNo').show();
+				});
+			}
+		});
+	});
+
+	// 인증확인버튼
+	$('#btnCustCertNo').on('click', function () {
+		let jsonData = JSON.stringify($('#cellPhoneForm').serializeObject());
+		gagajf.ajaxJsonSubmit('/customer/certno/confirm', jsonData, fnCertificationResult);
+	});
+
+	// 인증확인 콜백
+	var fnCertificationResult = function (data) {
+		if (data.crtfdNoYn === 'Y') {
+			mcxDialog.confirm("휴대전화 번호가 정상적으로 변경 되었습니다.", {
+				cancelBtnText: "취소",
+				sureBtnText: "확인",
+				sureBtnClick: function () {
+					uifnPopupClose('popupCellphoneForm');
+					fnSearchCustInfo();
+				}
+			});
+		} else {
+			mcxDialog.alert("인증번호가 일치하지 않습니다.\n확인 후 다시 입력해 주세요.");
+		}
+	};
+
+	// 데이터 셋팅
+	var fnInitDataSet = function () {
+		$('#cellPhoneForm input[name=orgCellPhone]').val($(elementCellPhnno).val());
+		$('#cellPhoneForm input[name=custNo]').val($(elementCustNo).val());
+	}
+
+	// 휴대폰 자동 하이픈
+	$('#cellPhoneForm input[name=cellPhnno]').on('input keyup keydown paste change', function () {
+		cfnCellPhonnHypen(this);
+	});
+
+	$(document).ready(function() {
+		fnInitDataSet();
+	});
+
+	/*]]>*/
+</script>
+</html>

+ 78 - 42
src/main/webapp/WEB-INF/views/customer/CustomerDetailForm.html

@@ -242,6 +242,7 @@
 						<!-- TAB3 PANELSTYLE -->
 						<div class="panelStyle">
 							<form id="custAddrForm" name="custAddrForm" action="#" method="post">
+								<input type="hidden" name="custDelvAddrSq"/>
 								<input type="hidden" name="custNo" th:value="${custNo}"/>
 								<h4>배송지정보</h4>
 								<div id="custAddrList" class="ag-theme-balham" style="width: 100%; height: 300px;" ></div>
@@ -334,9 +335,6 @@
 							<h4>쿠폰 내역</h4>
 							<div id="custCouponList" class="ag-theme-balham" style="width: 100%; height: 510px;" ></div>
 							<ul class="panelBar">
-								<li class="left">
-									<button type="button" id="btnCustCouponDelete" class="btn btn-danger btn-lg">쿠폰삭제</button>
-								</li>
 								<li class="right">
 									<button type="button" id="btnCustCouponCreate" class="btn btn-info btn-lg" >쿠폰발급</button>
 								</li>
@@ -350,20 +348,23 @@
 					<li id="tab5" class="tab">
 						<!-- TAB5 PANELSTYLE -->
 						<div class="panelStyle">
+							<form id="custPointForm" name="custPointForm" action="#" method="post">
 							<h4>포인트 내역</h4>
 							<table class="tableStyle">
 								<colgroup>
+									<col style="width:15%;"/>
+									<col style="width:15%;"/>
+									<col style="width:15%;"/>
 									<col style="width:20%;"/>
 									<col style="width:20%;"/>
-									<col style="width:20%;"/>
-									<col style="width:20%;"/>
-									<col style="width:20%;"/>
+									<col style="width:25%;"/>
 								</colgroup>
 								<tbody>
 								<tr>
 									<th>가용포인트</th>
-									<th>누적 포인트</th>
+									<th>누적포인트</th>
 									<th>사용포인트</th>
+									<th>소멸포인트</th>
 									<th>적립예정포인트</th>
 									<th>소멸예정포인트(30일)</th>
 								</tr>
@@ -371,6 +372,7 @@
 									<td name="availPntAmt">0 P</td>
 									<td name="accumPntAmt">0 P</td>
 									<td name="usePntAmt">0 P</td>
+									<td name="expirePntAmt">0 P</td>
 									<td name="expectedPntAmt">0 P</td>
 									<td name="expectedExpirePntAmt">0 P</td>
 								</tr>
@@ -383,6 +385,7 @@
 									<button type="button" id="btnCustPointCreate" class="btn btn-info btn-lg">포인트부여</button>
 								</li>
 							</ul>
+							</form>
 						</div>
 						<!-- //TAB5 PANELSTYLE -->
 					</li>
@@ -905,6 +908,18 @@
 		cfnOpenLmsPopup(param);
 	});
 
+	// 기본정보 -  번호변경
+	$('#btnCustCrtfd').on('click', function () {
+		if (!fnCheckValidationPhnno('#custInfoForm')) {
+			return false;
+		}
+		let elementCellPhnno = '#custInfoForm input[name=cellPhnno]';
+		let elementCustNo = '#custInfoForm input[name=custNo]';
+
+		const actionUrl = '/customer/cellphone/change/popup/form?elementCellPhnno=' + encodeURIComponent(elementCellPhnno)
+						+ '&elementCustNo=' + encodeURIComponent(elementCustNo)
+		cfnOpenModalPopup(actionUrl, 'popupCellphoneForm');
+	});
 
 	// 기본정보 - 이메일발송 버튼
 	$('#btnCustSendEmail').on('click', function () {
@@ -970,6 +985,7 @@
 		$('#custAddrForm input[name=custDelvAddrSq]').val('');
 		$('#custAddrForm input[name=recipPhnno]').val('');
 		$('#custAddrForm input[name=recipTelno]').val('');
+		fnDisplayDeliveryCheckBox('N', 'N');
 	});
 
 	// 배송지정보 - 저장버튼
@@ -1039,7 +1055,6 @@
 	});
 
 
-
 	// 회원접촉이력 저장
 	$('#btnSaveContact').on('click', function () {
 		if (!gagajf.validation('#custContactHstForm')) {
@@ -1119,12 +1134,7 @@
 			$('#custAddrForm input[name=recipBaseAddr]').val(event.data.recipBaseAddr);
 			$('#custAddrForm input[name=recipDtlAddr]').val(event.data.recipDtlAddr);
 
-			let defaultYn = event.data.defaultYn === 'Y' ? true : false;
-			let delYn = event.data.delYn === 'Y' ? true : false;
-
-			$('#custAddrForm input:checkbox[name=defaultYn]').prop('checked', defaultYn);
-			$('#custAddrForm input:checkbox[name=delYn]').prop('checked', delYn);
-
+			fnDisplayDeliveryCheckBox(event.data.defaultYn, event.data.delYn);
 		}
 	};
 
@@ -1176,16 +1186,11 @@
 		gagaAgGrid.fetch(actionUrl, gridOrderOptions);
 	};
 
-	//	1:1문의 내역 조회
-	var fnSearchCounsel = function () {
-		const actionUrl = "/customer/counsel/list/" + custNo;
-		gagaAgGrid.fetch(actionUrl, gridCounselOptions);
-	};
-
-	//	상품문의 내역 조회
-	var fnSearchGoodsQna = function () {
-		const actionUrl = "/customer/goodsQna/list/" + custNo;
-		gagaAgGrid.fetch(actionUrl, gridGoodsQnaOptions);
+	// 배송지 조회
+	var fnSearchDelivery = function () {
+		const actionUrl = "/customer/delivery/list/" + custNo;
+		gagaAgGrid.fetch(actionUrl, gridAddrOptions);
+		$('#btnCustAddrNew').trigger('click');
 	};
 
 	//	쿠폰내역 조회
@@ -1199,11 +1204,12 @@
 		$.get('/customer/point/' + custNo
 			, function (data) {
 				if (!gagajf.isNull(data)) {
-					$('#custPoint td[name=availPntAmt]').text(data.availPntAmt.addComma() + ' P');
-					$('#custPoint td[name=accumPntAmt]').text(data.accumPntAmt.addComma() + ' P');
-					$('#custPoint td[name=usePntAmt]').text(data.usePntAmt.addComma() + ' P');
-					$('#custPoint td[name=expectedPntAmt]').text(data.expectedPntAmt.addComma() + ' P');
-					$('#custPoint td[name=expectedExpirePntAmt]').text(data.expirePntAmt.addComma() + ' P');
+					$('#custPointForm td[name=availPntAmt]').text(data.rmPntAmt.addComma() + ' P');
+					$('#custPointForm td[name=accumPntAmt]').text(data.gvPntAmt.addComma() + ' P');
+					$('#custPointForm td[name=usePntAmt]').text(data.usPntAmt.addComma() + ' P');
+					$('#custPointForm td[name=expirePntAmt]').text(data.expirePntAmt.addComma() + ' P');
+					$('#custPointForm td[name=expectedPntAmt]').text(data.expectedPntAmt.addComma() + ' P');
+					$('#custPointForm td[name=expectedExpirePntAmt]').text(data.expectedExpirePntAmt.addComma() + ' P');
 				}
 			});
 		const actionUrl = "/customer/point/list/" + custNo;
@@ -1222,29 +1228,31 @@
 		gagaAgGrid.fetch(actionUrl, gridReviewOptions);
 	};
 
-	// 회원등급변경이력 조회
-	var fnSearchChangeGrade = function () {
-		const actionUrl = "/customer/change/grade/list/" + custNo;
-		gagaAgGrid.fetch(actionUrl, gridGradeOptions);
+	//	1:1문의 내역 조회
+	var fnSearchCounsel = function () {
+		const actionUrl = "/customer/counsel/list/" + custNo;
+		gagaAgGrid.fetch(actionUrl, gridCounselOptions);
 	};
 
-	// 주소정보 조회
-	var fnSearchDelivery = function () {
-		const actionUrl = "/customer/delivery/list/" + custNo;
-		gagaAgGrid.fetch(actionUrl, gridAddrOptions);
-		$('#btnCustAddrNew').trigger('click');
+	//	상품문의 내역 조회
+	var fnSearchGoodsQna = function () {
+		const actionUrl = "/customer/goodsQna/list/" + custNo;
+		gagaAgGrid.fetch(actionUrl, gridGoodsQnaOptions);
 	};
 
 	// 회원접촉이력 조회
 	var fnSearchContact = function () {
-		$('#custContactHstForm select[name=contactType]').val('');
-		$('#custContactHstForm select[name=contactMethod]').val('');
-		$('#custContactHstForm textarea[name=contactContents]').val('');
-
+		$('#custContactHstForm')[0].reset();
 		const actionUrl = "/customer/contact/list/" + custNo;
 		gagaAgGrid.fetch(actionUrl, gridContactOptions);
 	};
 
+	// 회원등급변경이력 조회
+	var fnSearchChangeGrade = function () {
+		const actionUrl = "/customer/change/grade/list/" + custNo;
+		gagaAgGrid.fetch(actionUrl, gridGradeOptions);
+	};
+
 
 	/**
 	 * DAUM을 이용한 우편번호 팝업 레이어
@@ -1434,8 +1442,36 @@
 			yearRange: (currentYear - 100) + ' : ' + (currentYear - 14),
 			defaultDate: $birthYmd.val()
 		});
+	};
+
+	// 배송지 기본,삭제 체크박스 설정
+	var fnDisplayDeliveryCheckBox = function (defaultYn, delYn) {
+		let $defaultYn = $('#custAddrForm input:checkbox[name=defaultYn]');
+		let $delYn = $('#custAddrForm input:checkbox[name=delYn]');
+		let defaultBoolean;
+		let delBoolean;
+
+		if (defaultYn === 'Y') {
+			defaultBoolean = true;
+			$defaultYn.parent().addClass('checked');
+		} else {
+			defaultBoolean = false;
+			$defaultYn.parent().removeClass('checked');
+		}
+
+		if (delYn === 'Y') {
+			delBoolean = true;
+			$delYn.parent().addClass('checked');
+		} else {
+			delBoolean = false;
+			$delYn.parent().removeClass('checked');
+		}
+
+		$defaultYn.prop('checked', defaultBoolean);
+		$delYn.prop('checked', delBoolean);
 	}
 
+
 	$('#btnLogin').on('click', function () {
 		let custId = $('span[name=custId]').text();
 		const actionUrl = _frontUrl + '/customer/front/login?custId=' + custId;

+ 38 - 46
src/main/webapp/WEB-INF/views/customer/EmailPopupForm.html

@@ -14,7 +14,7 @@
  * 1.0  2021.01.21   jsshin     최초 작성
  *******************************************************************************
  -->
-<div class="modalPopup" id="popupEmailForm" data-width="800">
+<div class="modalPopup" data-width="800">
 	<div class="panelStyle">
 		<!-- TITLE -->
 		<div class="panelTitle">
@@ -24,51 +24,43 @@
 		<!-- //TITLE -->
 		<!-- CONTENT -->
 		<div class="panelContent">
-			<div class="tabs">
-				<!-- TABS CONTENT -->
-				<ul class="tabsCont">
-					<li class="tab on" id="tab1">
-						<div class="panelStyle">
-							<form id="emailForm" name="emailForm">
-								<input type="hidden" name="sendEmail" th:value="${sendEmail}"/>
-								<input type="hidden" name="email"/>
-								<table class="frmStyle">
-									<colgroup>
-										<col style="width:1%"/>
-										<col style="width:40%"/>
-									</colgroup>
-									<tbody>
-									<tr >
-										<th>보내는사람</th>
-										<td>
-											<span name="sendEmail" th:text="${sendEmail}"></span>
-										</td>
-									</tr>
-									<tr>
-										<th>받는사람</th>
-										<td>
-											<span name="email"></span>
-										</td>
-									</tr>
-									<tr>
-										<th>제목<em class="star"></em></th>
-										<td>
-											<input type="text" class="w150" name="title" value="" required="required" data-valid-name="제목"/>
-										</td>
-									</tr>
-									<tr>
-										<th>내용<em class="star"></em></th>
-										<td>
-											<textarea class="textareaR4" style="resize: none;" name ="content" ></textarea>
-										</td>
-									</tr>
-									</tbody>
-								</table>
-							</form>
-						</div>
-					</li>
-				</ul>
-				<!-- //TABS CONTENT -->
+			<div class="panelStyle">
+				<form id="emailForm" name="emailForm">
+					<input type="hidden" name="sendEmail" th:value="${sendEmail}"/>
+					<input type="hidden" name="email"/>
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width:1%"/>
+							<col style="width:40%"/>
+						</colgroup>
+						<tbody>
+						<tr >
+							<th>보내는사람</th>
+							<td>
+								<span name="sendEmail" th:text="${sendEmail}"></span>
+							</td>
+						</tr>
+						<tr>
+							<th>받는사람</th>
+							<td>
+								<span name="email"></span>
+							</td>
+						</tr>
+						<tr>
+							<th>제목<em class="star"></em></th>
+							<td>
+								<input type="text" class="w150" name="title" value="" required="required" data-valid-name="제목"/>
+							</td>
+						</tr>
+						<tr>
+							<th>내용<em class="star"></em></th>
+							<td>
+								<textarea class="textareaR4" style="resize: none;" name ="content" ></textarea>
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</form>
 			</div>
 			<ul class="panelBar">
 				<li class="right">

+ 31 - 47
src/main/webapp/WEB-INF/views/customer/LmsPopupForm.html

@@ -14,7 +14,7 @@
  * 1.0  2021.01.21   jsshin     최초 작성
  *******************************************************************************
  -->
-<div class="modelessPopup draggable" data-width="634">
+<div class="modalPopup" data-width="800">
 	<div class="panelStyle">
 		<!-- TITLE -->
 		<div class="panelTitle">
@@ -24,52 +24,36 @@
 		<!-- //TITLE -->
 		<!-- CONTENT -->
 		<div class="panelContent">
-			<div class="tabs">
-				<div class="tabsNav">
-					<ul >
-						<li class="on"><a href="#tab1">LMS 발송</a></li>
-					</ul>
-				</div>
-				<!-- //TABS NAVI -->
-				<!-- TABS CONTENT -->
-				<ul class="tabsCont">
-					<!-- LMS 발송 -->
-					<li class="tab on" id="tab1">
-						<div class="panelStyle">
-							<form id="lmsForm" name="lmsForm">
-								<table class="frmStyle">
-									<colgroup>
-										<col style="width:1%"/>
-										<col style="width:40%"/>
-									</colgroup>
-									<tbody>
-									<tr >
-										<th>수신자번호 <em class="star"></em></th>
-										<td>
-											<input type="text" class="w150" name="cellPhnno" data-valid-name="수신번호"  required="required"  maxlength="13"/>
-										</td>
-									</tr>
-									<tr>
-										<th>발신자번호<em class="star"></em></th>
-										<td>
-											<input type="text" class="w150" name="callBack" th:value="${callBack}" maxlength="11" readonly="readonly"/>
-										</td>
-									<tr>
-										<th>메시지<em class="star"></em></th>
-										<td>
-											<textarea class="textareaR4"  style="resize: none;" name ="content" ></textarea>
-											<span name="count">0</span> / 2000 byte
-										</td>
-									</tr>
-									</tr>
-									</tbody>
-								</table>
-							</form>
-						</div>
-					</li>
-					<!-- //LMS발송 -->
-				</ul>
-				<!-- //TAB CONTENT -->
+			<div class="panelStyle">
+				<form id="lmsForm" name="lmsForm">
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width:1%"/>
+							<col style="width:40%"/>
+						</colgroup>
+						<tbody>
+						<tr >
+							<th>수신자번호 <em class="star"></em></th>
+							<td>
+								<input type="text" class="w150" name="cellPhnno" data-valid-name="수신번호"  required="required"  maxlength="13"/>
+							</td>
+						</tr>
+						<tr>
+							<th>발신자번호<em class="star"></em></th>
+							<td>
+								<input type="text" class="w150" name="callBack" th:value="${callBack}" maxlength="11" readonly="readonly"/>
+							</td>
+						</tr>
+						<tr>
+							<th>메시지<em class="star"></em></th>
+							<td>
+								<textarea class="textareaR4"  style="resize: none;" name ="content" ></textarea>
+								<span name="count">0</span> / 2000 byte
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</form>
 			</div>
 			<ul class="panelBar">
 				<li class="right">