Merge branch 'dev' of https://github.com/fit2cloudrd/metersphere-server into dev
This commit is contained in:
commit
18e2cc8960
|
@ -118,10 +118,8 @@ public class UserController {
|
|||
return userService.getUserList();
|
||||
}
|
||||
|
||||
@PostMapping("/update/currentuser")
|
||||
@PostMapping("/update/current")
|
||||
public UserDTO updateCurrentUser(@RequestBody User user) {
|
||||
SessionUser sessionUser = SessionUtils.getUser();
|
||||
BeanUtils.copyProperties(user, sessionUser);
|
||||
userService.updateUser(user);
|
||||
return SessionUtils.getUser();
|
||||
}
|
||||
|
|
|
@ -124,6 +124,9 @@ public class UserService {
|
|||
}
|
||||
|
||||
public void updateUser(User user) {
|
||||
UserDTO userDTO = getUserDTO(user.getId());
|
||||
BeanUtils.copyProperties(user, userDTO);
|
||||
SessionUtils.putUser(SessionUser.fromUser(userDTO));
|
||||
user.setUpdateTime(System.currentTimeMillis());
|
||||
userMapper.updateByPrimaryKeySelective(user);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
result: {},
|
||||
updateVisible: false,
|
||||
tableData: [],
|
||||
updatePath: '/user/update/currentuser',
|
||||
updatePath: '/user/update/current',
|
||||
form: {},
|
||||
rule: {
|
||||
name: [
|
||||
|
|
Loading…
Reference in New Issue