summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangxin <[email protected]>2019-06-24 16:43:06 +0800
committerwangxin <[email protected]>2019-06-24 16:43:06 +0800
commite23b638907e825949a5c8b39ed0cd5a7a550dff0 (patch)
treeae3cf06974f86aa2962615a0f8189055fae7151e
parent240b10a05dc83b2490b044d6be7305a51e8df331 (diff)
调整批量审核错误提示,既保持查询条件也能提示错误
-rw-r--r--src/main/java/com/nis/web/controller/configuration/ObjectGroupController.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/com/nis/web/controller/configuration/ObjectGroupController.java b/src/main/java/com/nis/web/controller/configuration/ObjectGroupController.java
index 5b5aef460..f3450437f 100644
--- a/src/main/java/com/nis/web/controller/configuration/ObjectGroupController.java
+++ b/src/main/java/com/nis/web/controller/configuration/ObjectGroupController.java
@@ -31,10 +31,13 @@ import java.util.*;
public class ObjectGroupController extends BaseController {
@RequestMapping(value = { "/list" })
public String list(Model model, @ModelAttribute("cfg") CfgIndexInfo cfg, HttpServletRequest request,
- HttpServletResponse response){
+ HttpServletResponse response,String tip){
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
Page<CfgIndexInfo> page = objectGroupService.getPolicyListList(searchPage, cfg);
model.addAttribute("page", page);
+ if(StringUtils.isNotBlank(tip)){
+ addMessage("error",model,tip);
+ }
initPageCondition(model,cfg);
return "/cfg/objgroup/list";
}
@@ -270,7 +273,7 @@ public class ObjectGroupController extends BaseController {
objectGroupService.auditPolicy(entity,isAudit,Constants.INSERT_ACTION);
}
if(tip.toString().length()>0){
- addMessage(redirectAttributes,"success", tip.toString());
+ addMessage(redirectAttributes,"error", tip.toString());
}else{
addMessage(redirectAttributes,"success", "audit_success");
}
@@ -289,12 +292,12 @@ public class ObjectGroupController extends BaseController {
}else {
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"r");
Page<CfgIndexInfo> auditPage=new Page<CfgIndexInfo>(request,response,"r");
-
+ String tip=null;
try {
BeanUtils.copyProperties(searchPage, auditPage);
- String tip= auditAll(auditPage,isValid , cfg,props);
+ tip= auditAll(auditPage,isValid , cfg,props);
if(tip.toString().length()>0){
- addMessage(redirectAttributes,"success", tip.toString());
+ addMessage(redirectAttributes,"error", tip.toString());
}else{
addMessage(redirectAttributes,"success", "audit_success");
}
@@ -310,7 +313,7 @@ public class ObjectGroupController extends BaseController {
}
//无法保存状态
- // return list(model, cfg, request, response);
+ return list(model, cfg, request, response,tip);
}
return "redirect:" + adminPath +"/objgroup/list?functionId="+functionId;
}