update 用户管理swagger
This commit is contained in:
+4
-3
@@ -30,6 +30,7 @@ import com.jero.modules.system.service.ISysDepartService;
|
|||||||
import com.jero.modules.system.service.ISysUserDepartService;
|
import com.jero.modules.system.service.ISysUserDepartService;
|
||||||
import com.jero.modules.system.service.ISysUserRoleService;
|
import com.jero.modules.system.service.ISysUserRoleService;
|
||||||
import com.jero.modules.system.service.ISysUserService;
|
import com.jero.modules.system.service.ISysUserService;
|
||||||
|
import com.jero.modules.system.vo.SetRoleBody;
|
||||||
import com.jero.modules.system.vo.SysDepartUsersVO;
|
import com.jero.modules.system.vo.SysDepartUsersVO;
|
||||||
import com.jero.modules.system.vo.SysUserRoleVO;
|
import com.jero.modules.system.vo.SysUserRoleVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -1461,10 +1462,10 @@ public class SysUserController {
|
|||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 2)
|
||||||
@ApiOperation(value="角色配置", notes="角色配置")
|
@ApiOperation(value="角色配置", notes="角色配置")
|
||||||
@PostMapping(value = "/setRole")
|
@PostMapping(value = "/setRole")
|
||||||
public Result<SysUser> setRole(@RequestBody JSONObject jsonObject) {
|
public Result<SysUser> setRole(@RequestBody SetRoleBody body) {
|
||||||
try {
|
try {
|
||||||
String ids = jsonObject.getString("ids");
|
String ids = body.getIds();
|
||||||
String roles = jsonObject.getString(SELECTED_ROLES);
|
String roles = body.getSelectedroles();
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
List<String> idList = Arrays.asList(ids.split(","));
|
||||||
for (String id : idList) {
|
for (String id : idList) {
|
||||||
SysUser sysUser = sysUserService.getById(id);
|
SysUser sysUser = sysUserService.getById(id);
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -34,24 +36,28 @@ public class SysUser implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工号(也是登录账号)
|
* 工号(也是登录账号)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = ")")
|
||||||
@Excel(name = "账号", width = 15)
|
@Excel(name = "账号", width = 15)
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 真实姓名
|
* 真实姓名
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "真实姓名")
|
||||||
@Excel(name = "用户姓名", width = 15)
|
@Excel(name = "用户姓名", width = 15)
|
||||||
private String realname;
|
private String realname;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位
|
* 岗位
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "岗位")
|
||||||
@Excel(name = "岗位", width = 15)
|
@Excel(name = "岗位", width = 15)
|
||||||
private String post;
|
private String post;
|
||||||
|
|
||||||
@@ -70,11 +76,13 @@ public class SysUser implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 头像
|
* 头像
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "头像")
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生日
|
* 生日
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "生日")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date birthday;
|
private Date birthday;
|
||||||
@@ -82,31 +90,41 @@ public class SysUser implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 性别(1:男 2:女),字典值和IAM相同
|
* 性别(1:男 2:女),字典值和IAM相同
|
||||||
*/
|
*/
|
||||||
@Excel(name = "性别", width = 15,dicCode="sex")
|
@ApiModelProperty(value = "性别")
|
||||||
|
@Excel(name = "性别", width = 15, dicCode = "sex")
|
||||||
@Dict(dicCode = "sex")
|
@Dict(dicCode = "sex")
|
||||||
private Integer sex;
|
private Integer sex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子邮件
|
* 电子邮件
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "电子邮件")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电话
|
* 电话
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "电话")
|
||||||
@Excel(name = "手机号码", width = 15)
|
@Excel(name = "手机号码", width = 15)
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门code(当前选择登录部门)
|
* 部门code(当前选择登录部门)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "部门code")
|
||||||
private String orgCode;
|
private String orgCode;
|
||||||
|
|
||||||
/**部门名称*/
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
@Excel(name = "组织机构", width = 15)
|
@Excel(name = "组织机构", width = 15)
|
||||||
private transient String orgCodeTxt;
|
private transient String orgCodeTxt;
|
||||||
|
|
||||||
/**角色名称*/
|
/**
|
||||||
|
* 角色名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "角色名称")
|
||||||
@Excel(name = "角色", width = 15)
|
@Excel(name = "角色", width = 15)
|
||||||
private transient String roleTxt;
|
private transient String roleTxt;
|
||||||
|
|
||||||
@@ -116,7 +134,8 @@ public class SysUser implements Serializable {
|
|||||||
* 所有IAM的poststatus = 1的数据,则此字段为1
|
* 所有IAM的poststatus = 1的数据,则此字段为1
|
||||||
* 所有IAM的poststatus = 0的数据,则此字段为2
|
* 所有IAM的poststatus = 0的数据,则此字段为2
|
||||||
*/
|
*/
|
||||||
@Excel(name = "状态", width = 15,dicCode="user_status")
|
@ApiModelProperty(value = "状态")
|
||||||
|
@Excel(name = "状态", width = 15, dicCode = "user_status")
|
||||||
@Dict(dicCode = "user_status")
|
@Dict(dicCode = "user_status")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@@ -124,57 +143,72 @@ public class SysUser implements Serializable {
|
|||||||
* 删除状态(0,正常,1已删除)
|
* 删除状态(0,正常,1已删除)
|
||||||
*/
|
*/
|
||||||
@TableLogic
|
@TableLogic
|
||||||
|
@ApiModelProperty(value = "删除状态")
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 座机号
|
* 座机号
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "座机号")
|
||||||
private String telephone;
|
private String telephone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
/**
|
/**
|
||||||
* 同步工作流引擎1同步0不同步
|
* 同步工作流引擎1同步0不同步
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "同步工作流引擎1同步0不同步")
|
||||||
private Integer activitiSync;
|
private Integer activitiSync;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 身份(0 普通成员 1 上级)
|
* 身份(0 普通成员 1 上级)
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
|
||||||
private Integer userIdentity;
|
private Integer userIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 负责部门
|
* 负责部门
|
||||||
*/
|
*/
|
||||||
@Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id")
|
@ApiModelProperty(value = "负责部门")
|
||||||
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
private String departIds;
|
private String departIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多租户id配置,编辑用户的时候设置
|
* 多租户id配置,编辑用户的时候设置
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "编辑用户的时候设置")
|
||||||
private String relTenantIds;
|
private String relTenantIds;
|
||||||
|
|
||||||
/**设备id uniapp推送用*/
|
/**
|
||||||
|
* 设备id uniapp推送用
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "设备id uniapp推送用")
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户域账号")
|
||||||
private String thirdId;//用户域账号
|
private String thirdId;//用户域账号
|
||||||
|
@ApiModelProperty(value = "用户数据来源")
|
||||||
private String thirdType;//用户数据来源
|
private String thirdType;//用户数据来源
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@@ -186,22 +220,26 @@ public class SysUser implements Serializable {
|
|||||||
* 人员类型
|
* 人员类型
|
||||||
* 000正式员工、002外部用户、001劳务工等
|
* 000正式员工、002外部用户、001劳务工等
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "人员类型")
|
||||||
private String typeId;
|
private String typeId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 职务级别
|
* 职务级别
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "职务级别")
|
||||||
private String dutyLevelId;
|
private String dutyLevelId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直接上级
|
* 直接上级
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "直接上级")
|
||||||
private String directLeadership;
|
private String directLeadership;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位状态
|
* 岗位状态
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty(value = "岗位状态")
|
||||||
private String postStatus;
|
private String postStatus;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@@ -212,7 +250,7 @@ public class SysUser implements Serializable {
|
|||||||
* 不能用get开头,否则会造成初始化queryWrapper的bug
|
* 不能用get开头,否则会造成初始化queryWrapper的bug
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String calcNameWorkNo(){
|
public String calcNameWorkNo() {
|
||||||
return this.realname + "(" + this.username + ")";
|
return this.realname + "(" + this.username + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.jero.modules.system.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liJiaRao
|
||||||
|
* @date 2023-11-17 15:27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IdMapBody {
|
||||||
|
/**id*/
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.jero.modules.system.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liJiaRao
|
||||||
|
* @date 2023-11-17 15:27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IdsMapBody {
|
||||||
|
/**ids*/
|
||||||
|
@ApiModelProperty(value = "ids")
|
||||||
|
private String ids;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.jero.modules.system.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liJiaRao
|
||||||
|
* @date 2023-11-17 15:27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SetRoleBody {
|
||||||
|
/**用户ids*/
|
||||||
|
@ApiModelProperty(value = "用户ids")
|
||||||
|
private String ids;
|
||||||
|
/**选择的角色Ids*/
|
||||||
|
@ApiModelProperty(value = "选择的角色Ids")
|
||||||
|
private String selectedroles;
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.system.vo;
|
package com.jero.modules.system.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -10,8 +11,10 @@ public class SysUserRoleVO implements Serializable{
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**角色id*/
|
/**角色id*/
|
||||||
|
@ApiModelProperty(value = "角色id")
|
||||||
private String roleId;
|
private String roleId;
|
||||||
/**对应的用户id集合*/
|
/**对应的用户id集合*/
|
||||||
|
@ApiModelProperty(value = "对应的用户id集合")
|
||||||
private List<String> userIdList;
|
private List<String> userIdList;
|
||||||
|
|
||||||
public SysUserRoleVO() {
|
public SysUserRoleVO() {
|
||||||
|
|||||||
Reference in New Issue
Block a user