Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
govdna
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
开发共享交流平台
govdna
Commits
857e7476
Commit
857e7476
authored
Aug 07, 2018
by
Fred
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://115.233.227.46:8066/root/govdna.git
Conflicts: src/main/java/com/govmade/modules/system/service/impl/UserServiceImpl.java
parents
67b7c94b
786001e8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
AbstractController.java
.../govmade/modules/basic/controller/AbstractController.java
+1
-1
UserController.java
...com/govmade/modules/system/controller/UserController.java
+2
-1
UserServiceImpl.java
.../govmade/modules/system/service/impl/UserServiceImpl.java
+8
-6
No files found.
src/main/java/com/govmade/modules/basic/controller/AbstractController.java
View file @
857e7476
...
...
@@ -19,7 +19,7 @@ public abstract class AbstractController {
//return (UserEntity) SecurityUtils.getSubject().getPrincipal();
UserEntity
ue
=
new
UserEntity
();
ue
.
setDeptId
(
1L
);
return
null
;
return
ue
;
}
protected
Long
getUserId
()
{
...
...
src/main/java/com/govmade/modules/system/controller/UserController.java
View file @
857e7476
...
...
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.govmade.common.utils.Constant
;
import
com.govmade.common.utils.PageUtils
;
...
...
@@ -52,7 +53,7 @@ public class UserController extends AbstractController {
* 用户列表
*/
@GetMapping
(
"/list"
)
public
R
list
(
Map
<
String
,
Object
>
params
)
{
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
// 只有超级管理员,才能查看所有用户列表
if
(
getUserId
()
==
Constant
.
SUPER_ADMIN
)
{
...
...
src/main/java/com/govmade/modules/system/service/impl/UserServiceImpl.java
View file @
857e7476
...
...
@@ -16,11 +16,11 @@ import com.govmade.modules.system.service.UserService;
import
cn.hutool.core.util.StrUtil
;
/**
* 系统
用户
* 系统
管理 - 用户设置
*
* @author
chenshun
* @email
sunlightcs@gmail
.com
* @date 201
6年9月18日 上午9:46:09
* @author
Fred
* @email
fangtaosh@qq
.com
* @date 201
8年8月7日
*/
@Service
(
"UserService"
)
public
class
UserServiceImpl
extends
ServiceImpl
<
UserDao
,
UserEntity
>
implements
UserService
{
...
...
@@ -30,9 +30,11 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
// TODO Auto-generated method stub
String
username
=
(
String
)
params
.
get
(
"username"
);
Long
createBy
=
(
Long
)
params
.
get
(
"createBy"
);
Long
deptId
=
(
Long
)
params
.
get
(
"deptId"
);
Page
<
UserEntity
>
page
=
this
.
selectPage
(
new
Query
<
UserEntity
>(
params
).
getPage
(),
new
EntityWrapper
<
UserEntity
>()
.
like
(
StrUtil
.
isNotBlank
(
username
),
"username"
,
username
).
eq
(
createBy
!=
null
,
"create_by"
,
createBy
));
Page
<
UserEntity
>
page
=
this
.
selectPage
(
new
Query
<
UserEntity
>(
params
).
getPage
(),
new
EntityWrapper
<
UserEntity
>().
like
(
StrUtil
.
isNotBlank
(
username
),
"username"
,
username
)
.
eq
(
deptId
!=
null
,
"dept_id"
,
deptId
).
eq
(
createBy
!=
null
,
"create_by"
,
createBy
));
return
new
PageUtils
(
page
);
}
...
...
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