设置areaEffectiveIds提至BaseService的setAreaEffectiveIds方法
saveOrUpdate方法中直接调用 //设置区域运营商信息 setAreaEffectiveIds(entity);
This commit is contained in:
@@ -20,10 +20,11 @@ import com.google.gson.JsonPrimitive;
|
|||||||
import com.google.gson.JsonSerializationContext;
|
import com.google.gson.JsonSerializationContext;
|
||||||
import com.google.gson.JsonSerializer;
|
import com.google.gson.JsonSerializer;
|
||||||
import com.googlecode.ipv6.IPv6Address;
|
import com.googlecode.ipv6.IPv6Address;
|
||||||
import com.googlecode.ipv6.IPv6AddressRange;
|
|
||||||
import com.googlecode.ipv6.IPv6Network;
|
import com.googlecode.ipv6.IPv6Network;
|
||||||
import com.nis.domain.SysRole;
|
import com.nis.domain.SysRole;
|
||||||
import com.nis.domain.SysUser;
|
import com.nis.domain.SysUser;
|
||||||
|
import com.nis.domain.configuration.AreaBean;
|
||||||
|
import com.nis.domain.configuration.AreaIpCfg;
|
||||||
import com.nis.domain.configuration.BaseCfg;
|
import com.nis.domain.configuration.BaseCfg;
|
||||||
import com.nis.domain.configuration.BaseIpCfg;
|
import com.nis.domain.configuration.BaseIpCfg;
|
||||||
import com.nis.domain.configuration.BaseStringCfg;
|
import com.nis.domain.configuration.BaseStringCfg;
|
||||||
@@ -36,6 +37,7 @@ import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
|||||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||||
import com.nis.util.ConfigServiceUtil;
|
import com.nis.util.ConfigServiceUtil;
|
||||||
import com.nis.util.Configurations;
|
import com.nis.util.Configurations;
|
||||||
|
import com.nis.util.Constants;
|
||||||
import com.nis.util.IpUtil;
|
import com.nis.util.IpUtil;
|
||||||
import com.nis.util.StringUtils;
|
import com.nis.util.StringUtils;
|
||||||
|
|
||||||
@@ -488,4 +490,32 @@ public abstract class BaseService {
|
|||||||
}
|
}
|
||||||
return dstIp;
|
return dstIp;
|
||||||
}
|
}
|
||||||
|
//区域IPsetAreaEffectiveIds设置
|
||||||
|
public void setAreaEffectiveIds(BaseCfg<?> entity){
|
||||||
|
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
||||||
|
List<AreaBean> areaIsps=entity.getAreaIsp();
|
||||||
|
if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){
|
||||||
|
entity.setAreaEffectiveIds("");
|
||||||
|
entity.setAreaType(null);
|
||||||
|
}else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){
|
||||||
|
if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){
|
||||||
|
StringBuffer areaEffectiveIds=new StringBuffer();
|
||||||
|
for(int i=0;i<areaIsps.size();i++){
|
||||||
|
if(StringUtils.isBlank(areaIsps.get(i).getArea())){
|
||||||
|
areaEffectiveIds.append(areaIsps.get(i).getIsp());
|
||||||
|
}else if(StringUtils.isBlank(areaIsps.get(i).getIsp())){
|
||||||
|
areaEffectiveIds.append(areaIsps.get(i).getArea());
|
||||||
|
}else{
|
||||||
|
areaEffectiveIds.append(areaIsps.get(i).getArea()+":"+areaIsps.get(i).getIsp());
|
||||||
|
}
|
||||||
|
if(i!=areaIsps.size()-1){
|
||||||
|
areaEffectiveIds.append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entity.setAreaEffectiveIds(areaEffectiveIds.toString());
|
||||||
|
}else if(Constants.AREA_EFFECTIVE_TYPE_AREA_IP==entity.getAreaType()&&areaCfg!=null&&areaCfg.size()>0){
|
||||||
|
entity.setAreaEffectiveIds("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,33 +109,8 @@ public class AvContentCfgService extends BaseService{
|
|||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity,String voipIpIds,String voipAccountIds,String areaCfgIds){
|
public void saveOrUpdateAvVoip(CfgIndexInfo entity,String voipIpIds,String voipAccountIds,String areaCfgIds){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
//区域IPsetAreaEffectiveIds设置
|
//设置区域运营商信息
|
||||||
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
setAreaEffectiveIds(entity);
|
||||||
List<AreaBean> areaIsps=entity.getAreaIsp();
|
|
||||||
if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
entity.setAreaType(null);
|
|
||||||
}else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){
|
|
||||||
if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){
|
|
||||||
StringBuffer areaEffectiveIds=new StringBuffer();
|
|
||||||
for(int i=0;i<areaIsps.size();i++){
|
|
||||||
if(StringUtils.isBlank(areaIsps.get(i).getArea())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getIsp());
|
|
||||||
}else if(StringUtils.isBlank(areaIsps.get(i).getIsp())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea());
|
|
||||||
}else{
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea()+":"+areaIsps.get(i).getIsp());
|
|
||||||
}
|
|
||||||
if(i!=areaIsps.size()-1){
|
|
||||||
areaEffectiveIds.append(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
entity.setAreaEffectiveIds(areaEffectiveIds.toString());
|
|
||||||
}else if(Constants.AREA_EFFECTIVE_TYPE_AREA_IP==entity.getAreaType()&&areaCfg!=null&&areaCfg.size()>0){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
@@ -146,7 +121,6 @@ public class AvContentCfgService extends BaseService{
|
|||||||
List<Integer> compileIds = new ArrayList<Integer>();
|
List<Integer> compileIds = new ArrayList<Integer>();
|
||||||
try {
|
try {
|
||||||
compileIds = ConfigServiceUtil.getId(1,1);
|
compileIds = ConfigServiceUtil.getId(1,1);
|
||||||
//compileIds.add((int)Math.floor(Math.random()*1000000+1));
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.info("获取编译ID出错");
|
logger.info("获取编译ID出错");
|
||||||
@@ -473,34 +447,8 @@ public class AvContentCfgService extends BaseService{
|
|||||||
public void saveOrUpdateContIp(BaseIpCfg entity,String areaCfgIds){
|
public void saveOrUpdateContIp(BaseIpCfg entity,String areaCfgIds){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
entity.setTableName("av_cont_ip_cfg");
|
entity.setTableName("av_cont_ip_cfg");
|
||||||
|
//设置区域运营商信息
|
||||||
//区域IPsetAreaEffectiveIds设置
|
setAreaEffectiveIds(entity);
|
||||||
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
|
||||||
List<AreaBean> areaIsps=entity.getAreaIsp();
|
|
||||||
if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
entity.setAreaType(null);
|
|
||||||
}else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){
|
|
||||||
if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){
|
|
||||||
StringBuffer areaEffectiveIds=new StringBuffer();
|
|
||||||
for(int i=0;i<areaIsps.size();i++){
|
|
||||||
if(StringUtils.isBlank(areaIsps.get(i).getArea())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getIsp());
|
|
||||||
}else if(StringUtils.isBlank(areaIsps.get(i).getIsp())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea());
|
|
||||||
}else{
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea()+":"+areaIsps.get(i).getIsp());
|
|
||||||
}
|
|
||||||
if(i!=areaIsps.size()-1){
|
|
||||||
areaEffectiveIds.append(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
entity.setAreaEffectiveIds(areaEffectiveIds.toString());
|
|
||||||
}else if(Constants.AREA_EFFECTIVE_TYPE_AREA_IP==entity.getAreaType()&&areaCfg!=null&&areaCfg.size()>0){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
@@ -726,9 +674,9 @@ public class AvContentCfgService extends BaseService{
|
|||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("contIp配置下发配置参数:"+json);
|
logger.info("contIp配置下发配置参数:"+json);
|
||||||
//TODO 调用服务接口下发配置
|
// 调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
//logger.info("contIp配置下发响应信息:"+result.getMsg());
|
logger.info("contIp配置下发响应信息:"+result.getMsg());
|
||||||
|
|
||||||
}else if(isAudit==3){
|
}else if(isAudit==3){
|
||||||
maatCfg.setCompileId(entity.getCompileId());
|
maatCfg.setCompileId(entity.getCompileId());
|
||||||
@@ -744,8 +692,8 @@ public class AvContentCfgService extends BaseService{
|
|||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("contIp配置下发配置参数:"+json);
|
logger.info("contIp配置下发配置参数:"+json);
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.put(json,1);
|
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||||
//logger.info("http配置取消配置响应信息:"+result.getMsg());
|
logger.info("contIp配置取消配置响应信息:"+result.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/********************************contIp业务*********************************/
|
/********************************contIp业务*********************************/
|
||||||
@@ -780,33 +728,8 @@ public class AvContentCfgService extends BaseService{
|
|||||||
public void saveOrUpdatePicIp(BaseIpCfg entity,String areaCfgIds){
|
public void saveOrUpdatePicIp(BaseIpCfg entity,String areaCfgIds){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
entity.setTableName("av_pic_ip_cfg");
|
entity.setTableName("av_pic_ip_cfg");
|
||||||
//区域IPsetAreaEffectiveIds设置
|
//设置区域运营商信息
|
||||||
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
setAreaEffectiveIds(entity);
|
||||||
List<AreaBean> areaIsps=entity.getAreaIsp();
|
|
||||||
if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
entity.setAreaType(null);
|
|
||||||
}else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){
|
|
||||||
if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){
|
|
||||||
StringBuffer areaEffectiveIds=new StringBuffer();
|
|
||||||
for(int i=0;i<areaIsps.size();i++){
|
|
||||||
if(StringUtils.isBlank(areaIsps.get(i).getArea())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getIsp());
|
|
||||||
}else if(StringUtils.isBlank(areaIsps.get(i).getIsp())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea());
|
|
||||||
}else{
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea()+":"+areaIsps.get(i).getIsp());
|
|
||||||
}
|
|
||||||
if(i!=areaIsps.size()-1){
|
|
||||||
areaEffectiveIds.append(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
entity.setAreaEffectiveIds(areaEffectiveIds.toString());
|
|
||||||
}else if(Constants.AREA_EFFECTIVE_TYPE_AREA_IP==entity.getAreaType()&&areaCfg!=null&&areaCfg.size()>0){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
@@ -1030,10 +953,10 @@ public class AvContentCfgService extends BaseService{
|
|||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("contIp配置下发配置参数:"+json);
|
logger.info("picIp配置下发配置参数:"+json);
|
||||||
//TODO 调用服务接口下发配置
|
//TODO 调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
//logger.info("contIp配置下发响应信息:"+result.getMsg());
|
logger.info("picIp配置下发响应信息:"+result.getMsg());
|
||||||
|
|
||||||
}else if(isAudit==3){
|
}else if(isAudit==3){
|
||||||
maatCfg.setCompileId(entity.getCompileId());
|
maatCfg.setCompileId(entity.getCompileId());
|
||||||
@@ -1047,10 +970,10 @@ public class AvContentCfgService extends BaseService{
|
|||||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||||
//调用服务接口取消配置
|
//调用服务接口取消配置
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("contIp配置下发配置参数:"+json);
|
logger.info("picIp配置下发配置参数:"+json);
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.put(json,1);
|
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||||
//logger.info("http配置取消配置响应信息:"+result.getMsg());
|
logger.info("picIp配置取消配置响应信息:"+result.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/********************************picIp业务*********************************/
|
/********************************picIp业务*********************************/
|
||||||
@@ -1086,33 +1009,8 @@ public class AvContentCfgService extends BaseService{
|
|||||||
public void saveOrUpdateContUrl(BaseStringCfg entity,String areaCfgIds){
|
public void saveOrUpdateContUrl(BaseStringCfg entity,String areaCfgIds){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
entity.setTableName("av_cont_url_cfg");
|
entity.setTableName("av_cont_url_cfg");
|
||||||
//区域IPsetAreaEffectiveIds设置
|
//设置区域运营商信息
|
||||||
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
setAreaEffectiveIds(entity);
|
||||||
List<AreaBean> areaIsps=entity.getAreaIsp();
|
|
||||||
if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
entity.setAreaType(null);
|
|
||||||
}else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){
|
|
||||||
if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){
|
|
||||||
StringBuffer areaEffectiveIds=new StringBuffer();
|
|
||||||
for(int i=0;i<areaIsps.size();i++){
|
|
||||||
if(StringUtils.isBlank(areaIsps.get(i).getArea())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getIsp());
|
|
||||||
}else if(StringUtils.isBlank(areaIsps.get(i).getIsp())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea());
|
|
||||||
}else{
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea()+":"+areaIsps.get(i).getIsp());
|
|
||||||
}
|
|
||||||
if(i!=areaIsps.size()-1){
|
|
||||||
areaEffectiveIds.append(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
entity.setAreaEffectiveIds(areaEffectiveIds.toString());
|
|
||||||
}else if(Constants.AREA_EFFECTIVE_TYPE_AREA_IP==entity.getAreaType()&&areaCfg!=null&&areaCfg.size()>0){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
@@ -1301,10 +1199,10 @@ public class AvContentCfgService extends BaseService{
|
|||||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("contIp配置下发配置参数:"+json);
|
logger.info("contUrl配置下发配置参数:"+json);
|
||||||
//TODO 调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
//logger.info("contIp配置下发响应信息:"+result.getMsg());
|
logger.info("contUrl配置下发响应信息:"+result.getMsg());
|
||||||
|
|
||||||
}else if(isAudit==3){
|
}else if(isAudit==3){
|
||||||
maatCfg.setCompileId(entity.getCompileId());
|
maatCfg.setCompileId(entity.getCompileId());
|
||||||
@@ -1318,10 +1216,10 @@ public class AvContentCfgService extends BaseService{
|
|||||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||||
//调用服务接口取消配置
|
//调用服务接口取消配置
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("contIp配置下发配置参数:"+json);
|
logger.info("contUrl配置下发配置参数:"+json);
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.put(json,1);
|
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||||
//logger.info("http配置取消配置响应信息:"+result.getMsg());
|
logger.info("contUrl配置取消配置响应信息:"+result.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/********************************contUrl业务*********************************/
|
/********************************contUrl业务*********************************/
|
||||||
@@ -1356,33 +1254,8 @@ public class AvContentCfgService extends BaseService{
|
|||||||
public void saveOrUpdatePicUrl(BaseStringCfg entity,String areaCfgIds){
|
public void saveOrUpdatePicUrl(BaseStringCfg entity,String areaCfgIds){
|
||||||
Date createTime=new Date();
|
Date createTime=new Date();
|
||||||
entity.setTableName("av_pic_url_cfg");
|
entity.setTableName("av_pic_url_cfg");
|
||||||
//区域IPsetAreaEffectiveIds设置
|
//设置区域运营商信息
|
||||||
List<AreaIpCfg> areaCfg=entity.getAreaCfg();
|
setAreaEffectiveIds(entity);
|
||||||
List<AreaBean> areaIsps=entity.getAreaIsp();
|
|
||||||
if(Constants.IS_AREA_EFFECTIVE_NO==entity.getIsAreaEffective()){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
entity.setAreaType(null);
|
|
||||||
}else if(Constants.IS_AREA_EFFECTIVE_YES==entity.getIsAreaEffective()){
|
|
||||||
if(Constants.AREA_EFFECTIVE_TYPE_AREA_ISP==entity.getAreaType()&&areaIsps!=null&&areaIsps.size()>0){
|
|
||||||
StringBuffer areaEffectiveIds=new StringBuffer();
|
|
||||||
for(int i=0;i<areaIsps.size();i++){
|
|
||||||
if(StringUtils.isBlank(areaIsps.get(i).getArea())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getIsp());
|
|
||||||
}else if(StringUtils.isBlank(areaIsps.get(i).getIsp())){
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea());
|
|
||||||
}else{
|
|
||||||
areaEffectiveIds.append(areaIsps.get(i).getArea()+":"+areaIsps.get(i).getIsp());
|
|
||||||
}
|
|
||||||
if(i!=areaIsps.size()-1){
|
|
||||||
areaEffectiveIds.append(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
entity.setAreaEffectiveIds(areaEffectiveIds.toString());
|
|
||||||
}else if(Constants.AREA_EFFECTIVE_TYPE_AREA_IP==entity.getAreaType()&&areaCfg!=null&&areaCfg.size()>0){
|
|
||||||
entity.setAreaEffectiveIds("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
@@ -1572,9 +1445,9 @@ public class AvContentCfgService extends BaseService{
|
|||||||
//调用服务接口下发配置数据
|
//调用服务接口下发配置数据
|
||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("picUrl配置下发配置参数:"+json);
|
logger.info("picUrl配置下发配置参数:"+json);
|
||||||
//TODO 调用服务接口下发配置
|
// 调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||||
//logger.info("picUrl配置下发响应信息:"+result.getMsg());
|
logger.info("picUrl配置下发响应信息:"+result.getMsg());
|
||||||
|
|
||||||
}else if(isAudit==3){
|
}else if(isAudit==3){
|
||||||
maatCfg.setCompileId(entity.getCompileId());
|
maatCfg.setCompileId(entity.getCompileId());
|
||||||
@@ -1590,8 +1463,8 @@ public class AvContentCfgService extends BaseService{
|
|||||||
String json=gsonToJson(maatBean);
|
String json=gsonToJson(maatBean);
|
||||||
logger.info("picUrl配置下发配置参数:"+json);
|
logger.info("picUrl配置下发配置参数:"+json);
|
||||||
//调用服务接口下发配置
|
//调用服务接口下发配置
|
||||||
//ToMaatResult result = ConfigServiceUtil.put(json,1);
|
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||||
//logger.info("http配置取消配置响应信息:"+result.getMsg());
|
logger.info("picUrl配置取消配置响应信息:"+result.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/********************************picUrl业务*********************************/
|
/********************************picUrl业务*********************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user