...
|
...
|
@@ -36,15 +36,24 @@ public class UserController { |
|
|
public PageInfo<USERS> list(@RequestParam(value = "pageNum",required = false,defaultValue = "1")
|
|
|
int pageNum,
|
|
|
@RequestParam(value = "pageSize",required = false,defaultValue = "5")
|
|
|
int pageSize){
|
|
|
return userService.selectAllUser(pageNum,pageSize);
|
|
|
int pageSize,
|
|
|
@RequestParam(value = "username",required = false) String username,
|
|
|
@RequestParam(value = "realname",required = false) String realname)
|
|
|
{
|
|
|
USERS user = new USERS();
|
|
|
//前端input传过来的为空,需要判断下
|
|
|
username = username.isEmpty()?null:username;
|
|
|
realname = realname.isEmpty()?null:realname;
|
|
|
user.setUsername(username);
|
|
|
user.setRealname(realname);
|
|
|
return userService.selectAllUser(pageNum,pageSize,user);
|
|
|
}
|
|
|
|
|
|
public String getusername(){
|
|
|
public String getCurrentUser(){
|
|
|
|
|
|
//通过session获取当前登录的用户信息
|
|
|
UserDetails userDetails =(UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
|
|
return "欢迎回来:"+userDetails.getUsername();
|
|
|
return userDetails.getUsername();
|
|
|
}
|
|
|
|
|
|
@LogAnnotation(moduleName = "用户管理",operate = "用户编辑")
|
...
|
...
|
|