修改了添加用户的接口

This commit is contained in:
chen-xin-zhi 2025-06-03 14:25:24 +08:00
parent 0ccea389b3
commit c76002d293
2 changed files with 2 additions and 8 deletions

View File

@ -293,7 +293,7 @@ public class UserInfoController {
/**
* web端管理员添加用户
* web端管理员添加用户
* @param userInfoAddRequest 用户表添加请求体
* @return 是否添加成功
*/
@ -304,6 +304,7 @@ public class UserInfoController {
public BaseResponse<Boolean> addUserInfo(@Valid @RequestBody UserInfoAddRequest userInfoAddRequest) {
UserInfo userInfo = commonService.copyProperties(userInfoAddRequest, UserInfo.class);
userInfo.setParentUserId(-1L);
userInfo.setUserRole(UserConstant.ADMIN_ROLE);
userInfoService.save(userInfo);
return ResultUtils.success(true);
}

View File

@ -56,13 +56,6 @@ public class UserInfoAddRequest implements Serializable {
@Schema(description = "密码(建议加密存储)", example = "qingcheng")
private String userPassword;
/**
* 用户角色
*/
@Pattern(regexp = "admin", message = "用户角色只能为 admin")
@Schema(description = "用户角色", example = "user")
private String userRole;
@Serial
private static final long serialVersionUID = 1L;