|
@@ -121,15 +121,17 @@ public class FlowAppInfoServiceImpl extends ServiceImpl<FlowAppMapper, FlowAppIn
|
|
|
.channelId(flowAppInfoDto.getChannelId())
|
|
|
.secondCallback(flowAppInfoDto.getSecondCallback()).build();
|
|
|
int count = baseMapper.updateById(appInfo);
|
|
|
- List<IpWhiteList> list = Lists.newArrayList();
|
|
|
- flowAppInfoDto.getIpWhiteListList().forEach(ip -> {
|
|
|
- IpWhiteList whiteList = IpWhiteList.builder().ipId(jedisCluster.incr(GLOBAL_ID_INCR.key()))
|
|
|
- .des(ip.getDes())
|
|
|
- .ipAddr(ip.getIpAddr())
|
|
|
- .customerId(flowAppInfoDto.getCustomerId()).build();
|
|
|
- list.add(whiteList);
|
|
|
- });
|
|
|
- ipWhiteListService.saveCustomerIpWhiteList(list, flowAppInfoDto.getCustomerId());
|
|
|
+ if(!flowAppInfoDto.getIpWhiteListList().isEmpty()){
|
|
|
+ List<IpWhiteList> list = Lists.newArrayList();
|
|
|
+ flowAppInfoDto.getIpWhiteListList().forEach(ip -> {
|
|
|
+ IpWhiteList whiteList = IpWhiteList.builder().ipId(jedisCluster.incr(GLOBAL_ID_INCR.key()))
|
|
|
+ .des(ip.getDes())
|
|
|
+ .ipAddr(ip.getIpAddr())
|
|
|
+ .customerId(flowAppInfoDto.getCustomerId()).build();
|
|
|
+ list.add(whiteList);
|
|
|
+ });
|
|
|
+ ipWhiteListService.saveCustomerIpWhiteList(list, flowAppInfoDto.getCustomerId());
|
|
|
+ }
|
|
|
|
|
|
if (count > 0) {
|
|
|
log.info("客户接入信息修改,修改信息为:【{}】", appInfo.toString());
|
|
@@ -151,7 +153,7 @@ public class FlowAppInfoServiceImpl extends ServiceImpl<FlowAppMapper, FlowAppIn
|
|
|
if(!list.isEmpty()){
|
|
|
return list.stream().map(ipWhiteListDto -> ipWhiteListDto.getIpAddr().concat(";")).collect(Collectors.joining());
|
|
|
}else {
|
|
|
- throw new BaseException(Status.PARAM_LOSS.status(),Status.PARAM_LOSS.message());
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
}
|