Procházet zdrojové kódy

Merge branch 'develop' into bin2107

bin2107 před 5 roky
rodič
revize
f34cac4f95

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

@@ -436,4 +436,19 @@ public class TsaCustomerService {
 		return customerDao.getCustomerFindByCellPhone(customerSearch);
 	}
 
+	/**
+	 * 휴면해제 처리
+	 *
+	 * @param customer - 고객정보
+	 * @return boolean 성공하면 true
+	 * @author jsshin
+	 * @since 2021. 03. 30
+	 */
+	@Transactional("shopTxnManager")
+	public boolean releaseDormantCustomer(Customer customer) {
+		Integer userNo = TsaSession.getInfo().getUserNo();
+		customer.setRegNo(userNo);
+		customer.setUpdNo(userNo);
+		return coreCustomerService.saveDormantCustomerRelease(customer);
+	}
 }

+ 36 - 3
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -608,7 +608,7 @@ public class TsaCustomerController extends TsaBaseController {
 	 *
 	 * @param elementEmail  - 이메일
 	 * @param elementCustNo - 고객일련번호
-	 * @param division - 호출화면구분
+	 * @param elementMaskingEmail - 마스킹 이메일
 	 * @return ModelAndView
 	 * @author jsshin
 	 * @since 2021. 01. 21
@@ -686,8 +686,8 @@ public class TsaCustomerController extends TsaBaseController {
 	/**
 	 * 회원탈퇴처리
 	 *
-	 * @param elementCustNo - 고객일련번호
-	 * @return ModelAndView
+	 * @param customer - 고객일련번호
+	 * @return GagaMap
 	 * @author jsshin
 	 * @since 2021. 01. 21
 	 */
@@ -977,6 +977,39 @@ public class TsaCustomerController extends TsaBaseController {
 		return result;
 	}
 
+	/**
+	 * 휴면해제 처리
+	 * @param  customerCollection - 휴면해제대상목록
+	 * @return GagaMap - 결과
+	 * @author jsshin
+	 * @since 2020. 01. 14
+	 */
+	@PostMapping("/dormant/release")
+	@ResponseBody
+	public GagaMap releaseDormantCustomer(@RequestBody Collection<Customer> customerCollection) {
+		GagaMap result = new GagaMap();
+		int totalCnt = customerCollection.size();
+		int succCnt = 0;
+		int failCnt = 0;
+		for (Customer customer : customerCollection) {
+			try {
+				boolean isRelase = customerService.releaseDormantCustomer(customer);
+				if (isRelase) {
+					succCnt ++;
+				} else {
+					failCnt ++;
+				}
+			} catch (Exception e) {
+				log.error(e.getMessage());
+				failCnt ++;
+			}
+		}
+		result.setInt("totalCnt", totalCnt);
+		result.setInt("succCnt", succCnt);
+		result.setInt("failCnt", failCnt);
+
+		return result;
+	}
 
 
 }

+ 25 - 0
src/main/webapp/WEB-INF/views/customer/CustomerDormantListForm.html

@@ -81,6 +81,9 @@
 			<!-- 리스트 영역 -->
 			<div class="panelStyle">
 				<ul class="panelBar">
+					<li>
+						<button type="button" class="btn btn-danger btn-lg" id="btnRelease">휴면해제</button>
+					</li>
 					<li class="right">
 						검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
 						쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
@@ -113,6 +116,7 @@
 
 	// specify the columns
 	const columnDefs = [
+		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{
 			headerName: "사이트", field:'siteCd', width:100, cellClass: 'text-center',
 			valueGetter: function (params) { return gagaAgGrid.lookupValue(siteList, params.data.siteCd); }
@@ -156,6 +160,27 @@
 		cfnCellPhonnHypen(this);
 	});
 
+	// 휴면해제
+	$('#btnRelease').on('click', function() {
+		var removedData = gagaAgGrid.removeRowData(gridOptions);
+
+		if (removedData.length == 0) {
+			mcxDialog.alert('선택된 행이 없습니다.');
+			return;
+		}
+
+		mcxDialog.alertC('휴면해제하시겠습니까?', {
+			sureBtnText: "확인",
+			sureBtnClick: function() {
+				var jsonData = JSON.stringify(removedData);
+				console.log(jsonData);
+				gagajf.ajaxJsonSubmit('/customer/dormant/release', jsonData, function() {
+					fnSearch();
+				});
+			}
+		});
+	});
+
 	// 유효성 확인
 	var fnValidationCheck = function () {
 		// 입력 값 체크

+ 0 - 123
src/main/webapp/ux/js/admin.common.js

@@ -793,129 +793,6 @@ function cfnDownloadSampleFile(sampleFileId) {
 		});
 }
 
-/**
- * @type   : function
- * @access : public
- * @desc   : SNS 로그인 Init
- * <pre>
- *     cfnSnsLoginInit();
- * </pre>
- * @param  : -
- * @since  : 2020/02/24
- * @author : Daehyoung
- */
-var callback;
-
-function cfnSnsLoginInit(callback, snsType) {
-
-	callback = snsCallback;
-	// 네이버 로그인 init
-	var redirect_uri = "http://locd.admin.pastelmall.com/common/oAuthignin?snsType=NA";
-    var naverInstance = new naver_id_login("OMmbCMu7ac7GgYWgjlhv", redirect_uri);
-    var state = naverInstance.getUniqState();
-
-    naverInstance.setButton("white", 4,40);
-    naverInstance.setState(state);
-    naverInstance.setPopup();
-    naverInstance.init_naver_id_login();
-
-    if(snsType == 'NA'){
-    	naverLogin.getLoginStatus(function (status) {
-    		if (status) {
-    			/* (5) 필수적으로 받아야하는 프로필 정보가 있다면 callback처리 시점에 체크 */
-    			console.log("### INFO naverLogin : ", naverLogin);
-    			var email = naverLogin.user.getEmail();
-    			if( email == undefined || email == null) {
-    				alert("이메일은 필수정보입니다. 정보제공을 동의해주세요.");
-    				/* (5-1) 사용자 정보 재동의를 위하여 다시 네아로 동의페이지로 이동함 */
-    				naverLogin.reprompt();
-    				return;
-    			}
-    			snsCallback(naverLogin.user);
-    		} else {
-    			console.log("로그인에 실패하였습니다.");
-    		}
-    	});
-    }
-
-    // 카카오 로그인 init
-    if(typeof initCheck == "undefined"){
-    	Kakao.init('f435c12d89ddb9cc6337f4cf0a05fd30');
-		initCheck = true;
-	}
-
-}
-
-/**
- * @type   : function
- * @access : public
- * @desc   : 네이버 로그인
- * <pre>
- *     cfnSnsLogin();
- * </pre>
- * @param  : -
- * @since  : 2020/02/24
- * @author : Daehyoung
- */
-function cfnNaverLogin(callback, snsType) {
-
-}
-/**
- * @type   : function
- * @access : public
- * @desc   : 카카오 로그인
- * <pre>
- *     cfnKakaoLogin();
- * </pre>
- * @param  : -
- * @since  : 2020/02/24
- * @author : Daehyoung
- */
-function cfnKakaoLogin() {
-	Kakao.Auth.loginForm({
-		success: function(authObj) {
-			var kakaoToken = authObj.access_token;
-			Kakao.API.request({
-				url: '/v2/user/me',
-				success: function(res) {
-					var param = {};
-					param.email 			= res.kaccount_email;
-					param.id 				= res.id;
-					param.image 		= res.properties.profile_image;
-					param.nickname 	= res.properties.nickname;
-					snsCallback(param);
-				},
-				fail: function(error) {
-					alert(JSON.stringify(error));
-				}
-			});
-		},
-		fail: function(err) {
-			alert(JSON.stringify(err));
-		}
-	});
-}
-/**
- * @type   : function
- * @access : public
- * @desc   : 구글 로그인
- * <pre>
- *     cfnSnsLogin();
- * </pre>
- * @param  : -
- * @since  : 2020/02/24
- * @author : Daehyoung
- */
-function cfnGoogleLogin(googleUser) {
-	var profile = googleUser.getBasicProfile();
-	var param = {};
-	param.email 			= profile.getEmail();
-	param.id 				= profile.getId();
-	param.image 		= profile.getImageUrl();
-	param.nickname	= profile.getName();
-	snsCallback(param);
-}
-
 /**
  * @type   : function
  * @access : public