|
|
@@ -118,7 +118,7 @@ public class TsfCustomerService {
|
|
|
* @author jsshin
|
|
|
* @since 2021. 02. 15
|
|
|
*/
|
|
|
- public boolean getCustomerFindByCustId(String custId) {
|
|
|
+ public boolean getCustomerFindByCustIdCount(String custId) {
|
|
|
Customer customer = new Customer();
|
|
|
customer.setCustId(custId);
|
|
|
customer.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
@@ -136,7 +136,7 @@ public class TsfCustomerService {
|
|
|
* @author jsshin
|
|
|
* @since 2021. 02. 15
|
|
|
*/
|
|
|
- public boolean getCustomerFindByEmail(String email) {
|
|
|
+ public boolean getCustomerFindByEmailCount(String email) {
|
|
|
Customer customer = new Customer();
|
|
|
customer.setEmail(email);
|
|
|
customer.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
@@ -284,7 +284,6 @@ public class TsfCustomerService {
|
|
|
boolean isJoin = true;
|
|
|
customer.setEncodedPasswd(" ");
|
|
|
customer.setCustId(customer.getSnsType()+"_"+customer.getSnsId());
|
|
|
- customer.setEncodedPasswd(passwordEncoder.encode(customer.getPasswd()));
|
|
|
customer.encryptData();
|
|
|
|
|
|
String gender = "G007_"+customer.getSexGb();
|
|
|
@@ -350,17 +349,19 @@ public class TsfCustomerService {
|
|
|
custInfo = getCustomerFindByCi(custSnsInfo.getCi());
|
|
|
|
|
|
if (custInfo != null) { // 2-1. 고객정보 있는경우
|
|
|
+
|
|
|
if (TscConstants.CustStat.SECEDE.value().equals(custInfo.getCustStat())) {
|
|
|
resultMap.setString("custStat", "SECEDE_CUST"); // 탈퇴 회원
|
|
|
return resultMap;
|
|
|
}
|
|
|
+
|
|
|
if (TscConstants.CustStat.DORMANT.value().equals(custInfo.getCustStat())) {
|
|
|
resultMap.setString("custStat", "DORMANT_CUST"); // 휴면 회원
|
|
|
return resultMap;
|
|
|
}
|
|
|
- if (TscConstants.CustStat.ACTIVE.value().equals(custInfo.getCustStat())) {
|
|
|
|
|
|
- if (StringUtils.isBlank(custSnsInfo.getCellPhnno())) {
|
|
|
+ if (TscConstants.CustStat.ACTIVE.value().equals(custInfo.getCustStat())) {
|
|
|
+ if (StringUtils.isBlank(custSnsInfo.getCellPhnno())) { // 휴대폰 정보가 없음 - 회원가입 페이지 이동(ID/PW 제외)
|
|
|
resultMap.setString("custStat", "EMPTY_PHONE_CUST");
|
|
|
return resultMap;
|
|
|
}
|
|
|
@@ -370,6 +371,7 @@ public class TsfCustomerService {
|
|
|
resultMap.setString("custStat", "SUCC_CUST");
|
|
|
return resultMap;
|
|
|
}
|
|
|
+
|
|
|
} else { // 2-2. 고객정보 없는 경우
|
|
|
|
|
|
if (StringUtils.isBlank(custSnsInfo.getCellPhnno())) { // 휴대전화번호가 없는 경우
|
|
|
@@ -377,24 +379,23 @@ public class TsfCustomerService {
|
|
|
return resultMap;
|
|
|
}
|
|
|
|
|
|
- boolean isFindByPhone =getCustomerFindByCellPhnnoCount(custSnsInfo.getCellPhnno().replace("-",""));
|
|
|
+ boolean isFindByPhone = getCustomerFindByCellPhnnoCount(custSnsInfo.getCellPhnno().replace("-",""));
|
|
|
if (isFindByPhone) {
|
|
|
- resultMap.setString("custStat", "DUP_PHONE_CUST");
|
|
|
+ resultMap.setString("custStat", "DUP_PHONE_CUST"); // 휴대폰 중복
|
|
|
return resultMap;
|
|
|
}
|
|
|
|
|
|
- boolean isFindByEmail = getCustomerFindByEmail(custSnsInfo.getEmail());
|
|
|
+ boolean isFindByEmail = getCustomerFindByEmailCount(custSnsInfo.getEmail());
|
|
|
if (isFindByEmail) {
|
|
|
resultMap.setString("custStat", "DUP_EMAIL_CUST"); // 이메일 중복
|
|
|
return resultMap;
|
|
|
}
|
|
|
|
|
|
Customer customer = objectMapper.convertValue(custSnsInfo, Customer.class);
|
|
|
-
|
|
|
boolean isJoin = saveJoinCustomerSns(customer);
|
|
|
-
|
|
|
if (isJoin) {
|
|
|
resultMap.setString("custStat", "SUCC_CUST");
|
|
|
+ resultMap.setString("gb", "NEW");
|
|
|
} else {
|
|
|
resultMap.setString("custStat", "FAIL_CUST");
|
|
|
}
|