update
This commit is contained in:
parent
8304c356bb
commit
9834372956
|
@ -15,4 +15,7 @@ public class UserDto extends User {
|
|||
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
private String jobName;
|
||||
|
||||
@ApiModelProperty(value = "权限名称")
|
||||
private String permissionsName;
|
||||
}
|
||||
|
|
|
@ -79,4 +79,7 @@ public class User extends BaseEntity{
|
|||
@ApiModelProperty(value = "电子签名")
|
||||
private String electronicSignature;
|
||||
|
||||
@ApiModelProperty(value = "权限 my:自己,dept:本部门,all:所有")
|
||||
private String permissions;
|
||||
|
||||
}
|
||||
|
|
|
@ -47,4 +47,8 @@ public class UserRequest {
|
|||
|
||||
@ApiModelProperty(value = "电子签名")
|
||||
private String electronicSignature;
|
||||
|
||||
@ApiModelProperty(value = "权限 my:自己,dept:本部门,all:所有")
|
||||
@NotBlank(message = "权限不能为空")
|
||||
private String permissions;
|
||||
}
|
||||
|
|
|
@ -450,6 +450,11 @@ public class UserServiceImpl extends BaseService<UserMapper, User> implements IU
|
|||
if (ObjectUtil.isNotNull(user)) return "登录账号不能重复";
|
||||
|
||||
LoginNameUtil.valid(userRequest.getLoginName());
|
||||
List<String> permissionsList = new ArrayList<>();
|
||||
permissionsList.add("my");
|
||||
permissionsList.add("dept");
|
||||
permissionsList.add("all");
|
||||
if (!permissionsList.contains(userRequest.getPermissions())) return "权限不正确";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,5 +52,20 @@ public interface UserWrapper extends BaseWrapper<User, UserDto> {
|
|||
.last("limit 1")
|
||||
);
|
||||
if (ObjectUtil.isNotNull(job)) dto.setJobName(job.getName());
|
||||
switch (obj.getPermissions())
|
||||
{
|
||||
case "my":
|
||||
dto.setPermissionsName("自己");
|
||||
break;
|
||||
case "dept":
|
||||
dto.setPermissionsName("本部门");
|
||||
break;
|
||||
case "all":
|
||||
dto.setPermissionsName("所有");
|
||||
break;
|
||||
default:
|
||||
dto.setPermissionsName("未知");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue