Commit 857e7476 authored by Fred's avatar Fred

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
...@@ -19,7 +19,7 @@ public abstract class AbstractController { ...@@ -19,7 +19,7 @@ public abstract class AbstractController {
//return (UserEntity) SecurityUtils.getSubject().getPrincipal(); //return (UserEntity) SecurityUtils.getSubject().getPrincipal();
UserEntity ue = new UserEntity(); UserEntity ue = new UserEntity();
ue.setDeptId(1L); ue.setDeptId(1L);
return null; return ue;
} }
protected Long getUserId() { protected Long getUserId() {
......
...@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.GetMapping; ...@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.govmade.common.utils.Constant; import com.govmade.common.utils.Constant;
import com.govmade.common.utils.PageUtils; import com.govmade.common.utils.PageUtils;
...@@ -52,7 +53,7 @@ public class UserController extends AbstractController { ...@@ -52,7 +53,7 @@ public class UserController extends AbstractController {
* 用户列表 * 用户列表
*/ */
@GetMapping("/list") @GetMapping("/list")
public R list(Map<String, Object> params) { public R list(@RequestParam Map<String, Object> params) {
// 只有超级管理员,才能查看所有用户列表 // 只有超级管理员,才能查看所有用户列表
if (getUserId() == Constant.SUPER_ADMIN) { if (getUserId() == Constant.SUPER_ADMIN) {
......
...@@ -16,11 +16,11 @@ import com.govmade.modules.system.service.UserService; ...@@ -16,11 +16,11 @@ import com.govmade.modules.system.service.UserService;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
/** /**
* 系统用户 * 系统管理 - 用户设置
* *
* @author chenshun * @author Fred
* @email sunlightcs@gmail.com * @email fangtaosh@qq.com
* @date 2016年9月18日 上午9:46:09 * @date 2018年8月7日
*/ */
@Service("UserService") @Service("UserService")
public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements UserService { public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements UserService {
...@@ -30,9 +30,11 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements ...@@ -30,9 +30,11 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
// TODO Auto-generated method stub // TODO Auto-generated method stub
String username = (String) params.get("username"); String username = (String) params.get("username");
Long createBy = (Long) params.get("createBy"); 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>() Page<UserEntity> page = this.selectPage(new Query<UserEntity>(params).getPage(),
.like(StrUtil.isNotBlank(username), "username", username).eq(createBy != null, "create_by", createBy)); 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); return new PageUtils(page);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment