Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
4daed039
Commit
4daed039
authored
Jul 10, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
37666c11
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
AppUserDTO.java
...m/github/wxiaoqi/security/admin/feign/dto/AppUserDTO.java
+2
-0
UserMemberLevelBiz.java
...github/wxiaoqi/security/admin/biz/UserMemberLevelBiz.java
+10
-0
AppUserController.java
...github/wxiaoqi/security/admin/rest/AppUserController.java
+9
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/dto/AppUserDTO.java
View file @
4daed039
...
...
@@ -72,6 +72,8 @@ public class AppUserDTO {
private
Integer
lockDays
;
private
Integer
discount
;
private
Integer
memberLevel
;
//图标
private
String
icon
;
private
Integer
memberNo
;
private
Long
cardLeave
;
private
Integer
isBind
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/UserMemberLevelBiz.java
View file @
4daed039
...
...
@@ -30,6 +30,16 @@ public class UserMemberLevelBiz extends BaseBiz<BaseUserMemberLevelMapper,BaseUs
return
mapper
.
selectByExample
(
example
);
}
public
BaseUserMemberLevel
getLevel
(
Integer
level
)
{
Example
example
=
new
Example
(
BaseUserMemberLevel
.
class
);
example
.
createCriteria
().
andEqualTo
(
"isdel"
,
0
).
andEqualTo
(
"level"
,
level
);
List
<
BaseUserMemberLevel
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
.
size
()>
0
){
return
list
.
get
(
0
);
}
return
null
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
public
Map
<
Integer
,
Integer
>
getUserMemberLevelAndDisCountMapByLevels
(
List
<
Integer
>
levels
){
List
<
BaseUserMemberLevel
>
baseUserMemberLevels
=
mapper
.
selectUserMembersLevelByLevels
(
levels
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserController.java
View file @
4daed039
...
...
@@ -50,6 +50,9 @@ public class AppUserController extends CommonBaseController {
@Autowired
AppUserPositionBiz
positionBiz
;
@Autowired
private
UserMemberLevelBiz
userMemberLevelBiz
;
@GetMapping
(
"page"
)
public
TableResultResponse
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
Query
query
=
new
Query
(
params
);
...
...
@@ -126,6 +129,12 @@ public class AppUserController extends CommonBaseController {
UserMemberVo
memberVo
=
userMemberBiz
.
getMemberInfoByUserId
(
userid
);
if
(
memberVo
!=
null
){
BeanUtils
.
copyProperties
(
userDTO
,
memberVo
);
Integer
level
=
memberVo
.
getMemberLevel
();
BaseUserMemberLevel
memberLevel
=
userMemberLevelBiz
.
getLevel
(
level
);
if
(
memberLevel
!=
null
){
String
icon
=
memberLevel
.
getIcon
();
userDTO
.
setIcon
(
icon
);
}
}
}
AppUserPosition
userPosition
=
positionBiz
.
selectById
(
positionId
);
...
...
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