Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
69f37a28
Commit
69f37a28
authored
Jun 28, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
列表增加职位
parent
44885cab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
3 deletions
+29
-3
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/ConstantFactory.java
+22
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/IConstantFactory.java
+5
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/warpper/UserWrapper.java
+1
-0
guns-sys/src/main/webapp/assets/modular/system/user/user.js
+1
-3
No files found.
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/ConstantFactory.java
View file @
69f37a28
...
...
@@ -24,6 +24,8 @@ import cn.stylefeng.guns.sys.core.constant.state.MenuStatus;
import
cn.stylefeng.guns.sys.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.sys.modular.system.entity.*
;
import
cn.stylefeng.guns.sys.modular.system.mapper.*
;
import
cn.stylefeng.guns.sys.modular.system.service.PositionService
;
import
cn.stylefeng.guns.sys.modular.system.service.UserPosService
;
import
cn.stylefeng.roses.core.util.SpringContextHolder
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -51,6 +53,8 @@ public class ConstantFactory implements IConstantFactory {
private
UserMapper
userMapper
=
SpringContextHolder
.
getBean
(
UserMapper
.
class
);
private
MenuMapper
menuMapper
=
SpringContextHolder
.
getBean
(
MenuMapper
.
class
);
private
NoticeMapper
noticeMapper
=
SpringContextHolder
.
getBean
(
NoticeMapper
.
class
);
private
UserPosService
userPosService
=
SpringContextHolder
.
getBean
(
UserPosService
.
class
);
private
PositionService
positionService
=
SpringContextHolder
.
getBean
(
PositionService
.
class
);
public
static
IConstantFactory
me
()
{
return
SpringContextHolder
.
getBean
(
"constantFactory"
);
...
...
@@ -329,5 +333,23 @@ public class ConstantFactory implements IConstantFactory {
return
parentDeptIds
;
}
@Override
public
String
getPositionName
(
Long
userId
)
{
StringBuilder
positionNames
=
new
StringBuilder
();
List
<
UserPos
>
userPosList
=
this
.
userPosService
.
list
(
new
QueryWrapper
<
UserPos
>().
eq
(
"user_id"
,
userId
));
if
(
userPosList
!=
null
&&
userPosList
.
size
()
>
0
)
{
for
(
UserPos
userPos
:
userPosList
)
{
Position
position
=
positionService
.
getById
(
userPos
.
getPosId
());
positionNames
.
append
(
position
.
getName
());
}
}
return
positionNames
.
toString
();
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/core/constant/factory/IConstantFactory.java
View file @
69f37a28
...
...
@@ -139,4 +139,9 @@ public interface IConstantFactory {
*/
List
<
Long
>
getParentDeptIds
(
Long
deptId
);
/**
* 获取用户的职位名称
*/
String
getPositionName
(
Long
userId
);
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/warpper/UserWrapper.java
View file @
69f37a28
...
...
@@ -54,6 +54,7 @@ public class UserWrapper extends BaseControllerWrapper {
map
.
put
(
"roleName"
,
ConstantFactory
.
me
().
getRoleName
((
String
)
map
.
get
(
"roleId"
)));
map
.
put
(
"deptName"
,
ConstantFactory
.
me
().
getDeptName
(
DecimalUtil
.
getLong
(
map
.
get
(
"deptId"
))));
map
.
put
(
"statusName"
,
ConstantFactory
.
me
().
getStatusName
((
String
)
map
.
get
(
"status"
)));
map
.
put
(
"positionName"
,
ConstantFactory
.
me
().
getPositionName
((
Long
)
map
.
get
(
"userId"
)));
}
}
guns-sys/src/main/webapp/assets/modular/system/user/user.js
View file @
69f37a28
...
...
@@ -28,10 +28,8 @@ layui.use(['layer', 'form', 'table', 'ztree', 'laydate', 'admin', 'ax'], functio
{
field
:
'userId'
,
hide
:
true
,
sort
:
true
,
title
:
'用户id'
},
{
field
:
'account'
,
align
:
"center"
,
sort
:
true
,
title
:
'账号'
},
{
field
:
'name'
,
align
:
"center"
,
sort
:
true
,
title
:
'姓名'
},
{
field
:
'sexName'
,
align
:
"center"
,
sort
:
true
,
title
:
'性别'
},
{
field
:
'roleName'
,
align
:
"center"
,
sort
:
true
,
title
:
'角色'
},
{
field
:
'deptName'
,
align
:
"center"
,
sort
:
true
,
title
:
'部门'
},
{
field
:
'
email'
,
align
:
"center"
,
sort
:
true
,
title
:
'邮箱'
,
minWidth
:
122
},
{
field
:
'
positionName'
,
align
:
"center"
,
sort
:
true
,
title
:
'职位'
},
{
field
:
'phone'
,
align
:
"center"
,
sort
:
true
,
title
:
'电话'
,
minWidth
:
117
},
{
field
:
'createTime'
,
align
:
"center"
,
sort
:
true
,
title
:
'创建时间'
,
minWidth
:
160
},
{
field
:
'status'
,
align
:
"center"
,
sort
:
true
,
templet
:
'#statusTpl'
,
title
:
'状态'
},
...
...
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