update 优化修改用户信息校验

This commit is contained in:
AprilWind 2024-05-25 22:43:33 +08:00
parent 11bfde3dc1
commit 2cf2cc46f2

View File

@ -62,7 +62,7 @@ public class SysProfileController extends BaseController {
@RepeatSubmit
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping
public R<Void> updateProfile(@RequestBody SysUserProfileBo profile) {
public R<Void> updateProfile(@Validated @RequestBody SysUserProfileBo profile) {
SysUserBo user = BeanUtil.toBean(profile, SysUserBo.class);
user.setUserId(LoginHelper.getUserId());
String username = LoginHelper.getUsername();