Browse Source

添加更新客户初始化状态

master
zxc 5 years ago
parent
commit
9e88860279
  1. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java
  2. 11
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java

4
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java

@ -82,4 +82,8 @@ public interface PaConstant {
* 更新客户Id信息失败
*/
String UPDATE_CUSTOMER_EXCEPTION = "更新客户Id信息失败";
/**
* 更新客户初始化状态失败
*/
String UPDATE_ISINITIALIZE_EXCEPTION = "更新客户初始化状态失败";
}

11
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java

@ -90,6 +90,8 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust
private CustomerMpService customerMpService;
@Autowired
private CpUserDetailRedis cpUserDetailRedis;
@Autowired
private PaCustomerDao paCustomerDao;
@Override
public PageData<PaCustomerDTO> page(Map<String, Object> params) {
@ -533,6 +535,15 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust
throw new RenException(PaConstant.UPDATE_CUSTOMER_EXCEPTION);
}
//5.修改pa_customer表初始化状态
PaCustomerDTO paCustomer = new PaCustomerDTO();
paCustomer.setIsInitialize(NumConstant.ONE);
paCustomer.setId(formDTO.getNewCustomerId());
if (paCustomerDao.updateCustomerById(paCustomer) < NumConstant.ONE){
logger.error(String.format("修改pa_customer表初始化状态失败,待修改初始化状态的客户Id为->%s", paCustomer.getId()));
throw new RenException(PaConstant.UPDATE_ISINITIALIZE_EXCEPTION);
}
}
}
Loading…
Cancel
Save