feat():增加了客户添加接口
parent
800f9930ad
commit
79256ecd5e
|
@ -87,12 +87,15 @@ public class OrderPayCustomerServiceImpl
|
|||
|
||||
String appCode = orderPayCustomer.getAppCode();
|
||||
List<String> nacosServerAllList = nacosServerService.nacosServerAllList();
|
||||
if (nacosServerAllList.contains(appCode)){
|
||||
log.info("进行服务合法性判断:[{}->{}]",appCode,nacosServerAllList);
|
||||
if (!nacosServerAllList.contains(appCode)){
|
||||
throw new ServiceException("客户编码违法");
|
||||
}
|
||||
LambdaQueryWrapper<OrderPayCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OrderPayCustomer::getAppCode,appCode);
|
||||
if (this.count(queryWrapper)>0) {
|
||||
long count = this.count(queryWrapper);
|
||||
log.info("进行服务code唯一性校验[{}->{}]",appCode,count);
|
||||
if (count >0) {
|
||||
throw new ServiceException("客户编码重复");
|
||||
}
|
||||
return super.save(orderPayCustomer);
|
||||
|
|
Loading…
Reference in New Issue