修改了添加用户的接口
This commit is contained in:
parent
0ccea389b3
commit
c76002d293
|
@ -293,7 +293,7 @@ public class UserInfoController {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web端管理员添加用户表
|
* web端管理员添加用户
|
||||||
* @param userInfoAddRequest 用户表添加请求体
|
* @param userInfoAddRequest 用户表添加请求体
|
||||||
* @return 是否添加成功
|
* @return 是否添加成功
|
||||||
*/
|
*/
|
||||||
|
@ -304,6 +304,7 @@ public class UserInfoController {
|
||||||
public BaseResponse<Boolean> addUserInfo(@Valid @RequestBody UserInfoAddRequest userInfoAddRequest) {
|
public BaseResponse<Boolean> addUserInfo(@Valid @RequestBody UserInfoAddRequest userInfoAddRequest) {
|
||||||
UserInfo userInfo = commonService.copyProperties(userInfoAddRequest, UserInfo.class);
|
UserInfo userInfo = commonService.copyProperties(userInfoAddRequest, UserInfo.class);
|
||||||
userInfo.setParentUserId(-1L);
|
userInfo.setParentUserId(-1L);
|
||||||
|
userInfo.setUserRole(UserConstant.ADMIN_ROLE);
|
||||||
userInfoService.save(userInfo);
|
userInfoService.save(userInfo);
|
||||||
return ResultUtils.success(true);
|
return ResultUtils.success(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,13 +56,6 @@ public class UserInfoAddRequest implements Serializable {
|
||||||
@Schema(description = "密码(建议加密存储)", example = "qingcheng")
|
@Schema(description = "密码(建议加密存储)", example = "qingcheng")
|
||||||
private String userPassword;
|
private String userPassword;
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户角色
|
|
||||||
*/
|
|
||||||
@Pattern(regexp = "admin", message = "用户角色只能为 admin")
|
|
||||||
@Schema(description = "用户角色", example = "user")
|
|
||||||
private String userRole;
|
|
||||||
|
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user