增强字符串配置,如果district字段内容为others,用户可手动输入匹配区域。
This commit is contained in:
@@ -149,12 +149,18 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
if(entity.getHttpReqHdrList()!=null){
|
||||
for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
websiteCfgDao.saveHttpReqHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpResHdrList()!=null){
|
||||
for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
websiteCfgDao.saveHttpResHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
@@ -213,12 +219,18 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
if(entity.getHttpReqHdrList()!=null){
|
||||
for(HttpReqHeadCfg cfg:entity.getHttpReqHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
websiteCfgDao.saveHttpReqHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getHttpResHdrList()!=null){
|
||||
for(HttpResHeadCfg cfg:entity.getHttpResHdrList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
websiteCfgDao.saveHttpResHdrCfg(cfg);
|
||||
}
|
||||
}
|
||||
@@ -683,6 +695,9 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
websiteCfgDao.saveDnsDomainCfg(cfg);
|
||||
}
|
||||
}
|
||||
@@ -722,6 +737,9 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
websiteCfgDao.saveDnsDomainCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user