mirror of https://gitee.com/maxjhandsome/pig
🐛 Fixing a bug. fix #IOWMD
This commit is contained in:
parent
3a0f0f1656
commit
86d9885259
|
@ -130,8 +130,7 @@ public class UserController extends BaseController {
|
|||
*/
|
||||
@PutMapping
|
||||
public R<Boolean> userUpdate(@RequestBody UserDTO userDto) {
|
||||
SysUser user = userService.selectById(userDto.getUserId());
|
||||
return new R<>(userService.updateUser(userDto, user.getUsername()));
|
||||
return new R<>(userService.updateUser(userDto));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -175,8 +174,8 @@ public class UserController extends BaseController {
|
|||
* @return 用户集合
|
||||
*/
|
||||
@RequestMapping("/userPage")
|
||||
public Page userPage(@RequestParam Map<String, Object> params,UserVO userVO) {
|
||||
return userService.selectWithRolePage(new Query(params),userVO);
|
||||
public Page userPage(@RequestParam Map<String, Object> params, UserVO userVO) {
|
||||
return userService.selectWithRolePage(new Query(params), userVO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -250,8 +250,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(value = "user_details", key = "#username")
|
||||
public Boolean updateUser(UserDTO userDto, String username) {
|
||||
@CacheEvict(value = "user_details", key = "#userDto.username")
|
||||
public Boolean updateUser(UserDTO userDto) {
|
||||
SysUser sysUser = new SysUser();
|
||||
BeanUtils.copyProperties(userDto, sysUser);
|
||||
sysUser.setUpdateTime(new Date());
|
||||
|
|
Loading…
Reference in New Issue