feat():添加日志输出
parent
ab32fc459c
commit
9bf97676b2
|
@ -96,14 +96,16 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
||||||
public boolean save(OrderPayCustomer orderPayCustomer) {
|
public boolean save(OrderPayCustomer orderPayCustomer) {
|
||||||
|
|
||||||
String appCode = orderPayCustomer.getAppCode();
|
String appCode = orderPayCustomer.getAppCode();
|
||||||
List<String> customerAllList = this.getCustomerAllList();
|
|
||||||
List<String> naocsServiceAllList = nacosServerService.naocsServiceAllList();
|
List<String> naocsServiceAllList = nacosServerService.naocsServiceAllList();
|
||||||
|
log.info("进行服务合法性判断:[{}-->{}]",appCode,naocsServiceAllList);
|
||||||
if (!naocsServiceAllList.contains(appCode)){
|
if (!naocsServiceAllList.contains(appCode)){
|
||||||
throw new ServiceException("客户编码违法");
|
throw new ServiceException("客户编码违法");
|
||||||
}
|
}
|
||||||
|
|
||||||
LambdaQueryWrapper<OrderPayCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OrderPayCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(OrderPayCustomer::getAppCode,appCode);
|
queryWrapper.eq(OrderPayCustomer::getAppCode,appCode);
|
||||||
|
long isAppCodeOnly = this.count(queryWrapper);
|
||||||
|
log.info("进行服务code唯一性校验:[{}-{}]",appCode,isAppCodeOnly);
|
||||||
if (this.count(queryWrapper) >0){
|
if (this.count(queryWrapper) >0){
|
||||||
throw new ServiceException("客户编码重复");
|
throw new ServiceException("客户编码重复");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue