feat():增加代码逻辑的日志输入

master
Number7 2024-08-08 21:49:13 +08:00
parent 0ef21b8fe0
commit 2fb00c0451
1 changed files with 6 additions and 2 deletions

View File

@ -112,13 +112,17 @@ public class OrderPayCustomerServiceImpl
List<String> nacosServerAllList = nacosServerService.nacosServerAllList(); List<String> nacosServerAllList = nacosServerService.nacosServerAllList();
log.info("进行服务合法性判断:[{}->{}]",appCode,nacosServerAllList);
if(!nacosServerAllList.contains(appCode)){ if(!nacosServerAllList.contains(appCode)){
throw new ServiceException("客户编码违法"); throw new ServiceException("客户编码违法");
} }
LambdaUpdateWrapper<OrderPayCustomer> queryWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<OrderPayCustomer> queryWrapper = new LambdaUpdateWrapper<>();
queryWrapper.eq(OrderPayCustomer::getAppCode, appCode); queryWrapper.eq(OrderPayCustomer::getAppCode, appCode);
List<String> customerAllList = this.getCustomerAllList();
if(this.count(queryWrapper)>0){ long isAppCodeOnly = this.count(queryWrapper);
log.info("进行服务code唯一性校验:[{}->{}]",appCode,isAppCodeOnly);
if(isAppCodeOnly>0){
throw new ServiceException("客户编码重复"); throw new ServiceException("客户编码重复");
} }
return super.save(orderPayCustomer); return super.save(orderPayCustomer);