mirror of
https://gitee.com/republicline/rax-remote-v2.git
synced 2025-08-24 04:04:57 +08:00
用户更新错误
This commit is contained in:
parent
967ab6f22e
commit
49df6cd03e
|
@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
|
@ -184,8 +185,8 @@ public class SysUserController {
|
|||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('sys_user_edit')")
|
||||
public R updateUser(@Valid @RequestBody UserDTO userDto) {
|
||||
String hospitalId = sysHospitalService.getCurrentHospital();
|
||||
userDto.setHospitalId(Long.valueOf(hospitalId));
|
||||
SysUser sysUser = userService.getById(userDto.getUserId());
|
||||
BeanUtils.copyProperties(userDto, sysUser);
|
||||
Boolean b = userService.updateUser(userDto);
|
||||
return R.ok(b);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user