obj-group-list批量操作打开

This commit is contained in:
wangxin
2019-06-14 19:21:01 +08:00
parent 1d64a1bc0f
commit ef16dddf34
3 changed files with 7 additions and 10 deletions

View File

@@ -197,6 +197,7 @@ public class ObjectGroupController extends BaseController {
} }
BaseCfg batchCfg = new BaseCfg(); BaseCfg batchCfg = new BaseCfg();
batchCfg.setTableName(CfgIndexInfo.getTablename());
batchCfg.setIsValid(-1); batchCfg.setIsValid(-1);
batchCfg.setIsAudit(0); batchCfg.setIsAudit(0);
batchCfg.setEditTime(new Date()); batchCfg.setEditTime(new Date());
@@ -226,7 +227,7 @@ public class ObjectGroupController extends BaseController {
BeanUtils.copyProperties(cfg, baseCfg); BeanUtils.copyProperties(cfg, baseCfg);
baseCfgList.add(baseCfg); baseCfgList.add(baseCfg);
} }
if(serviceGroupIds.lastIndexOf(",")==(serviceGroupIds.toString().length()-1)){ if(StringUtils.isNotBlank(serviceGroupIds)&&serviceGroupIds.lastIndexOf(",")==(serviceGroupIds.toString().length()-1)){
serviceGroupIds.deleteCharAt(serviceGroupIds.toString().length()-1); serviceGroupIds.deleteCharAt(serviceGroupIds.toString().length()-1);
} }
hasData = objectGroupService.batchDeleteMaatData(page, batchCfg, baseCfgList, hasData,serviceGroupIds.toString()); hasData = objectGroupService.batchDeleteMaatData(page, batchCfg, baseCfgList, hasData,serviceGroupIds.toString());

View File

@@ -497,14 +497,7 @@ public class ObjectGroupService extends BaseService {
List<Integer> compileIds = new ArrayList(); List<Integer> compileIds = new ArrayList();
for(BaseCfg cfg:list){ for(BaseCfg cfg:list){
if(entity.getServiceId().equals(1028)) { compileIds.add(cfg.getCompileId());
compileIds.add(Integer.parseInt(cfg.getUserRegion1()));
}else if(entity.getServiceId().equals(400)) {
compileIds.add(cfg.getRegionId());
}else {
compileIds.add(cfg.getCompileId());
}
cfg.setIsValid(-1); cfg.setIsValid(-1);
cfg.setIsAudit(0); cfg.setIsAudit(0);
} }
@@ -516,7 +509,9 @@ public class ObjectGroupService extends BaseService {
handelScheduleCfg(list, entity.getTableName(),entity); handelScheduleCfg(list, entity.getTableName(),entity);
} }
//3.恢复policy_group_info可选状态 //3.恢复policy_group_info可选状态
policyGroupInfoDao.updateUdFlag(groupIds,1,null); if(StringUtils.isNotBlank(groupIds)){
policyGroupInfoDao.updateUdFlag(groupIds,1,null);
}
// 4.判断是否是当前检索条件下最后一页数据 并返回结果 // 4.判断是否是当前检索条件下最后一页数据 并返回结果
page.setList(list); page.setList(list);
if(page.isLastPage()){ if(page.isLastPage()){

View File

@@ -125,6 +125,7 @@ function isBatch(url){
|| url.indexOf("functionId=512&") > -1 //PXY OBJ FILE || url.indexOf("functionId=512&") > -1 //PXY OBJ FILE
|| url.indexOf("functionId=215&") > -1 //Proxy Manipulate || url.indexOf("functionId=215&") > -1 //Proxy Manipulate
|| url.indexOf("functionId=516&") > -1 //Response Page || url.indexOf("functionId=516&") > -1 //Response Page
|| url.indexOf("functionId=888&") > -1 //Object group list
){ ){
flag = true; flag = true;
} }