mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-09-08 14:12:29 +08:00
Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-redis
Conflicts: yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java
This commit is contained in:
@@ -44,7 +44,7 @@ public interface AdminUserApi {
|
||||
* @param postIds 岗位数组
|
||||
* @return 用户数组
|
||||
*/
|
||||
List<AdminUserRespDTO> getUsersByPostIds(Collection<Long> postIds);
|
||||
List<AdminUserRespDTO> getUserListByPostIds(Collection<Long> postIds);
|
||||
|
||||
/**
|
||||
* 获得用户 Map
|
||||
|
@@ -40,7 +40,7 @@ public class AdminUserApiImpl implements AdminUserApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AdminUserRespDTO> getUsersByPostIds(Collection<Long> postIds) {
|
||||
public List<AdminUserRespDTO> getUserListByPostIds(Collection<Long> postIds) {
|
||||
List<AdminUserDO> users = userService.getUserListByPostIds(postIds);
|
||||
return UserConvert.INSTANCE.convertList4(users);
|
||||
}
|
||||
|
@@ -56,6 +56,7 @@ public class AuthController {
|
||||
private PermissionService permissionService;
|
||||
@Resource
|
||||
private SocialUserService socialUserService;
|
||||
|
||||
@Resource
|
||||
private SecurityProperties securityProperties;
|
||||
|
||||
|
@@ -9,7 +9,7 @@ import lombok.NoArgsConstructor;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Schema(description = "管理后台 - 登录用户的权限信息 Response VO,额外包括用户信息和角色列表")
|
||||
@Schema(description = "管理后台 - 登录用户的权限信息 Response VO,额外包括用户信息和角色列表")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@@ -41,7 +41,7 @@ public class AuthPermissionInfoRespVO {
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "http://www.iocoder.cn/xx.jpg")
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.jpg")
|
||||
private String avatar;
|
||||
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull;
|
||||
@Builder
|
||||
public class AuthSocialLoginReqVO {
|
||||
|
||||
@Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@InEnum(SocialTypeEnum.class)
|
||||
@NotNull(message = "社交平台的类型不能为空")
|
||||
private Integer type;
|
||||
|
@@ -7,10 +7,10 @@ import lombok.Data;
|
||||
@Data
|
||||
public class DeptListReqVO {
|
||||
|
||||
@Schema(description = "部门名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "部门名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ public class DeptRespVO extends DeptBaseVO {
|
||||
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式")
|
||||
|
@@ -27,7 +27,7 @@ public class PostBaseVO {
|
||||
@NotNull(message = "显示顺序不能为空")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "快乐的备注")
|
||||
|
@@ -3,17 +3,17 @@ package cn.iocoder.yudao.module.system.controller.admin.dept.vo.post;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 岗位导出 Request VO,参数和 PostExcelVO 是一致的")
|
||||
@Schema(description = "管理后台 - 岗位导出 Request VO,参数和 PostExcelVO 是一致的")
|
||||
@Data
|
||||
public class PostExportReqVO {
|
||||
|
||||
@Schema(description = "岗位编码,模糊匹配", example = "yudao")
|
||||
@Schema(description = "岗位编码,模糊匹配", example = "yudao")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -9,10 +9,10 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PostListReqVO extends PostBaseVO {
|
||||
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -10,13 +10,13 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PostPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "岗位编码,模糊匹配", example = "yudao")
|
||||
@Schema(description = "岗位编码,模糊匹配", example = "yudao")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -13,11 +13,11 @@ public class DictDataExportReqVO {
|
||||
@Size(max = 100, message = "字典标签长度不能超过100个字符")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
@Size(max = 100, message = "字典类型类型长度不能超过100个字符")
|
||||
private String dictType;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -16,11 +16,11 @@ public class DictDataPageReqVO extends PageParam {
|
||||
@Size(max = 100, message = "字典标签长度不能超过100个字符")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
@Size(max = 100, message = "字典类型类型长度不能超过100个字符")
|
||||
private String dictType;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -16,8 +16,9 @@ public class DictDataSimpleRespVO {
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "男")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "颜色类型,default、primary、success、info、warning、danger", example = "default")
|
||||
@Schema(description = "颜色类型,default、primary、success、info、warning、danger", example = "default")
|
||||
private String colorType;
|
||||
|
||||
@Schema(description = "css 样式", example = "btn-visible")
|
||||
private String cssClass;
|
||||
|
||||
|
@@ -19,7 +19,7 @@ public class DictTypeBaseVO {
|
||||
@Size(max = 100, message = "字典类型名称长度不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
|
@@ -12,13 +12,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
public class DictTypeExportReqVO {
|
||||
|
||||
@Schema(description = "字典类型名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "字典类型名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
@@ -16,14 +16,14 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DictTypePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "字典类型名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "字典类型名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
@Size(max = 100, message = "字典类型类型长度不能超过100个字符")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 错误码 Excel 导出 Request VO,参数和 InfErrorCodePageReqVO 是一致的")
|
||||
@Schema(description = "管理后台 - 错误码 Excel 导出 Request VO,参数和 InfErrorCodePageReqVO 是一致的")
|
||||
@Data
|
||||
public class ErrorCodeExportReqVO {
|
||||
|
||||
|
@@ -17,7 +17,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@ToString(callSuper = true)
|
||||
public class ErrorCodePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", example = "1")
|
||||
@Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "应用名", example = "dashboard")
|
||||
|
@@ -16,7 +16,7 @@ public class ErrorCodeRespVO extends ErrorCodeBaseVO {
|
||||
@Schema(description = "错误码编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "错误码类型,参见 ErrorCodeTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
@@ -15,7 +15,7 @@ import javax.validation.constraints.Size;
|
||||
@Data
|
||||
public class LoginLogBaseVO {
|
||||
|
||||
@Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "日志类型不能为空")
|
||||
private Integer logType;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class LoginLogBaseVO {
|
||||
@Size(max = 30, message = "用户账号长度不能超过30个字符")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "登录结果,参见 LoginResultEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "登录结果,参见 LoginResultEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "登录结果不能为空")
|
||||
private Integer result;
|
||||
|
||||
|
@@ -12,10 +12,10 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
public class LoginLogExportReqVO {
|
||||
|
||||
@Schema(description = "用户 IP,模拟匹配", example = "127.0.0.1")
|
||||
@Schema(description = "用户 IP,模拟匹配", example = "127.0.0.1")
|
||||
private String userIp;
|
||||
|
||||
@Schema(description = "用户账号,模拟匹配", example = "芋道")
|
||||
@Schema(description = "用户账号,模拟匹配", example = "芋道")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "操作状态", example = "true")
|
||||
|
@@ -15,10 +15,10 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class LoginLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户 IP,模拟匹配", example = "127.0.0.1")
|
||||
@Schema(description = "用户 IP,模拟匹配", example = "127.0.0.1")
|
||||
private String userIp;
|
||||
|
||||
@Schema(description = "用户账号,模拟匹配", example = "芋道")
|
||||
@Schema(description = "用户账号,模拟匹配", example = "芋道")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "操作状态", example = "true")
|
||||
|
@@ -20,7 +20,7 @@ public class LoginLogRespVO extends LoginLogBaseVO {
|
||||
@Schema(description = "用户编号", example = "666")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
|
@@ -31,7 +31,7 @@ public class OperateLogBaseVO {
|
||||
@NotEmpty(message = "操作名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "操作分类不能为空")
|
||||
private Integer type;
|
||||
|
||||
|
@@ -12,13 +12,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
public class OperateLogExportReqVO {
|
||||
|
||||
@Schema(description = "操作模块,模拟匹配", example = "订单")
|
||||
@Schema(description = "操作模块,模拟匹配", example = "订单")
|
||||
private String module;
|
||||
|
||||
@Schema(description = "用户昵称,模拟匹配", example = "芋道")
|
||||
@Schema(description = "用户昵称,模拟匹配", example = "芋道")
|
||||
private String userNickname;
|
||||
|
||||
@Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1")
|
||||
@Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "操作状态", example = "true")
|
||||
|
@@ -13,13 +13,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
public class OperateLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "操作模块,模拟匹配", example = "订单")
|
||||
@Schema(description = "操作模块,模拟匹配", example = "订单")
|
||||
private String module;
|
||||
|
||||
@Schema(description = "用户昵称,模拟匹配", example = "芋道")
|
||||
@Schema(description = "用户昵称,模拟匹配", example = "芋道")
|
||||
private String userNickname;
|
||||
|
||||
@Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1")
|
||||
@Schema(description = "操作分类,参见 OperateLogTypeEnum 枚举类", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "操作状态", example = "true")
|
||||
|
@@ -8,7 +8,7 @@ import lombok.ToString;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description ="管理后台 - 邮箱账号 Response VO")
|
||||
@Schema(description = "管理后台 - 邮箱账号 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
|
@@ -11,16 +11,16 @@ import java.util.Map;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 邮件日志 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 邮件日志 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class MailLogBaseVO {
|
||||
|
||||
@Schema(description = "用户编号", example = "30883")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", example = "2")
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", example = "2")
|
||||
private Byte userType;
|
||||
|
||||
@Schema(description = "接收邮箱地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "76854@qq.com")
|
||||
@@ -58,7 +58,7 @@ public class MailLogBaseVO {
|
||||
@NotNull(message = "邮件参数不能为空")
|
||||
private Map<String, Object> templateParams;
|
||||
|
||||
@Schema(description = "发送状态 - 参见 MailSendStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "发送状态,参见 MailSendStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "发送状态不能为空")
|
||||
private Byte sendStatus;
|
||||
|
||||
|
@@ -20,10 +20,10 @@ public class MailLogPageReqVO extends PageParam {
|
||||
@Schema(description = "用户编号", example = "30883")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", example = "2")
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", example = "2")
|
||||
private Integer userType;
|
||||
|
||||
@Schema(description = "接收邮箱地址 模糊匹配", example = "76854@qq.com")
|
||||
@Schema(description = "接收邮箱地址,模糊匹配", example = "76854@qq.com")
|
||||
private String toMail;
|
||||
|
||||
@Schema(description = "邮箱账号编号", example = "18107")
|
||||
@@ -32,7 +32,7 @@ public class MailLogPageReqVO extends PageParam {
|
||||
@Schema(description = "模板编号", example = "5678")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "发送状态 - 参见 MailSendStatusEnum 枚举", example = "1")
|
||||
@Schema(description = "发送状态,参见 MailSendStatusEnum 枚举", example = "1")
|
||||
private Integer sendStatus;
|
||||
|
||||
@Schema(description = "发送时间")
|
||||
|
@@ -36,7 +36,7 @@ public class MailTemplateBaseVO {
|
||||
@NotEmpty(message = "内容不能为空")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "状态 - 参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
|
@@ -17,13 +17,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@ToString(callSuper = true)
|
||||
public class MailTemplatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "状态 - 参见 CommonStatusEnum 枚举", example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "标识 - 模糊匹配", example = "code_1024")
|
||||
@Schema(description = "标识,模糊匹配", example = "code_1024")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "名称 - 模糊匹配", example = "芋头")
|
||||
@Schema(description = "名称,模糊匹配", example = "芋头")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "账号编号", example = "2048")
|
||||
|
@@ -26,7 +26,7 @@ public class NoticeBaseVO {
|
||||
@Schema(description = "公告内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "半生编码")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -10,10 +10,10 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NoticePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "通知公告名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "通知公告名称,模糊匹配", example = "芋道")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ public class NotifyMessageBaseVO {
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户类型 - 参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Byte userType;
|
||||
|
||||
|
@@ -9,9 +9,9 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 站内信模版 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 站内信模版 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class NotifyTemplateBaseVO {
|
||||
|
||||
@@ -23,7 +23,7 @@ public class NotifyTemplateBaseVO {
|
||||
@NotNull(message = "模版编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模版类型 - 对应 system_notify_template_type 字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "模版类型,对应 system_notify_template_type 字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "模版类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class NotifyTemplateBaseVO {
|
||||
@NotEmpty(message = "模版内容不能为空")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "状态 - 参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
@@ -1,11 +1,13 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.notify.vo.template;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -21,7 +23,7 @@ public class NotifyTemplatePageReqVO extends PageParam {
|
||||
@Schema(description = "模版名称", example = "我是名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态 - 参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
|
@@ -38,7 +38,7 @@ public class OAuth2ClientBaseVO {
|
||||
@Schema(description = "应用描述", example = "我是一个应用")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class OAuth2ClientBaseVO {
|
||||
private List<@NotEmpty(message = "重定向的 URI 不能为空")
|
||||
@URL(message = "重定向的 URI 格式不正确") String> redirectUris;
|
||||
|
||||
@Schema(description = "授权类型,参见 OAuth2GrantTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "password")
|
||||
@Schema(description = "授权类型,参见 OAuth2GrantTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "password")
|
||||
@NotNull(message = "授权类型不能为空")
|
||||
private List<String> authorizedGrantTypes;
|
||||
|
||||
|
@@ -10,10 +10,10 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
@ToString(callSuper = true)
|
||||
public class OAuth2ClientPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "应用名,模糊匹配", example = "土豆")
|
||||
@Schema(description = "应用名,模糊匹配", example = "土豆")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ public class OAuth2OpenCheckTokenRespVO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "666")
|
||||
@JsonProperty("user_id")
|
||||
private Long userId;
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@JsonProperty("user_type")
|
||||
private Integer userType;
|
||||
@Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@@ -34,7 +34,7 @@ public class OAuth2OpenCheckTokenRespVO {
|
||||
@JsonProperty("access_token")
|
||||
private String accessToken;
|
||||
|
||||
@Schema(description = "过期时间,时间戳 / 1000,即单位:秒", requiredMode = Schema.RequiredMode.REQUIRED, example = "1593092157")
|
||||
@Schema(description = "过期时间,时间戳 / 1000,即单位:秒", requiredMode = Schema.RequiredMode.REQUIRED, example = "1593092157")
|
||||
private Long exp;
|
||||
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ public class OAuth2AccessTokenPageReqVO extends PageParam {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "666")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Integer userType;
|
||||
|
||||
@Schema(description = "客户端编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
|
@@ -25,7 +25,7 @@ public class OAuth2AccessTokenRespVO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "666")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Integer userType;
|
||||
|
||||
@Schema(description = "客户端编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
|
@@ -27,7 +27,7 @@ public class OAuth2UserInfoRespVO {
|
||||
@Schema(description = "手机号码", example = "15601691300")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png")
|
||||
|
@@ -28,7 +28,7 @@ public class OAuth2UserUpdateReqVO {
|
||||
@Length(min = 11, max = 11, message = "手机号长度必须 11 位")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
private Integer sex;
|
||||
|
||||
}
|
||||
|
@@ -40,6 +40,3 @@ tenant-id: {{adminTenentId}}
|
||||
GET {{baseUrl}}/system/role/page?pageNo=1&pageSize=10
|
||||
Authorization: Bearer {{token}}
|
||||
tenant-id: {{adminTenentId}}
|
||||
|
||||
###
|
||||
|
||||
|
@@ -23,7 +23,7 @@ public class MenuBaseVO {
|
||||
@Size(max = 100)
|
||||
private String permission;
|
||||
|
||||
@Schema(description = "类型,参见 MenuTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "类型,参见 MenuTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "菜单类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
|
@@ -7,10 +7,10 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MenuListReqVO {
|
||||
|
||||
@Schema(description = "菜单名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "菜单名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ public class MenuRespVO extends MenuBaseVO {
|
||||
@Schema(description = "菜单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式")
|
||||
|
@@ -22,7 +22,7 @@ public class MenuSimpleRespVO {
|
||||
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "类型,参见 MenuTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "类型,参见 MenuTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
|
@@ -15,12 +15,12 @@ public class PermissionAssignRoleDataScopeReqVO {
|
||||
@NotNull(message = "角色编号不能为空")
|
||||
private Long roleId;
|
||||
|
||||
@Schema(description = "数据范围,参见 DataScopeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "数据范围,参见 DataScopeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "数据范围不能为空")
|
||||
// TODO 这里要多一个枚举校验
|
||||
private Integer dataScope;
|
||||
|
||||
@Schema(description = "部门编号列表,只有范围类型为 DEPT_CUSTOM 时,该字段才需要", example = "1,3,5")
|
||||
@Schema(description = "部门编号列表,只有范围类型为 DEPT_CUSTOM 时,该字段才需要", example = "1,3,5")
|
||||
private Set<Long> dataScopeDeptIds = Collections.emptySet(); // 兜底
|
||||
|
||||
}
|
||||
|
@@ -12,13 +12,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
public class RoleExportReqVO {
|
||||
|
||||
@Schema(description = "角色名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "角色名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "角色标识,模糊匹配", example = "yudao")
|
||||
@Schema(description = "角色标识,模糊匹配", example = "yudao")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "开始时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
|
||||
|
@@ -15,13 +15,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RolePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "角色名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "角色名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "角色标识,模糊匹配", example = "yudao")
|
||||
@Schema(description = "角色标识,模糊匹配", example = "yudao")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
|
||||
|
@@ -19,16 +19,16 @@ public class RoleRespVO extends RoleBaseVO {
|
||||
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "数据范围,参见 DataScopeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "数据范围,参见 DataScopeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer dataScope;
|
||||
|
||||
@Schema(description = "数据范围(指定部门数组)", example = "1")
|
||||
private Set<Long> dataScopeDeptIds;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "角色类型,参见 RoleTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "角色类型,参见 RoleTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式")
|
||||
|
@@ -7,9 +7,9 @@ import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 敏感词 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 敏感词 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class SensitiveWordBaseVO {
|
||||
|
||||
@@ -21,7 +21,7 @@ public class SensitiveWordBaseVO {
|
||||
@NotNull(message = "标签不能为空")
|
||||
private List<String> tags;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 敏感词 Excel 导出 Request VO,参数和 SensitiveWordPageReqVO 是一致的")
|
||||
@Schema(description = "管理后台 - 敏感词 Excel 导出 Request VO,参数和 SensitiveWordPageReqVO 是一致的")
|
||||
@Data
|
||||
public class SensitiveWordExportReqVO {
|
||||
|
||||
@@ -18,7 +18,7 @@ public class SensitiveWordExportReqVO {
|
||||
@Schema(description = "标签", example = "短信,评论")
|
||||
private String tag;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
@@ -23,7 +23,7 @@ public class SensitiveWordPageReqVO extends PageParam {
|
||||
@Schema(description = "标签", example = "短信,评论")
|
||||
private String tag;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
@@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class SmsChannelCreateReqVO extends SmsChannelBaseVO {
|
||||
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
@NotNull(message = "渠道编码不能为空")
|
||||
private String code;
|
||||
|
||||
|
@@ -20,7 +20,7 @@ public class SmsChannelPageReqVO extends PageParam {
|
||||
@Schema(description = "任务状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "短信签名,模糊匹配", example = "芋道源码")
|
||||
@Schema(description = "短信签名,模糊匹配", example = "芋道源码")
|
||||
private String signature;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
@@ -16,7 +16,7 @@ public class SmsChannelRespVO extends SmsChannelBaseVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
@@ -17,7 +17,7 @@ public class SmsChannelSimpleRespVO {
|
||||
@NotNull(message = "短信签名不能为空")
|
||||
private String signature;
|
||||
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 短信日志 Excel 导出 Request VO,参数和 SmsLogPageReqVO 是一致的")
|
||||
@Schema(description = "管理后台 - 短信日志 Excel 导出 Request VO,参数和 SmsLogPageReqVO 是一致的")
|
||||
@Data
|
||||
public class SmsLogExportReqVO {
|
||||
|
||||
|
@@ -26,14 +26,14 @@ public class SmsLogPageReqVO extends PageParam {
|
||||
@Schema(description = "手机号", example = "15601691300")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "发送状态,参见 SmsSendStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "发送状态,参见 SmsSendStatusEnum 枚举类", example = "1")
|
||||
private Integer sendStatus;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(description = "发送时间")
|
||||
private LocalDateTime[] sendTime;
|
||||
|
||||
@Schema(description = "接收状态,参见 SmsReceiveStatusEnum 枚举类", example = "0")
|
||||
@Schema(description = "接收状态,参见 SmsReceiveStatusEnum 枚举类", example = "0")
|
||||
private Integer receiveStatus;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
@@ -11,11 +11,11 @@ import javax.validation.constraints.NotNull;
|
||||
@Data
|
||||
public class SmsTemplateBaseVO {
|
||||
|
||||
@Schema(description = "短信类型,参见 SmsTemplateTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "短信类型,参见 SmsTemplateTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "短信类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "开启状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "开启状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "开启状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 短信模板 Excel 导出 Request VO,参数和 SmsTemplatePageReqVO 是一致的")
|
||||
@Schema(description = "管理后台 - 短信模板 Excel 导出 Request VO,参数和 SmsTemplatePageReqVO 是一致的")
|
||||
@Data
|
||||
public class SmsTemplateExportReqVO {
|
||||
|
||||
@@ -18,13 +18,13 @@ public class SmsTemplateExportReqVO {
|
||||
@Schema(description = "开启状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "模板编码,模糊匹配", example = "test_01")
|
||||
@Schema(description = "模板编码,模糊匹配", example = "test_01")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板内容,模糊匹配", example = "你好,{name}。你长的太{like}啦!")
|
||||
@Schema(description = "模板内容,模糊匹配", example = "你好,{name}。你长的太{like}啦!")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "短信 API 的模板编号,模糊匹配", example = "4383920")
|
||||
@Schema(description = "短信 API 的模板编号,模糊匹配", example = "4383920")
|
||||
private String apiTemplateId;
|
||||
|
||||
@Schema(description = "短信渠道编号", example = "10")
|
||||
|
@@ -23,13 +23,13 @@ public class SmsTemplatePageReqVO extends PageParam {
|
||||
@Schema(description = "开启状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "模板编码,模糊匹配", example = "test_01")
|
||||
@Schema(description = "模板编码,模糊匹配", example = "test_01")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板内容,模糊匹配", example = "你好,{name}。你长的太{like}啦!")
|
||||
@Schema(description = "模板内容,模糊匹配", example = "你好,{name}。你长的太{like}啦!")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "短信 API 的模板编号,模糊匹配", example = "4383920")
|
||||
@Schema(description = "短信 API 的模板编号,模糊匹配", example = "4383920")
|
||||
private String apiTemplateId;
|
||||
|
||||
@Schema(description = "短信渠道编号", example = "10")
|
||||
|
@@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull;
|
||||
@Builder
|
||||
public class SocialUserBindReqVO {
|
||||
|
||||
@Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@InEnum(SocialTypeEnum.class)
|
||||
@NotNull(message = "社交平台的类型不能为空")
|
||||
private Integer type;
|
||||
|
@@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull;
|
||||
@Builder
|
||||
public class SocialUserUnbindReqVO {
|
||||
|
||||
@Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@Schema(description = "社交平台的类型,参见 UserSocialTypeEnum 枚举值", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@InEnum(SocialTypeEnum.class)
|
||||
@NotNull(message = "社交平台的类型不能为空")
|
||||
private Integer type;
|
||||
|
@@ -7,9 +7,9 @@ import javax.validation.constraints.NotNull;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 租户套餐 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 租户套餐 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class TenantPackageBaseVO {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class TenantPackageBaseVO {
|
||||
@NotNull(message = "套餐名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
|
@@ -7,9 +7,9 @@ import javax.validation.constraints.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 租户 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
* 租户 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class TenantBaseVO {
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 租户 Excel 导出 Request VO,参数和 TenantPageReqVO 是一致的")
|
||||
@Schema(description = "管理后台 - 租户 Excel 导出 Request VO,参数和 TenantPageReqVO 是一致的")
|
||||
@Data
|
||||
public class TenantExportReqVO {
|
||||
|
||||
@@ -24,8 +24,8 @@ public class TenantExportReqVO {
|
||||
@Schema(description = "租户状态(0正常 1停用)", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ public class UserProfileRespVO extends UserBaseVO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "最后登录 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "192.168.1.1")
|
||||
@@ -92,7 +92,7 @@ public class UserProfileRespVO extends UserBaseVO {
|
||||
@Data
|
||||
public static class SocialUser {
|
||||
|
||||
@Schema(description = "社交平台的类型,参见 SocialTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@Schema(description = "社交平台的类型,参见 SocialTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "社交用户的 openid", requiredMode = Schema.RequiredMode.REQUIRED, example = "IPRmJ0wvBptiPIlGEZiPewGwiEiE")
|
||||
|
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.controller.admin.user.vo.profile;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.Size;
|
||||
@@ -21,9 +22,10 @@ public class UserProfileUpdateReqVO {
|
||||
private String email;
|
||||
|
||||
@Schema(description = "手机号码", example = "15601691300")
|
||||
@Length(min = 11, max = 11, message = "手机号长度必须 11 位")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "用户性别-参见 SexEnum 枚举类", example = "1")
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
private Integer sex;
|
||||
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ public class UserBaseVO {
|
||||
@Mobile
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
@Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png")
|
||||
|
@@ -10,26 +10,26 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户导出 Request VO,参数和 UserPageReqVO 是一致的")
|
||||
@Schema(description = "管理后台 - 用户导出 Request VO,参数和 UserPageReqVO 是一致的")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserExportReqVO {
|
||||
|
||||
@Schema(description = "用户账号,模糊匹配", example = "yudao")
|
||||
@Schema(description = "用户账号,模糊匹配", example = "yudao")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "手机号码,模糊匹配", example = "yudao")
|
||||
@Schema(description = "手机号码,模糊匹配", example = "yudao")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "部门编号,同时筛选子部门", example = "1024")
|
||||
@Schema(description = "部门编号,同时筛选子部门", example = "1024")
|
||||
private Long deptId;
|
||||
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ public class UserImportRespVO {
|
||||
@Schema(description = "更新成功的用户名数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<String> updateUsernames;
|
||||
|
||||
@Schema(description = "导入失败的用户集合,key 为用户名,value 为失败原因", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "导入失败的用户集合,key 为用户名,value 为失败原因", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Map<String, String> failureUsernames;
|
||||
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Schema(description = "管理后台 - 用户分页时的信息 Response VO,相比用户基本信息来说,会多部门信息")
|
||||
@Schema(description = "管理后台 - 用户分页时的信息 Response VO,相比用户基本信息来说,会多部门信息")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
@@ -19,20 +19,20 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户账号,模糊匹配", example = "yudao")
|
||||
@Schema(description = "用户账号,模糊匹配", example = "yudao")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "手机号码,模糊匹配", example = "yudao")
|
||||
@Schema(description = "手机号码,模糊匹配", example = "yudao")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
|
||||
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "部门编号,同时筛选子部门", example = "1024")
|
||||
@Schema(description = "部门编号,同时筛选子部门", example = "1024")
|
||||
private Long deptId;
|
||||
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ public class UserRespVO extends UserBaseVO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "最后登录 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "192.168.1.1")
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -13,9 +15,9 @@ public class UserUpdateStatusReqVO {
|
||||
@NotNull(message = "角色编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
// @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.system.convert.auth;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO;
|
||||
@@ -30,7 +29,7 @@ public interface AuthConvert {
|
||||
default AuthPermissionInfoRespVO convert(AdminUserDO user, List<RoleDO> roleList, List<MenuDO> menuList) {
|
||||
return AuthPermissionInfoRespVO.builder()
|
||||
.user(AuthPermissionInfoRespVO.UserVO.builder().id(user.getId()).nickname(user.getNickname()).avatar(user.getAvatar()).build())
|
||||
.roles(CollectionUtils.convertSet(roleList, RoleDO::getCode))
|
||||
.roles(convertSet(roleList, RoleDO::getCode))
|
||||
// 权限标识信息
|
||||
.permissions(convertSet(menuList, MenuDO::getPermission))
|
||||
// 菜单树
|
||||
|
@@ -296,7 +296,7 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
}
|
||||
|
||||
private void validateUserForCreateOrUpdate(Long id, String username, String mobile, String email,
|
||||
Long deptId, Set<Long> postIds) {
|
||||
Long deptId, Set<Long> postIds) {
|
||||
// 关闭数据权限,避免因为没有数据权限,查询不到数据,进而导致唯一校验不正确
|
||||
DataPermissionUtils.executeIgnore(() -> {
|
||||
// 校验用户存在
|
||||
|
@@ -148,7 +148,7 @@ public class AdminAuthServiceImplTest extends BaseDbUnitTest {
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test
|
||||
public void testLogin_success() {
|
||||
// 准备参数
|
||||
AuthLoginReqVO reqVO = randomPojo(AuthLoginReqVO.class, o ->
|
||||
@@ -174,9 +174,9 @@ public class AdminAuthServiceImplTest extends BaseDbUnitTest {
|
||||
assertPojoEquals(accessTokenDO, loginRespVO);
|
||||
// 校验调用参数
|
||||
verify(loginLogService).createLoginLog(
|
||||
argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType())
|
||||
&& o.getResult().equals(LoginResultEnum.SUCCESS.getResult())
|
||||
&& o.getUserId().equals(user.getId()))
|
||||
argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType())
|
||||
&& o.getResult().equals(LoginResultEnum.SUCCESS.getResult())
|
||||
&& o.getUserId().equals(user.getId()))
|
||||
);
|
||||
verify(socialUserService).bindSocialUser(eq(new SocialUserBindReqDTO(
|
||||
user.getId(), UserTypeEnum.ADMIN.getValue(),
|
||||
@@ -317,8 +317,8 @@ public class AdminAuthServiceImplTest extends BaseDbUnitTest {
|
||||
assertServiceException(() -> authService.validateCaptcha(reqVO), AUTH_LOGIN_CAPTCHA_CODE_ERROR, "就是不对");
|
||||
// 校验调用参数
|
||||
verify(loginLogService).createLoginLog(
|
||||
argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType())
|
||||
&& o.getResult().equals(LoginResultEnum.CAPTCHA_CODE_ERROR.getResult()))
|
||||
argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGIN_USERNAME.getType())
|
||||
&& o.getResult().equals(LoginResultEnum.CAPTCHA_CODE_ERROR.getResult()))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -349,8 +349,9 @@ public class AdminAuthServiceImplTest extends BaseDbUnitTest {
|
||||
// 调用
|
||||
authService.logout(token, LoginLogTypeEnum.LOGOUT_SELF.getType());
|
||||
// 校验调用参数
|
||||
verify(loginLogService).createLoginLog(argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGOUT_SELF.getType())
|
||||
&& o.getResult().equals(LoginResultEnum.SUCCESS.getResult()))
|
||||
verify(loginLogService).createLoginLog(
|
||||
argThat(o -> o.getLogType().equals(LoginLogTypeEnum.LOGOUT_SELF.getType())
|
||||
&& o.getResult().equals(LoginResultEnum.SUCCESS.getResult()))
|
||||
);
|
||||
// 调用,并校验
|
||||
|
||||
|
@@ -25,10 +25,10 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* {@link MailLogServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
* {@link MailLogServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Import(MailLogServiceImpl.class)
|
||||
public class MailLogServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
@@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
class MailSendServiceImplTest extends BaseMockitoUnitTest {
|
||||
public class MailSendServiceImplTest extends BaseMockitoUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
private MailSendServiceImpl mailSendService;
|
||||
@@ -278,16 +278,17 @@ class MailSendServiceImplTest extends BaseMockitoUnitTest {
|
||||
|
||||
// mock 方法(发送邮件)
|
||||
String messageId = randomString();
|
||||
mailUtilMock.when(() -> MailUtil.send(argThat(mailAccount -> {
|
||||
assertEquals("芋艿 <7685@qq.com>", mailAccount.getFrom());
|
||||
assertTrue(mailAccount.isAuth());
|
||||
assertEquals(account.getUsername(), mailAccount.getUser());
|
||||
assertEquals(account.getPassword(), mailAccount.getPass());
|
||||
assertEquals(account.getHost(), mailAccount.getHost());
|
||||
assertEquals(account.getPort(), mailAccount.getPort());
|
||||
assertEquals(account.getSslEnable(), mailAccount.isSslEnable());
|
||||
return true;
|
||||
}), eq(message.getMail()), eq(message.getTitle()), eq(message.getContent()), eq(true)))
|
||||
mailUtilMock.when(() -> MailUtil.send(
|
||||
argThat(mailAccount -> {
|
||||
assertEquals("芋艿 <7685@qq.com>", mailAccount.getFrom());
|
||||
assertTrue(mailAccount.isAuth());
|
||||
assertEquals(account.getUsername(), mailAccount.getUser());
|
||||
assertEquals(account.getPassword(), mailAccount.getPass());
|
||||
assertEquals(account.getHost(), mailAccount.getHost());
|
||||
assertEquals(account.getPort(), mailAccount.getPort());
|
||||
assertEquals(account.getSslEnable(), mailAccount.isSslEnable());
|
||||
return true;
|
||||
}), eq(message.getMail()), eq(message.getTitle()), eq(message.getContent()), eq(true)))
|
||||
.thenReturn(messageId);
|
||||
|
||||
// 调用
|
||||
|
Reference in New Issue
Block a user