Commit 24d025af LN

bug修改

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