新增修改用户接口(无需登录)

This commit is contained in:
2025-08-10 00:43:34 +08:00
parent 1a54eef1a6
commit cbb94cd116
2 changed files with 11 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/api/system/user/getByUserId/**", "/api/system/user/getByUserId/**",
"/api/system/user/getByUnionid/**", "/api/system/user/getByUnionid/**",
"/api/system/user/updateUserOfficeOpenidWithoutLogin", "/api/system/user/updateUserOfficeOpenidWithoutLogin",
"/api/system/user/updateWithoutLogin",
"/api/system/user-referee/getReferee/**", "/api/system/user-referee/getReferee/**",
"/api/system/dict-data/page", "/api/system/dict-data/page",
"/api/system/organization", "/api/system/organization",

View File

@@ -228,6 +228,16 @@ public class UserController extends BaseController {
return fail("修改失败"); return fail("修改失败");
} }
@OperationLog
@ApiOperation("修改用户(无需登录)")
@PutMapping("/updateWithoutLogin")
public ApiResult<?> updateWithoutLogin(@RequestBody User user) {
if (userService.updateUser(user)) {
return success("修改成功");
}
return fail("修改失败");
}
@PreAuthorize("hasAuthority('sys:user:remove')") @PreAuthorize("hasAuthority('sys:user:remove')")
@OperationLog @OperationLog
@ApiOperation("删除用户") @ApiOperation("删除用户")