Commit 24d025af LN

bug修改

1 个父辈 c9c7b9d2
...@@ -138,10 +138,12 @@ public class BoxKanbanController { ...@@ -138,10 +138,12 @@ public class BoxKanbanController {
} }
//判断组 //判断组
String groupId = criteria.getGroupId(); String groupId = criteria.getGroupId();
if(groupId!=null){
List<String> cidList = dataCache.getCidsByGroupId(groupId, true); List<String> cidList = dataCache.getCidsByGroupId(groupId, true);
if (!cidList.contains(datalog.getCid())) { if (!cidList.contains(datalog.getCid())) {
continue; continue;
} }
}
boolean statusOk = false; boolean statusOk = false;
Date lastUpdateTime = new Date((new Date().getTime()) - 10 * 60 * 1000); Date lastUpdateTime = new Date((new Date().getTime()) - 10 * 60 * 1000);
//正常 //正常
......
...@@ -115,28 +115,7 @@ public class TaskController { ...@@ -115,28 +115,7 @@ public class TaskController {
} }
return getTaskList(groupId,cids); return getTaskList(groupId,cids);
} }
// private List<String> getCids(String groupId,String[] cids) {
// List<String> cidList = Lists.newArrayList();
// if (!ObjectUtils.isEmpty(cids)) {
// cidList = Lists.newArrayList(cids);
// }
//
// if (!ObjectUtils.isEmpty(groupId)) {
// for (Storage storage : dataCache.getAllStorage().values()) {
//// String storageGroupId = storage.getGroupId();
//// if (ObjectUtils.isEmpty(storageGroupId)) {
//// storageGroupId = "";
//// }
//// if (storageGroupId != null && storageGroupId.equals(groupId)) {
//// cidList.add(storage.getCid());
//// }
// if(storage.IsRightGroup(groupId)){
// cidList.add(storage.getCid());
// }
// }
// }
// return cidList;
// }
private List<TaskDto> getTaskList(String groupId, String[] cids){ private List<TaskDto> getTaskList(String groupId, String[] cids){
List<DataLog> resultTasks = Lists.newArrayList(); List<DataLog> resultTasks = Lists.newArrayList();
List<DataLog> allTasks = taskService.getAllTasks(); List<DataLog> allTasks = taskService.getAllTasks();
......
...@@ -107,10 +107,11 @@ public class RoleController { ...@@ -107,10 +107,11 @@ public class RoleController {
@PreAuthorize("@el.check('roles:edit')") @PreAuthorize("@el.check('roles:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody RoleDto roleDto) { public ResponseEntity<Object> update(@Validated @RequestBody RoleDto roleDto) {
Role resources=roleMapper.toEntity(roleDto); Role resources=roleMapper.toEntity(roleDto);
Role role = roleManager.get(resources.getId());
if (resources.getId() == null) { if (resources.getId() == null) {
throw new ValidateException("smfcode.valueCanotNull","{0}不能为空",new String[]{"ID"} ); throw new ValidateException("smfcode.valueCanotNull","{0}不能为空",new String[]{"ID"} );
} }
resources.setMenus(role.getMenus());
roleManager.saveRole(resources); roleManager.saveRole(resources);
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} }
...@@ -123,19 +124,19 @@ public class RoleController { ...@@ -123,19 +124,19 @@ public class RoleController {
if (resources.getId() == null) { if (resources.getId() == null) {
throw new ValidateException("smfcode.valueCanotNull","{0}不能为空",new String[]{"ID"} ); throw new ValidateException("smfcode.valueCanotNull","{0}不能为空",new String[]{"ID"} );
} }
throw new ValidateException("smfcode.valueCanotNull","{0}不能为空",new String[]{"ID"} ); // throw new ValidateException("smfcode.valueCanotNull","{0}不能为空",new String[]{"ID"} );
// Role role = roleManager.get(resources.getId()); Role role = roleManager.get(resources.getId());
// //判断ID是否存在 //判断ID是否存在
//
// Set<String> menuIds=resources.getMenus(); Set<String> menuIds=resources.getMenus();
//
// Query query=new Query(Criteria.where("id").in(menuIds)); Query query=new Query(Criteria.where("id").in(menuIds));
// List<Menu> menus=menuManager.findByQuery(query); List<Menu> menus=menuManager.findByQuery(query);
// if(menus==null&&(menus.size()!=menuIds.size())){ if(menus==null&&(menus.size()!=menuIds.size())){
// throw new ValidateException("smfcode.menuNotExist","菜单{0}不存在",new String[]{"ID"} ); throw new ValidateException("smfcode.menuNotExist","菜单{0}不存在",new String[]{"ID"} );
// } }
// roleManager.updateMenu(resources); roleManager.updateMenu(resources);
// return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} }
@ApiOperation("删除角色") @ApiOperation("删除角色")
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!