feat():添加日志输出

master
zhang chengzhi 2024-08-07 16:54:07 +08:00
parent ab32fc459c
commit 9bf97676b2
1 changed files with 3 additions and 1 deletions

View File

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