Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
work_service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
work_service
Commits
7b60811d
Commit
7b60811d
authored
Mar 08, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
e426c4ac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
BASE_RESP_CODE_ENUM.java
...wisenergy/common/utils/exception/BASE_RESP_CODE_ENUM.java
+1
-0
WorkUserServiceImpl.java
...n/java/cn/wisenergy/service/impl/WorkUserServiceImpl.java
+6
-0
No files found.
wisenergy-common/src/main/java/cn/wisenergy/common/utils/exception/BASE_RESP_CODE_ENUM.java
View file @
7b60811d
...
...
@@ -84,6 +84,7 @@ public enum BASE_RESP_CODE_ENUM {
NON_PROJECT_OPPORTUNITYNUMBERNAME_ISEMPTY
(
"664"
,
"非项目,无商机属性"
),
THEPROJECT_HASBEEN_CLOSED
(
"665"
,
"该项目/商机已经结束,请重新选择填报"
),
THISTYPEOF_WORKINGHOURS_HASENDE
(
"666"
,
"该工时类型已经结束,请选择其他类型"
),
CHOOSEATLEASTONEROLE
(
"667"
,
"至少保留一个角色"
),
;
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkUserServiceImpl.java
View file @
7b60811d
...
...
@@ -211,9 +211,15 @@ public class WorkUserServiceImpl implements WorkUserService {
public
Boolean
modifyRole
(
Integer
userId
,
List
<
Integer
>
roleIds
,
Integer
status
)
{
log
.
info
(
"WorkUserServiceImpl[]modifyRole[].input.param.userId:{},roleIds:{},status:{}"
+
userId
,
roleIds
,
status
);
PageHelper
.
clearPage
();
if
(
CollectionUtils
.
isEmpty
(
roleIds
))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
CHOOSEATLEASTONEROLE
);
}
if
(
UserRoleLevelUtils
.
levelIsRepeat
(
roleIds
))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
DUPLICATEROLEPERMISSIONS
);
}
if
(
null
==
userId
)
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
WorkUser
workUser
=
workUserMapper
.
selectById
(
userId
);
if
(
null
==
workUser
)
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
QUERY_DATA_IS_NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment