|
|
@@ -999,15 +999,23 @@ public class TsfCustomerService {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 11
|
|
|
*/
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
public void updateSmsReceptionRefuse(Integer custNo) {
|
|
|
// 수신거부 처리
|
|
|
- customerDao.updateSmsReceptionRefuse(custNo);
|
|
|
+ int result = customerDao.updateSmsReceptionRefuse(custNo);
|
|
|
|
|
|
- // 고객이력 생성
|
|
|
- Customer customer = new Customer();
|
|
|
- customer.setCustNo(custNo);
|
|
|
- customer.setRegNo(custNo);
|
|
|
- coreCustomerService.createCustomerHistory(customer);
|
|
|
+ if (result > 0) {
|
|
|
+ Customer customer = new Customer();
|
|
|
+ customer.setCustNo(custNo);
|
|
|
+ customer.setSmsAgreeYn("N");
|
|
|
+ customer.setRegNo(custNo);
|
|
|
+
|
|
|
+ // 마케팅수신동의이력 생성
|
|
|
+ coreCustomerService.createCustomerMarketHst(customer);
|
|
|
+
|
|
|
+ // 고객이력 생성
|
|
|
+ coreCustomerService.createCustomerHistory(customer);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1016,15 +1024,23 @@ public class TsfCustomerService {
|
|
|
* @author gagamel
|
|
|
* @since 2021. 5. 11
|
|
|
*/
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
public void updateEmailReceptionRefuse(Integer custNo) {
|
|
|
// 수신거부 처리
|
|
|
- customerDao.updateEmailReceptionRefuse(custNo);
|
|
|
+ int result = customerDao.updateEmailReceptionRefuse(custNo);
|
|
|
|
|
|
- // 고객이력 생성
|
|
|
- Customer customer = new Customer();
|
|
|
- customer.setCustNo(custNo);
|
|
|
- customer.setRegNo(custNo);
|
|
|
- coreCustomerService.createCustomerHistory(customer);
|
|
|
+ if (result > 0) {
|
|
|
+ Customer customer = new Customer();
|
|
|
+ customer.setCustNo(custNo);
|
|
|
+ customer.setEmailAgreeYn("N");
|
|
|
+ customer.setRegNo(custNo);
|
|
|
+
|
|
|
+ // 마케팅수신동의이력 생성
|
|
|
+ coreCustomerService.createCustomerMarketHst(customer);
|
|
|
+
|
|
|
+ // 고객이력 생성
|
|
|
+ coreCustomerService.createCustomerHistory(customer);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|