俄文国际化修正%s以及VoIP相关字典为空的情况

This commit is contained in:
DuanDongmei
2018-12-07 09:51:29 +08:00
parent 23b402fc50
commit d530ffdd10
2 changed files with 32 additions and 16 deletions

View File

@@ -119,7 +119,17 @@ public class IpAddrPoolCfgService extends BaseService{
// 2.更新地址池IP信息
ipAddrPoolCfgDao.deleteReuseIpCfgs(addrPoolId);
for (BaseIpCfg IpCfg : entity.getIpCfgs()) {
BeanUtils.copyProperties(entity, IpCfg, new String[]{"cfgId"});
try {
List<Integer> compileIds = ConfigServiceUtil.getId(1,1);
if(compileIds != null && compileIds.size() > 0 ){
IpCfg.setCompileId(compileIds.get(0));
}
} catch (Exception e) {
e.printStackTrace();
logger.info("获取编译ID出错");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
BeanUtils.copyProperties(entity, IpCfg, new String[]{"cfgId","compileId"});
IpCfg.setUserRegion1(addrPoolId+"");
ipAddrPoolCfgDao.saveReuseIpCfgs(IpCfg);
}
@@ -169,7 +179,7 @@ public class IpAddrPoolCfgService extends BaseService{
List<IpAddrPool> resStrategyList=new ArrayList<IpAddrPool>();
for(BaseIpCfg ipcfg : cfg.getIpCfgs()) {
IpAddrPool ip = new IpAddrPool();
BeanUtils.copyProperties(cfg, ipcfg, new String[]{"cfgId"});
BeanUtils.copyProperties(cfg, ipcfg, new String[]{"cfgId","compileId"});
List<IpCfg> cfgs = BaseService.ipConvert(new IpCfg(), ipcfg);
if (cfgs.size() > 1) {
throw new RuntimeException("CallBack IP did not support IP range!");
@@ -216,7 +226,7 @@ public class IpAddrPoolCfgService extends BaseService{
List<IpAddrPool> resStrategyList=new ArrayList<IpAddrPool>();
for(BaseIpCfg ipcfg : cfg.getIpCfgs()) {
IpAddrPool ip = new IpAddrPool();
BeanUtils.copyProperties(cfg, ipcfg, new String[]{"cfgId"});
BeanUtils.copyProperties(cfg, ipcfg, new String[]{"cfgId","compileId"});
List<IpCfg> cfgs = BaseService.ipConvert(new IpCfg(), ipcfg);
if (cfgs.size() > 1) {
throw new RuntimeException("CallBack IP did not support IP range!");