Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 24d025af
由
LN
编写于
2021-10-11 09:52:50 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
c9c7b9d2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
39 行删除
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
src/main/java/com/neotel/smfcore/core/system/rest/TaskController.java
src/main/java/com/neotel/smfcore/security/rest/RoleController.java
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
查看文件 @
24d025a
...
...
@@ -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
);
...
...
src/main/java/com/neotel/smfcore/core/system/rest/TaskController.java
查看文件 @
24d025a
...
...
@@ -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
();
...
...
src/main/java/com/neotel/smfcore/security/rest/RoleController.java
查看文件 @
24d025a
...
...
@@ -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!
Cancel
请
注册
或
登录
后发表评论