cloud:完善 system、infra、bpm 的 api swagger 注解

This commit is contained in:
YunaiV 2023-10-22 14:30:50 +08:00
parent 323d160d61
commit 08c5248757
30 changed files with 251 additions and 304 deletions

View File

@ -22,12 +22,26 @@
<artifactId>yudao-common</artifactId> <artifactId>yudao-common</artifactId>
</dependency> </dependency>
<!-- Web 相关 -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<scope>provided</scope>
</dependency>
<!-- 参数校验 --> <!-- 参数校验 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -1,23 +1,27 @@
package cn.iocoder.yudao.module.bpm.api.task; package cn.iocoder.yudao.module.bpm.api.task;
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import cn.iocoder.yudao.module.bpm.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid; import javax.validation.Valid;
/** @FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
* 流程实例 Api 接口 @Tag(name = "RPC 服务 - 流程实例")
*
* @author 芋道源码
*/
public interface BpmProcessInstanceApi { public interface BpmProcessInstanceApi {
/** String PREFIX = ApiConstants.PREFIX + "/process-instance";
* 创建流程实例提供给内部
* @PostMapping(PREFIX + "/create")
* @param userId 用户编号 @Operation(summary = "创建流程实例(提供给内部),返回实例编号")
* @param reqDTO 创建信息 @Parameter(name = "userId", description = "用户编号", required = true, example = "1")
* @return 实例的编号 String createProcessInstance(@RequestParam("userId") Long userId,
*/ @Valid @RequestBody BpmProcessInstanceCreateReqDTO reqDTO);
String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO reqDTO);
} }

View File

@ -1,33 +1,24 @@
package cn.iocoder.yudao.module.bpm.api.task.dto; package cn.iocoder.yudao.module.bpm.api.task.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import java.util.Map; import java.util.Map;
/** @Schema(description = "RPC 服务 - 流程实例的创建 Request DTO")
* 流程实例的创建 Request DTO
*
* @author 芋道源码
*/
@Data @Data
public class BpmProcessInstanceCreateReqDTO { public class BpmProcessInstanceCreateReqDTO {
/** @Schema(description = "流程定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "leave")
* 流程定义的标识
*/
@NotEmpty(message = "流程定义的标识不能为空") @NotEmpty(message = "流程定义的标识不能为空")
private String processDefinitionKey; private String processDefinitionKey;
/**
* 变量实例 @Schema(description = "变量实例", requiredMode = Schema.RequiredMode.REQUIRED)
*/
private Map<String, Object> variables; private Map<String, Object> variables;
/** @Schema(description = "业务的唯一标识", requiredMode = Schema.RequiredMode.REQUIRED)
* 业务的唯一标识 @NotEmpty(message = "业务的唯一标识不能为空")
* private String businessKey; // 例如说请假申请的编号通过它可以查询到对应的实例
* 例如说请假申请的编号通过它可以查询到对应的实例
*/
@NotEmpty(message = "业务的唯一标识")
private String businessKey;
} }

View File

@ -0,0 +1,23 @@
package cn.iocoder.yudao.module.bpm.enums;
import cn.iocoder.yudao.framework.common.enums.RpcConstants;
/**
* API 相关的枚举
*
* @author 芋道源码
*/
public class ApiConstants {
/**
* 服务名
*
* 注意需要保证和 spring.application.name 保持一致
*/
public static final String NAME = "bpm-server";
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/bpm";
public static final String VERSION = "1.0.0";
}

View File

@ -15,8 +15,8 @@ public class FileCreateReqDTO {
@Schema(description = "文件路径", example = "xxx.png") @Schema(description = "文件路径", example = "xxx.png")
private String path; private String path;
@Schema(description = "文件内容", required = true) @Schema(description = "文件内容", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "文件内容不能为空") @NotEmpty(message = "文件内容不能为空")
private byte[] content; private byte[] content;
} }

View File

@ -13,43 +13,43 @@ public class ApiAccessLogCreateReqDTO {
@Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId; private String traceId;
@Schema(description = "用户编号", required = true, example = "1024") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long userId; private Long userId;
@Schema(description = "用户类型", required = true, example = "1") @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer userType; private Integer userType;
@Schema(description = "应用名", required = true, example = "system-server") @Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "system-server")
@NotNull(message = "应用名不能为空") @NotNull(message = "应用名不能为空")
private String applicationName; private String applicationName;
@Schema(description = "请求方法名", required = true, example = "GET") @Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET")
@NotNull(message = "http 请求方法不能为空") @NotNull(message = "http 请求方法不能为空")
private String requestMethod; private String requestMethod;
@Schema(description = "请求地址", required = true, example = "/xxx/yyy") @Schema(description = "请求地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "/xxx/yyy")
@NotNull(message = "访问地址不能为空") @NotNull(message = "访问地址不能为空")
private String requestUrl; private String requestUrl;
@Schema(description = "请求参数", required = true) @Schema(description = "请求参数", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "请求参数不能为空") @NotNull(message = "请求参数不能为空")
private String requestParams; private String requestParams;
@Schema(description = "用户 IP", required = true, example = "127.0.0.1") @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1")
@NotNull(message = "ip 不能为空") @NotNull(message = "ip 不能为空")
private String userIp; private String userIp;
@Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0")
@NotNull(message = "User-Agent 不能为空") @NotNull(message = "User-Agent 不能为空")
private String userAgent; private String userAgent;
@Schema(description = "开始时间", required = true) @Schema(description = "开始时间",requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始请求时间不能为空") @NotNull(message = "开始请求时间不能为空")
private LocalDateTime beginTime; private LocalDateTime beginTime;
@Schema(description = "结束时间", required = true) @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "结束请求时间不能为空") @NotNull(message = "结束请求时间不能为空")
private LocalDateTime endTime; private LocalDateTime endTime;
@Schema(description = "执行时长,单位:毫秒", required = true) @Schema(description = "执行时长,单位:毫秒", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "执行时长不能为空") @NotNull(message = "执行时长不能为空")
private Integer duration; private Integer duration;
@Schema(description = "结果码", required = true) @Schema(description = "结果码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "错误码不能为空") @NotNull(message = "错误码不能为空")
private Integer resultCode; private Integer resultCode;
@Schema(description = "结果提示") @Schema(description = "结果提示")
private String resultMsg; private String resultMsg;
} }

View File

@ -13,56 +13,56 @@ public class ApiErrorLogCreateReqDTO {
@Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId; private String traceId;
@Schema(description = "用户编号", required = true, example = "1024") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long userId; private Long userId;
@Schema(description = "用户类型", required = true, example = "1") @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer userType; private Integer userType;
@Schema(description = "应用名", required = true, example = "system-server") @Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "system-server")
@NotNull(message = "应用名不能为空") @NotNull(message = "应用名不能为空")
private String applicationName; private String applicationName;
@Schema(description = "请求方法名", required = true, example = "GET") @Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET")
@NotNull(message = "http 请求方法不能为空") @NotNull(message = "http 请求方法不能为空")
private String requestMethod; private String requestMethod;
@Schema(description = "请求地址", required = true, example = "/xxx/yyy") @Schema(description = "请求地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "/xxx/yyy")
@NotNull(message = "访问地址不能为空") @NotNull(message = "访问地址不能为空")
private String requestUrl; private String requestUrl;
@Schema(description = "请求参数", required = true) @Schema(description = "请求参数", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "请求参数不能为空") @NotNull(message = "请求参数不能为空")
private String requestParams; private String requestParams;
@Schema(description = "用户 IP", required = true, example = "127.0.0.1") @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1")
@NotNull(message = "ip 不能为空") @NotNull(message = "ip 不能为空")
private String userIp; private String userIp;
@Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0")
@NotNull(message = "User-Agent 不能为空") @NotNull(message = "User-Agent 不能为空")
private String userAgent; private String userAgent;
@Schema(description = "异常时间", required = true) @Schema(description = "异常时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常时间不能为空") @NotNull(message = "异常时间不能为空")
private LocalDateTime exceptionTime; private LocalDateTime exceptionTime;
@Schema(description = "异常名", required = true) @Schema(description = "异常名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常名不能为空") @NotNull(message = "异常名不能为空")
private String exceptionName; private String exceptionName;
@Schema(description = "异常发生的类全名", required = true) @Schema(description = "异常发生的类全名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的类全名不能为空") @NotNull(message = "异常发生的类全名不能为空")
private String exceptionClassName; private String exceptionClassName;
@Schema(description = "异常发生的类文件", required = true) @Schema(description = "异常发生的类文件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的类文件不能为空") @NotNull(message = "异常发生的类文件不能为空")
private String exceptionFileName; private String exceptionFileName;
@Schema(description = "异常发生的方法名", required = true) @Schema(description = "异常发生的方法名", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的方法名不能为空") @NotNull(message = "异常发生的方法名不能为空")
private String exceptionMethodName; private String exceptionMethodName;
@Schema(description = "异常发生的方法所在行", required = true) @Schema(description = "异常发生的方法所在行", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常发生的方法所在行不能为空") @NotNull(message = "异常发生的方法所在行不能为空")
private Integer exceptionLineNumber; private Integer exceptionLineNumber;
@Schema(description = "异常的栈轨迹异常的栈轨迹", required = true) @Schema(description = "异常的栈轨迹异常的栈轨迹", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常的栈轨迹不能为空") @NotNull(message = "异常的栈轨迹不能为空")
private String exceptionStackTrace; private String exceptionStackTrace;
@Schema(description = "异常导致的根消息", required = true) @Schema(description = "异常导致的根消息", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常导致的根消息不能为空") @NotNull(message = "异常导致的根消息不能为空")
private String exceptionRootCauseMessage; private String exceptionRootCauseMessage;
@Schema(description = "异常导致的消息", required = true) @Schema(description = "异常导致的消息", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常导致的消息不能为空") @NotNull(message = "异常导致的消息不能为空")
private String exceptionMessage; private String exceptionMessage;
} }

View File

@ -1,37 +1,25 @@
package cn.iocoder.yudao.module.system.api.dept.dto; package cn.iocoder.yudao.module.system.api.dept.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
/** @Schema(description = "RPC 服务 - 部门 Response DTO")
* 部门 Response DTO
*
* @author 芋道源码
*/
@Data @Data
public class DeptRespDTO { public class DeptRespDTO {
/** @Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
* 部门编号
*/
private Long id; private Long id;
/**
* 部门名称 @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
*/
private String name; private String name;
/**
* 父部门编号 @Schema(description = "父部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
*/
private Long parentId; private Long parentId;
/**
* 负责人的用户编号 @Schema(description = "负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
*/
private Long leaderUserId; private Long leaderUserId;
/**
* 部门状态 @Schema(description = "部门状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
* private Integer status; // 参见 CommonStatusEnum 枚举
* 枚举 {@link CommonStatusEnum}
*/
private Integer status;
} }

View File

@ -7,13 +7,16 @@ import lombok.Data;
@Data @Data
public class DictDataRespDTO { public class DictDataRespDTO {
@Schema(description = "字典标签", required = true, example = "芋道") @Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String label; private String label;
@Schema(description = "字典值", required = true, example = "iocoder")
private String value;
@Schema(description = "字典类型", required = true, example = "sys_common_sex")
private String dictType;
@Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1")
private Integer status;
} @Schema(description = "字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "iocoder")
private String value;
@Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "sys_common_sex")
private String dictType;
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; // 参见 CommonStatusEnum 枚举
}

View File

@ -1,33 +1,24 @@
package cn.iocoder.yudao.module.system.api.errorcode.dto; package cn.iocoder.yudao.module.system.api.errorcode.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
/** @Schema(description = "RPC 服务 - 错误码自动生成 Request DTO")
* 错误码自动生成 DTO
*
* @author dylan
*/
@Data @Data
@Accessors(chain = true)
public class ErrorCodeAutoGenerateReqDTO { public class ErrorCodeAutoGenerateReqDTO {
/** @Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao")
* 应用名
*/
@NotNull(message = "应用名不能为空") @NotNull(message = "应用名不能为空")
private String applicationName; private String applicationName;
/**
* 错误码编码 @Schema(description = "错误码编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
*/
@NotNull(message = "错误码编码不能为空") @NotNull(message = "错误码编码不能为空")
private Integer code; private Integer code;
/**
* 错误码错误提示 @Schema(description = "错误码错误提示", requiredMode = Schema.RequiredMode.REQUIRED, example = "业务不能为空")
*/
@NotEmpty(message = "错误码错误提示不能为空") @NotEmpty(message = "错误码错误提示不能为空")
private String message; private String message;

View File

@ -1,28 +1,28 @@
package cn.iocoder.yudao.module.system.api.errorcode.dto; package cn.iocoder.yudao.module.system.api.errorcode.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** @Schema(description = "RPC 服务 - 错误码 Response DTO")
* 错误码的 Response DTO
*
* @author 芋道源码
*/
@Data @Data
public class ErrorCodeRespDTO { public class ErrorCodeRespDTO {
/** /**
* 错误码编码 * 错误码编码
*/ */
@Schema(description = "错误码编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
private Integer code; private Integer code;
/** /**
* 错误码错误提示 * 错误码错误提示
*/ */
@Schema(description = "错误码错误提示", requiredMode = Schema.RequiredMode.REQUIRED, example = "业务不能为空")
private String message; private String message;
/** /**
* 更新时间 * 更新时间
*/ */
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime updateTime; private LocalDateTime updateTime;
} }

View File

@ -8,40 +8,36 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
/** @Schema(description = "RPC 服务 - 登录日志创建 Request DTO")
* 登录日志创建 Request DTO
*
* @author 芋道源码
*/
@Data @Data
public class LoginLogCreateReqDTO { public class LoginLogCreateReqDTO {
@Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", required = true, example = "1" ) @Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1" )
@NotNull(message = "日志类型不能为空") @NotNull(message = "日志类型不能为空")
private Integer logType; private Integer logType;
@Schema(description = "链路追踪编号", required = true, example = "89aca178-a370-411c-ae02-3f0d672be4ab") @Schema(description = "链路追踪编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId; private String traceId;
@Schema(description = "用户编号", example = "666") @Schema(description = "用户编号", example = "666")
private Long userId; private Long userId;
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2" ) @Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2" )
@NotNull(message = "用户类型不能为空") @NotNull(message = "用户类型不能为空")
private Integer userType; private Integer userType;
@Schema(description = "用户账号", required = true, example = "yudao") @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao")
@NotBlank(message = "用户账号不能为空") @NotBlank(message = "用户账号不能为空")
@Size(max = 30, message = "用户账号长度不能超过30个字符") @Size(max = 30, message = "用户账号长度不能超过30个字符")
private String username; private String username;
@Schema(description = "登录结果,参见 LoginResultEnum 枚举类", required = true, example = "1") @Schema(description = "登录结果,参见 LoginResultEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "登录结果不能为空") @NotNull(message = "登录结果不能为空")
private Integer result; private Integer result;
@Schema(description = "用户 IP", required = true, example = "127.0.0.1") @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1")
@NotEmpty(message = "用户 IP 不能为空") @NotEmpty(message = "用户 IP 不能为空")
private String userIp; private String userIp;
@Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0")
private String userAgent; private String userAgent;
} }

View File

@ -15,22 +15,22 @@ public class OperateLogCreateReqDTO {
@Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") @Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
private String traceId; private String traceId;
@Schema(description = "用户编号", required = true, example = "1024") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "用户编号不能为空") @NotNull(message = "用户编号不能为空")
private Long userId; private Long userId;
@Schema(description = "用户类型", required = true, example = "1") @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "用户类型不能为空") @NotNull(message = "用户类型不能为空")
private Integer userType; private Integer userType;
@Schema(description = "操作模块", required = true, example = "订单") @Schema(description = "操作模块", requiredMode = Schema.RequiredMode.REQUIRED, example = "订单")
@NotEmpty(message = "操作模块不能为空") @NotEmpty(message = "操作模块不能为空")
private String module; private String module;
@Schema(description = "操作名", required = true, example = "创建订单") @Schema(description = "操作名", requiredMode = Schema.RequiredMode.REQUIRED, example = "创建订单")
@NotEmpty(message = "操作名") @NotEmpty(message = "操作名")
private String name; private String name;
@Schema(description = "操作分类,参见 SysOperateLogTypeEnum 枚举类", required = true, example = "1") @Schema(description = "操作分类,参见 SysOperateLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "操作分类不能为空") @NotNull(message = "操作分类不能为空")
private Integer type; private Integer type;
@ -40,38 +40,38 @@ public class OperateLogCreateReqDTO {
@Schema(description = "拓展字段", example = "{'orderId': 1}") @Schema(description = "拓展字段", example = "{'orderId': 1}")
private Map<String, Object> exts; private Map<String, Object> exts;
@Schema(description = "请求方法名", required = true, example = "GET") @Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET")
@NotEmpty(message = "请求方法名不能为空") @NotEmpty(message = "请求方法名不能为空")
private String requestMethod; private String requestMethod;
@Schema(description = "请求地址", required = true, example = "/xxx/yyy") @Schema(description = "请求地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "/xxx/yyy")
@NotEmpty(message = "请求地址不能为空") @NotEmpty(message = "请求地址不能为空")
private String requestUrl; private String requestUrl;
@Schema(description = "用户 IP", required = true, example = "127.0.0.1") @Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1")
@NotEmpty(message = "用户 IP 不能为空") @NotEmpty(message = "用户 IP 不能为空")
private String userIp; private String userIp;
@Schema(description = "浏览器 UserAgent", required = true, example = "Mozilla/5.0") @Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0")
@NotEmpty(message = "浏览器 UserAgent 不能为空") @NotEmpty(message = "浏览器 UserAgent 不能为空")
private String userAgent; private String userAgent;
@Schema(description = "Java 方法名", required = true, example = "cn.iocoder.yudao.UserController.save(...)") @Schema(description = "Java 方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "cn.iocoder.yudao.UserController.save(...)")
@NotEmpty(message = "Java 方法名不能为空") @NotEmpty(message = "Java 方法名不能为空")
private String javaMethod; private String javaMethod;
@Schema(description = "Java 方法的参数") @Schema(description = "Java 方法的参数")
private String javaMethodArgs; private String javaMethodArgs;
@Schema(description = "开始时间", required = true) @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始时间不能为空") @NotNull(message = "开始时间不能为空")
private LocalDateTime startTime; private LocalDateTime startTime;
@Schema(description = "执行时长,单位:毫秒", required = true) @Schema(description = "执行时长,单位:毫秒", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "执行时长不能为空") @NotNull(message = "执行时长不能为空")
private Integer duration; private Integer duration;
@Schema(description = "结果码", required = true) @Schema(description = "结果码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "结果码不能为空") @NotNull(message = "结果码不能为空")
private Integer resultCode; private Integer resultCode;

View File

@ -13,14 +13,15 @@ public class MailSendSingleToUserReqDTO {
@Schema(description = "用户编号", example = "1024") @Schema(description = "用户编号", example = "1024")
private Long userId; private Long userId;
@Schema(description = "手机号", required = true, example = "15601691300") @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
@Email @Email
private String mail; private String mail;
@Schema(description = "邮件模板编号", required = true, example = "USER_SEND") @Schema(description = "邮件模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "USER_SEND")
@NotNull(message = "邮件模板编号不能为空") @NotNull(message = "邮件模板编号不能为空")
private String templateCode; private String templateCode;
@Schema(description = "邮件模板参数") @Schema(description = "邮件模板参数")
private Map<String, Object> templateParams; private Map<String, Object> templateParams;
} }

View File

@ -11,13 +11,13 @@ import java.util.Map;
@Data @Data
public class NotifySendSingleToUserReqDTO { public class NotifySendSingleToUserReqDTO {
@Schema(description = "用户编号", required = true, example = "1024") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "用户编号不能为空") @NotNull(message = "用户编号不能为空")
private Long userId; private Long userId;
@Schema(description = "站内信模板编号", required = true, example = "USER_SEND") @Schema(description = "站内信模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "USER_SEND")
@NotEmpty(message = "站内信模板编号不能为空") @NotEmpty(message = "站内信模板编号不能为空")
private String templateCode; private String templateCode;
@Schema(description = "邮件模板参数") @Schema(description = "邮件模板参数")
private Map<String, Object> templateParams; private Map<String, Object> templateParams;
} }

View File

@ -10,13 +10,13 @@ import java.util.List;
@Data @Data
public class OAuth2AccessTokenCheckRespDTO implements Serializable { public class OAuth2AccessTokenCheckRespDTO implements Serializable {
@Schema(description = "用户编号", required = true, example = "10") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
private Long userId; private Long userId;
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1") @Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer userType; private Integer userType;
@Schema(description = "租户编号", required = true, example = "1024") @Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long tenantId; private Long tenantId;
@Schema(description = "授权范围的数组", example = "user_info") @Schema(description = "授权范围的数组", example = "user_info")

View File

@ -13,16 +13,16 @@ import java.util.List;
@Data @Data
public class OAuth2AccessTokenCreateReqDTO implements Serializable { public class OAuth2AccessTokenCreateReqDTO implements Serializable {
@Schema(description = "用户编号", required = true, example = "10") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
@NotNull(message = "用户编号不能为空") @NotNull(message = "用户编号不能为空")
private Long userId; private Long userId;
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1") @Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "用户类型不能为空") @NotNull(message = "用户类型不能为空")
@InEnum(value = UserTypeEnum.class, message = "用户类型必须是 {value}") @InEnum(value = UserTypeEnum.class, message = "用户类型必须是 {value}")
private Integer userType; private Integer userType;
@Schema(description = "客户端编号", required = true, example = "yudaoyuanma") @Schema(description = "客户端编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudaoyuanma")
@NotNull(message = "客户端编号不能为空") @NotNull(message = "客户端编号不能为空")
private String clientId; private String clientId;

View File

@ -12,19 +12,19 @@ import java.time.LocalDateTime;
@Accessors(chain = true) @Accessors(chain = true)
public class OAuth2AccessTokenRespDTO implements Serializable { public class OAuth2AccessTokenRespDTO implements Serializable {
@Schema(description = "访问令牌", required = true, example = "tudou") @Schema(description = "访问令牌", requiredMode = Schema.RequiredMode.REQUIRED, example = "tudou")
private String accessToken; private String accessToken;
@Schema(description = "刷新令牌", required = true, example = "haha") @Schema(description = "刷新令牌", requiredMode = Schema.RequiredMode.REQUIRED, example = "haha")
private String refreshToken; private String refreshToken;
@Schema(description = "用户编号", required = true, example = "10") @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
private Long userId; private Long userId;
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "1" ) @Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1" )
private Integer userType; private Integer userType;
@Schema(description = "过期时间", required = true) @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime expiresTime; private LocalDateTime expiresTime;
} }

View File

@ -1,29 +1,22 @@
package cn.iocoder.yudao.module.system.api.permission.dto; package cn.iocoder.yudao.module.system.api.permission.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
/** @Schema(description = "RPC 服务 - 部门的数据权限 Response DTO")
* 部门的数据权限 Response DTO
*
* @author 芋道源码
*/
@Data @Data
public class DeptDataPermissionRespDTO { public class DeptDataPermissionRespDTO {
/** @Schema(description = "是否可查看全部数据", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
* 是否可查看全部数据
*/
private Boolean all; private Boolean all;
/**
* 是否可查看自己的数据 @Schema(description = "是否可查看自己的数据", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
*/
private Boolean self; private Boolean self;
/**
* 可查看的部门编号数组 @Schema(description = "可查看的部门编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 3]")
*/
private Set<Long> deptIds; private Set<Long> deptIds;
public DeptDataPermissionRespDTO() { public DeptDataPermissionRespDTO() {

View File

@ -13,16 +13,18 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class SmsCodeSendReqDTO { public class SmsCodeSendReqDTO {
@Schema(description = "手机号", required = true, example = "15601691300") @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
@Mobile @Mobile
@NotEmpty(message = "手机号不能为空") @NotEmpty(message = "手机号不能为空")
private String mobile; private String mobile;
@Schema(description = "发送场景", required = true, example = "1")
@Schema(description = "发送场景", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "发送场景不能为空") @NotNull(message = "发送场景不能为空")
@InEnum(SmsSceneEnum.class) @InEnum(SmsSceneEnum.class)
private Integer scene; private Integer scene;
@Schema(description = "发送 IP", required = true, example = "10.20.30.40") @Schema(description = "发送 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "10.20.30.40")
@NotEmpty(message = "发送 IP 不能为空") @NotEmpty(message = "发送 IP 不能为空")
private String createIp; private String createIp;
} }

View File

@ -13,19 +13,22 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class SmsCodeUseReqDTO { public class SmsCodeUseReqDTO {
@Schema(description = "手机号", required = true, example = "15601691300") @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
@Mobile @Mobile
@NotEmpty(message = "手机号不能为空") @NotEmpty(message = "手机号不能为空")
private String mobile; private String mobile;
@Schema(description = "发送场景", required = true, example = "1")
@Schema(description = "发送场景", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "发送场景不能为空") @NotNull(message = "发送场景不能为空")
@InEnum(SmsSceneEnum.class) @InEnum(SmsSceneEnum.class)
private Integer scene; private Integer scene;
@Schema(description = "验证码", required = true, example = "1024")
@Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "验证码") @NotEmpty(message = "验证码")
private String code; private String code;
@Schema(description = "发送 IP", required = true, example = "10.20.30.40")
@Schema(description = "发送 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "10.20.30.40")
@NotEmpty(message = "使用 IP 不能为空") @NotEmpty(message = "使用 IP 不能为空")
private String usedIp; private String usedIp;
} }

View File

@ -13,16 +13,18 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class SmsCodeValidateReqDTO { public class SmsCodeValidateReqDTO {
@Schema(description = "手机号", required = true, example = "15601691300") @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
@Mobile @Mobile
@NotEmpty(message = "手机号不能为空") @NotEmpty(message = "手机号不能为空")
private String mobile; private String mobile;
@Schema(description = "发送场景", required = true, example = "1")
@Schema(description = "发送场景", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "发送场景不能为空") @NotNull(message = "发送场景不能为空")
@InEnum(SmsSceneEnum.class) @InEnum(SmsSceneEnum.class)
private Integer scene; private Integer scene;
@Schema(description = "验证码", required = true, example = "1024")
@Schema(description = "验证码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "验证码") @NotEmpty(message = "验证码")
private String code; private String code;
} }

View File

@ -13,14 +13,14 @@ public class SmsSendSingleToUserReqDTO {
@Schema(description = "用户编号", example = "1024") @Schema(description = "用户编号", example = "1024")
private Long userId; private Long userId;
@Schema(description = "手机号", required = true, example = "15601691300") @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
@Mobile @Mobile
private String mobile; private String mobile;
@Schema(description = "短信模板编号", required = true, example = "USER_SEND") @Schema(description = "短信模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "USER_SEND")
@NotEmpty(message = "短信模板编号不能为空") @NotEmpty(message = "短信模板编号不能为空")
private String templateCode; private String templateCode;
@Schema(description = "短信模板参数") @Schema(description = "短信模板参数")
private Map<String, Object> templateParams; private Map<String, Object> templateParams;
} }

View File

@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.system.api.social.dto;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -10,42 +11,28 @@ import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
/** @Schema(description = "RPC 服务 - 取消绑定社交用户 Request DTO")
* 取消绑定社交用户 Request DTO
*
* @author 芋道源码
*/
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class SocialUserBindReqDTO { public class SocialUserBindReqDTO {
/** @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
* 用户编号
*/
@NotNull(message = "用户编号不能为空") @NotNull(message = "用户编号不能为空")
private Long userId; private Long userId;
/** @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
* 用户类型
*/
@InEnum(UserTypeEnum.class) @InEnum(UserTypeEnum.class)
@NotNull(message = "用户类型不能为空") @NotNull(message = "用户类型不能为空")
private Integer userType; private Integer userType;
/** @Schema(description = "社交平台的类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
* 社交平台的类型
*/
@InEnum(SocialTypeEnum.class) @InEnum(SocialTypeEnum.class)
@NotNull(message = "社交平台的类型不能为空") @NotNull(message = "社交平台的类型不能为空")
private Integer socialType; private Integer socialType;
/** @Schema(description = "授权码", requiredMode = Schema.RequiredMode.REQUIRED, example = "zsw")
* 授权码
*/
@NotEmpty(message = "授权码不能为空") @NotEmpty(message = "授权码不能为空")
private String code; private String code;
/** @Schema(description = "state", requiredMode = Schema.RequiredMode.REQUIRED, example = "qtw")
* state
*/
@NotEmpty(message = "state 不能为空") @NotEmpty(message = "state 不能为空")
private String state; private String state;

View File

@ -1,27 +1,20 @@
package cn.iocoder.yudao.module.system.api.social.dto; package cn.iocoder.yudao.module.system.api.social.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
/** @Schema(description = "RPC 服务 - 社交用户 Response DTO")
* 社交用户 Response DTO
*
* @author 芋道源码
*/
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class SocialUserRespDTO { public class SocialUserRespDTO {
/** @Schema(description = "社交用户 openid", requiredMode = Schema.RequiredMode.REQUIRED, example = "zsw")
* 社交用户 openid
*/
private String openid; private String openid;
/** @Schema(description = "关联的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
* 关联的用户编号
*/
private Long userId; private Long userId;
} }

View File

@ -3,42 +3,30 @@ package cn.iocoder.yudao.module.system.api.social.dto;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
/** @Schema(description = "RPC 服务 - 取消绑定社交用户 Request DTO")
* 社交绑定 Request DTO使用 code 授权码
*
* @author 芋道源码
*/
@Data @Data
public class SocialUserUnbindReqDTO { public class SocialUserUnbindReqDTO {
/** @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
* 用户编号
*/
@NotNull(message = "用户编号不能为空") @NotNull(message = "用户编号不能为空")
private Long userId; private Long userId;
/** @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
* 用户类型
*/
@InEnum(UserTypeEnum.class) @InEnum(UserTypeEnum.class)
@NotNull(message = "用户类型不能为空") @NotNull(message = "用户类型不能为空")
private Integer userType; private Integer userType;
/** @Schema(description = "社交平台的类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
* 社交平台的类型
*/
@InEnum(SocialTypeEnum.class) @InEnum(SocialTypeEnum.class)
@NotNull(message = "社交平台的类型不能为空") @NotNull(message = "社交平台的类型不能为空")
private Integer type; private Integer socialType;
@Schema(description = "社交平台的 openid", requiredMode = Schema.RequiredMode.REQUIRED, example = "zsw")
/** @NotEmpty(message = "社交平台的 openid 不能为空")
* 社交平台的 unionId private String openid;
*/
@NotEmpty(message = "社交平台的 unionId 不能为空")
private String unionId;
} }

View File

@ -1,34 +1,25 @@
package cn.iocoder.yudao.module.system.api.social.dto; package cn.iocoder.yudao.module.system.api.social.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
/** @Schema(description = "RPC 服务 - 微信公众号 JSAPI 签名 Response DTO")
* 微信公众号 JSAPI 签名 Response DTO
*
* @author 芋道源码
*/
@Data @Data
public class SocialWxJsapiSignatureRespDTO { public class SocialWxJsapiSignatureRespDTO {
/** @Schema(description = "微信公众号的 appId", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx123456")
* 微信公众号的 appId
*/
private String appId; private String appId;
/**
* 匿名串 @Schema(description = "匿名串", requiredMode = Schema.RequiredMode.REQUIRED, example = "zsw")
*/
private String nonceStr; private String nonceStr;
/**
* 时间戳 @Schema(description = "时间戳", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456789")
*/
private Long timestamp; private Long timestamp;
/**
* URL @Schema(description = "URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
*/
private String url; private String url;
/**
* 签名 @Schema(description = "签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "zsw")
*/
private String signature; private String signature;
} }

View File

@ -1,27 +1,18 @@
package cn.iocoder.yudao.module.system.api.social.dto; package cn.iocoder.yudao.module.system.api.social.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
/** @Schema(description = "RPC 服务 - 微信小程序的手机信息 Response DTO")
* 微信小程序的手机信息 Response DTO
*
* @author 芋道源码
*/
@Data @Data
public class SocialWxPhoneNumberInfoRespDTO { public class SocialWxPhoneNumberInfoRespDTO {
/** @Schema(description = "用户绑定的手机号(国外手机号会有区号)", requiredMode = Schema.RequiredMode.REQUIRED, example = "021-13579246810")
* 用户绑定的手机号国外手机号会有区号
*/
private String phoneNumber; private String phoneNumber;
/** @Schema(description = "没有区号的手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13579246810")
* 没有区号的手机号
*/
private String purePhoneNumber; private String purePhoneNumber;
/** @Schema(description = "区号", requiredMode = Schema.RequiredMode.REQUIRED, example = "021")
* 区号
*/
private String countryCode; private String countryCode;
} }

View File

@ -1,44 +1,30 @@
package cn.iocoder.yudao.module.system.api.user.dto; package cn.iocoder.yudao.module.system.api.user.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.Set; import java.util.Set;
/** @Schema(description = "RPC 服务 - Admin 用户 Response DTO")
* Admin 用户 Response DTO
*
* @author 芋道源码
*/
@Data @Data
public class AdminUserRespDTO { public class AdminUserRespDTO {
/** @Schema(description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
* 用户ID
*/
private Long id; private Long id;
/**
* 用户昵称
*/
private String nickname;
/**
* 帐号状态
*
* 枚举 {@link CommonStatusEnum}
*/
private Integer status;
/** @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "小王")
* 部门ID private String nickname;
*/
@Schema(description = "帐号状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; // 参见 CommonStatusEnum 枚举
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long deptId; private Long deptId;
/**
* 岗位编号数组 @Schema(description = "岗位编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 3]")
*/
private Set<Long> postIds; private Set<Long> postIds;
/**
* 手机号码 @Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
*/
private String mobile; private String mobile;
} }

View File

@ -27,7 +27,7 @@ public class SocialUserApiImpl implements SocialUserApi {
@Override @Override
public CommonResult<Boolean> unbindSocialUser(SocialUserUnbindReqDTO reqDTO) { public CommonResult<Boolean> unbindSocialUser(SocialUserUnbindReqDTO reqDTO) {
socialUserService.unbindSocialUser(reqDTO.getUserId(), reqDTO.getUserType(), socialUserService.unbindSocialUser(reqDTO.getUserId(), reqDTO.getUserType(),
reqDTO.getType(), reqDTO.getUnionId()); reqDTO.getSocialType(), reqDTO.getOpenid());
return success(true); return success(true);
} }