1. 统一包名修改
This commit is contained in:
@@ -20,7 +20,7 @@ import org.hibernate.validator.constraints.Length;
|
||||
@Builder
|
||||
public class AuthLoginReqVO extends CaptchaVerificationReqVO {
|
||||
|
||||
@Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloudyuanma")
|
||||
@Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "ztyuanma")
|
||||
@NotEmpty(message = "登录账号不能为空")
|
||||
@Length(min = 4, max = 16, message = "账号长度为 4-16 位")
|
||||
@Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
|
||||
|
||||
@@ -15,13 +15,13 @@ import java.util.List;
|
||||
@Builder
|
||||
public class AuthMenuRespVO {
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post")
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AuthPermissionInfoRespVO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.jpg")
|
||||
@@ -47,10 +47,10 @@ public class AuthPermissionInfoRespVO {
|
||||
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
private String email;
|
||||
|
||||
}
|
||||
@@ -62,13 +62,13 @@ public class AuthPermissionInfoRespVO {
|
||||
@Builder
|
||||
public static class MenuVO {
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post")
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.hibernate.validator.constraints.Length;
|
||||
@Data
|
||||
public class AuthRegisterReqVO extends CaptchaVerificationReqVO {
|
||||
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@NotBlank(message = "用户账号不能为空")
|
||||
@Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成")
|
||||
@Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
|
||||
|
||||
@@ -15,7 +15,7 @@ import lombok.NoArgsConstructor;
|
||||
@Builder
|
||||
public class AuthSmsLoginReqVO {
|
||||
|
||||
@Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloudyuanma")
|
||||
@Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "ztyuanma")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
@Mobile
|
||||
private String mobile;
|
||||
|
||||
@@ -18,7 +18,7 @@ import lombok.NoArgsConstructor;
|
||||
@Builder
|
||||
public class AuthSmsSendReqVO extends CaptchaVerificationReqVO {
|
||||
|
||||
@Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloudyuanma")
|
||||
@Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "ztyuanma")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
@Mobile
|
||||
private String mobile;
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.hibernate.validator.constraints.Length;
|
||||
@Builder
|
||||
public class AuthTestLoginReqVO {
|
||||
|
||||
@Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloudyuanma")
|
||||
@Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "ztyuanma")
|
||||
@NotEmpty(message = "登录账号不能为空")
|
||||
@Length(min = 4, max = 16, message = "账号长度为 4-16 位")
|
||||
@Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class DeptListReqVO {
|
||||
|
||||
@Schema(description = "部门名称,模糊匹配", example = "ZT")
|
||||
@Schema(description = "部门名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
|
||||
@@ -18,10 +18,10 @@ public class DeptRespVO {
|
||||
@Schema(description = "部门编码", example = "DEPT_001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "部门简称", example = "ZT科技")
|
||||
@Schema(description = "部门简称", example = "芋道科技")
|
||||
private String shortName;
|
||||
|
||||
@Schema(description = "父部门 ID", example = "1024")
|
||||
@@ -36,7 +36,7 @@ public class DeptRespVO {
|
||||
@Schema(description = "联系电话", example = "15601691000")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "邮箱", example = "zt@iocoder.cn")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
|
||||
@@ -23,7 +23,7 @@ public class DeptSaveReqVO {
|
||||
@Size(max = 50, message = "部门编码长度不能超过 50 个字符")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotBlank(message = "部门名称不能为空")
|
||||
@Size(max = 30, message = "部门名称长度不能超过 30 个字符")
|
||||
private String name;
|
||||
@@ -46,7 +46,7 @@ public class DeptSaveReqVO {
|
||||
@Size(max = 11, message = "联系电话长度不能超过11个字符")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "邮箱", example = "zt@iocoder.cn")
|
||||
@Email(message = "邮箱格式不正确")
|
||||
@Size(max = 50, message = "邮箱长度不能超过 50 个字符")
|
||||
private String email;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class DeptSimpleRespVO {
|
||||
@Schema(description = "部门编码", example = "DEPT_001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "父部门 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
|
||||
@@ -10,10 +10,10 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PostPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "岗位编码,模糊匹配", example = "cloud")
|
||||
@Schema(description = "岗位编码,模糊匹配", example = "zt")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "ZT")
|
||||
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
|
||||
@@ -23,7 +23,7 @@ public class PostRespVO {
|
||||
@ExcelProperty("岗位名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "岗位编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "岗位编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@ExcelProperty("岗位编码")
|
||||
private String code;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public class PostSaveReqVO {
|
||||
@Size(max = 50, message = "岗位名称长度不能超过 50 个字符")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "岗位编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "岗位编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@NotBlank(message = "岗位编码不能为空")
|
||||
@Size(max = 64, message = "岗位编码长度不能超过64个字符")
|
||||
private String code;
|
||||
|
||||
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DictDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "字典标签", example = "ZT")
|
||||
@Schema(description = "字典标签", example = "芋道")
|
||||
@Size(max = 100, message = "字典标签长度不能超过100个字符")
|
||||
private String label;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class DictDataRespVO {
|
||||
@ExcelProperty("字典排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@ExcelProperty("字典标签")
|
||||
private String label;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class DictDataSaveReqVO {
|
||||
@NotNull(message = "显示顺序不能为空")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotBlank(message = "字典标签不能为空")
|
||||
@Size(max = 100, message = "字典标签长度不能超过100个字符")
|
||||
private String label;
|
||||
|
||||
@@ -16,7 +16,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DictTypePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "字典类型名称,模糊匹配", example = "ZT")
|
||||
@Schema(description = "字典类型名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")
|
||||
|
||||
@@ -10,7 +10,7 @@ public class DictTypeSimpleRespVO {
|
||||
@Schema(description = "字典类型编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "字典类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "sys_common_sex")
|
||||
|
||||
@@ -18,7 +18,7 @@ public class LoginLogPageReqVO extends PageParam {
|
||||
@Schema(description = "用户 IP,模拟匹配", example = "127.0.0.1")
|
||||
private String userIp;
|
||||
|
||||
@Schema(description = "用户账号,模拟匹配", example = "ZT")
|
||||
@Schema(description = "用户账号,模拟匹配", example = "芋道")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "操作状态", example = "true")
|
||||
|
||||
@@ -33,7 +33,7 @@ public class LoginLogRespVO {
|
||||
@Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab")
|
||||
private String traceId;
|
||||
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@ExcelProperty("用户账号")
|
||||
private String username;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@Data
|
||||
public class OperateLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户编号", example = "ZT")
|
||||
@Schema(description = "用户编号", example = "芋道")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "操作模块业务编号", example = "1")
|
||||
|
||||
@@ -43,7 +43,7 @@ public class OperateLogRespVO implements VO {
|
||||
@ExcelProperty("操作模块业务编号")
|
||||
private Long bizId;
|
||||
|
||||
@Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从ZT改成源码。")
|
||||
@Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。")
|
||||
private String action;
|
||||
|
||||
@Schema(description = "拓展字段", example = "{'orderId': 1}")
|
||||
|
||||
@@ -12,10 +12,10 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class MailAccountPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloudyuanma@123.com")
|
||||
@Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED, example = "ztyuanma@123.com")
|
||||
private String mail;
|
||||
|
||||
@Schema(description = "用户名" , requiredMode = Schema.RequiredMode.REQUIRED , example = "cloud")
|
||||
@Schema(description = "用户名" , requiredMode = Schema.RequiredMode.REQUIRED , example = "zt")
|
||||
private String username;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ public class MailAccountRespVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloudyuanma@123.com")
|
||||
@Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED, example = "ztyuanma@123.com")
|
||||
private String mail;
|
||||
|
||||
@Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
|
||||
|
||||
@@ -12,12 +12,12 @@ public class MailAccountSaveReqVO {
|
||||
@Schema(description = "编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloudyuanma@123.com")
|
||||
@Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED, example = "ztyuanma@123.com")
|
||||
@NotNull(message = "邮箱不能为空")
|
||||
@Email(message = "必须是 Email 格式")
|
||||
private String mail;
|
||||
|
||||
@Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@NotNull(message = "用户名不能为空")
|
||||
private String username;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class NoticePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "通知公告名称,模糊匹配", example = "ZT")
|
||||
@Schema(description = "通知公告名称,模糊匹配", example = "芋道")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
|
||||
@@ -7,7 +7,7 @@ tenant-id: {{adminTenantId}}
|
||||
{
|
||||
"id": "1",
|
||||
"secret": "admin123",
|
||||
"name": "ZT源码",
|
||||
"name": "芋道源码",
|
||||
"logo": "https://www.iocoder.cn/images/favicon.ico",
|
||||
"description": "我是描述",
|
||||
"status": 0,
|
||||
|
||||
@@ -10,5 +10,5 @@ Authorization: Bearer 47f9c74ec11041f193b777ebb95c3b0d
|
||||
tenant-id: {{adminTenantId}}
|
||||
|
||||
{
|
||||
"nickname": "ZT源码"
|
||||
"nickname": "芋道源码"
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ public class OAuth2UserInfoRespVO {
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
private String email;
|
||||
@Schema(description = "手机号码", example = "15601691300")
|
||||
private String mobile;
|
||||
|
||||
@@ -19,7 +19,7 @@ public class OAuth2UserUpdateReqVO {
|
||||
@Size(max = 30, message = "用户昵称长度不能超过 30 个字符")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
@Email(message = "邮箱格式不正确")
|
||||
@Size(max = 50, message = "邮箱长度不能超过 50 个字符")
|
||||
private String email;
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MenuListReqVO {
|
||||
|
||||
@Schema(description = "菜单名称,模糊匹配", example = "ZT")
|
||||
@Schema(description = "菜单名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
|
||||
@@ -15,7 +15,7 @@ public class MenuRespVO {
|
||||
@Schema(description = "菜单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotBlank(message = "菜单名称不能为空")
|
||||
@Size(max = 50, message = "菜单名称长度不能超过50个字符")
|
||||
private String name;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class MenuSaveVO {
|
||||
@Schema(description = "菜单编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotBlank(message = "菜单名称不能为空")
|
||||
@Size(max = 50, message = "菜单名称长度不能超过50个字符")
|
||||
private String name;
|
||||
|
||||
@@ -10,7 +10,7 @@ public class MenuSimpleRespVO {
|
||||
@Schema(description = "菜单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
|
||||
@@ -15,10 +15,10 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RolePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "角色名称,模糊匹配", example = "ZT")
|
||||
@Schema(description = "角色名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "角色标识,模糊匹配", example = "cloud")
|
||||
@Schema(description = "角色标识,模糊匹配", example = "zt")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
|
||||
@@ -10,7 +10,7 @@ public class RoleSimpleRespVO {
|
||||
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class SmsChannelPageReqVO extends PageParam {
|
||||
@Schema(description = "任务状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "短信签名,模糊匹配", example = "ZT源码")
|
||||
@Schema(description = "短信签名,模糊匹配", example = "芋道源码")
|
||||
private String signature;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
|
||||
@@ -14,7 +14,7 @@ public class SmsChannelRespVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
||||
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@NotNull(message = "短信签名不能为空")
|
||||
private String signature;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class SmsChannelRespVO {
|
||||
@Schema(description = "备注", example = "好吃!")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "短信 API 的账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "短信 API 的账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@NotNull(message = "短信 API 的账号不能为空")
|
||||
private String apiKey;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public class SmsChannelSaveReqVO {
|
||||
@Schema(description = "编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
||||
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@NotNull(message = "短信签名不能为空")
|
||||
private String signature;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class SmsChannelSaveReqVO {
|
||||
@Schema(description = "备注", example = "好吃!")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "短信 API 的账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "短信 API 的账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@NotNull(message = "短信 API 的账号不能为空")
|
||||
private String apiKey;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public class SmsChannelSimpleRespVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
|
||||
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
private String signature;
|
||||
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
|
||||
@@ -34,7 +34,7 @@ public class SmsTemplateRespVO {
|
||||
@ExcelProperty("模板编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@ExcelProperty("模板名称")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SmsTemplateSaveReqVO {
|
||||
@NotNull(message = "模板编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@NotNull(message = "模板名称不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class SocialClientPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "应用名", example = "cloud商城")
|
||||
@Schema(description = "应用名", example = "zt商城")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社交平台的类型", example = "31")
|
||||
|
||||
@@ -12,7 +12,7 @@ public class SocialClientRespVO {
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "27162")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud商城")
|
||||
@Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt商城")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社交平台的类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "31")
|
||||
|
||||
@@ -20,7 +20,7 @@ public class SocialClientSaveReqVO {
|
||||
@Schema(description = "编号", example = "27162")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud商城")
|
||||
@Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt商城")
|
||||
@NotNull(message = "应用名不能为空")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
### 获取租户编号 /admin-api/system/get-id-by-name
|
||||
GET {{baseUrl}}/system/tenant/get-id-by-name?name=ZT源码
|
||||
GET {{baseUrl}}/system/tenant/get-id-by-name?name=芋道源码
|
||||
|
||||
### 创建租户 /admin-api/system/tenant/create
|
||||
POST {{baseUrl}}/system/tenant/create
|
||||
@@ -8,7 +8,7 @@ Authorization: Bearer {{token}}
|
||||
tenant-id: {{adminTenantId}}
|
||||
|
||||
{
|
||||
"name": "ZT",
|
||||
"name": "芋道",
|
||||
"contactName": "芋艿",
|
||||
"contactMobile": "15601691300",
|
||||
"status": 0,
|
||||
|
||||
@@ -17,7 +17,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@ToString(callSuper = true)
|
||||
public class TenantPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "租户名", example = "ZT")
|
||||
@Schema(description = "租户名", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "联系人", example = "芋艿")
|
||||
|
||||
@@ -22,7 +22,7 @@ public class TenantRespVO {
|
||||
@ExcelProperty("租户编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@ExcelProperty("租户名")
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class TenantSaveReqVO {
|
||||
@Schema(description = "租户编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotNull(message = "租户名不能为空")
|
||||
private String name;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class TenantSaveReqVO {
|
||||
|
||||
// ========== 仅【创建】时,需要传递的字段 ==========
|
||||
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成")
|
||||
@Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
|
||||
private String username;
|
||||
|
||||
@@ -132,7 +132,7 @@ public class UserController {
|
||||
// 手动创建导出 demo
|
||||
List<UserImportExcelVO> list = Arrays.asList(
|
||||
UserImportExcelVO.builder().username("yunai").deptId(1L).email("yunai@iocoder.cn").mobile("15601691300")
|
||||
.nickname("ZT").status(CommonStatusEnum.ENABLE.getStatus()).sex(SexEnum.MALE.getSex()).build(),
|
||||
.nickname("芋道").status(CommonStatusEnum.ENABLE.getStatus()).sex(SexEnum.MALE.getSex()).build(),
|
||||
UserImportExcelVO.builder().username("yuanma").deptId(2L).email("yuanma@iocoder.cn").mobile("15601701300")
|
||||
.nickname("源码").status(CommonStatusEnum.DISABLE.getStatus()).sex(SexEnum.FEMALE.getSex()).build()
|
||||
);
|
||||
|
||||
@@ -19,13 +19,13 @@ public class UserProfileRespVO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "手机号码", example = "15601691300")
|
||||
|
||||
@@ -17,7 +17,7 @@ public class UserProfileUpdateReqVO {
|
||||
@Size(max = 30, message = "用户昵称长度不能超过 30 个字符")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
@Email(message = "邮箱格式不正确")
|
||||
@Size(max = 50, message = "邮箱长度不能超过 50 个字符")
|
||||
private String email;
|
||||
|
||||
@@ -19,10 +19,10 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户账号,模糊匹配", example = "cloud")
|
||||
@Schema(description = "用户账号,模糊匹配", example = "zt")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "手机号码,模糊匹配", example = "cloud")
|
||||
@Schema(description = "手机号码,模糊匹配", example = "zt")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
|
||||
@@ -21,7 +21,7 @@ public class UserRespVO{
|
||||
@ExcelProperty("用户编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@ExcelProperty("用户名称")
|
||||
private String username;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UserRespVO{
|
||||
@Schema(description = "岗位编号数组", example = "1")
|
||||
private Set<Long> postIds;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
@ExcelProperty("用户邮箱")
|
||||
private String email;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class UserSaveReqVO {
|
||||
@Schema(description = "用户编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cloud")
|
||||
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
|
||||
@NotBlank(message = "用户账号不能为空")
|
||||
@Pattern(regexp = "^[a-zA-Z0-9]+$", message = "用户账号由 数字、字母 组成")
|
||||
@Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
|
||||
@@ -48,7 +48,7 @@ public class UserSaveReqVO {
|
||||
@DiffLogField(name = "岗位", function = PostParseFunction.NAME)
|
||||
private Set<Long> postIds;
|
||||
|
||||
@Schema(description = "用户邮箱", example = "cloud@iocoder.cn")
|
||||
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")
|
||||
@Email(message = "邮箱格式不正确")
|
||||
@Size(max = 50, message = "邮箱长度不能超过 50 个字符")
|
||||
@DiffLogField(name = "用户邮箱")
|
||||
|
||||
@@ -14,7 +14,7 @@ public class UserSimpleRespVO {
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "部门ID", example = "我是一个用户")
|
||||
|
||||
@@ -14,7 +14,7 @@ public class AppDictDataRespVO {
|
||||
@Schema(description = "字典数据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "iocoder")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 提供 RESTful API 给前端:
|
||||
* 1. admin 包:提供给管理后台 cloud-ui-admin 前端项目
|
||||
* 2. app 包:提供给用户 APP cloud-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
|
||||
* 1. admin 包:提供给管理后台 zt-ui-admin 前端项目
|
||||
* 2. app 包:提供给用户 APP zt-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
|
||||
*/
|
||||
package com.zt.plat.module.system.controller;
|
||||
|
||||
@@ -1 +1 @@
|
||||
<http://www.iocoder.cn/Spring-Boot/MapStruct/?cloud>
|
||||
<http://www.iocoder.cn/Spring-Boot/MapStruct/?zt>
|
||||
|
||||
@@ -56,7 +56,7 @@ public class OperateLogDO extends BaseDO {
|
||||
/**
|
||||
* 日志内容,记录整个操作的明细
|
||||
*
|
||||
* 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从ZT改成源码。
|
||||
* 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。
|
||||
*/
|
||||
private String action;
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ImportAutoConfiguration(AjCaptchaAutoConfiguration.class) // 目的:解决 aj-captcha 针对 SpringBoot 3.X 自动配置不生效的问题
|
||||
public class CloudCaptchaConfiguration {
|
||||
public class ZtCaptchaConfiguration {
|
||||
|
||||
@Bean(name = "AjCaptchaCacheService")
|
||||
@Primary
|
||||
@@ -17,7 +17,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties({JustAuthProperties.class})
|
||||
public class CloudJustAuthConfiguration {
|
||||
public class ZtJustAuthConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(
|
||||
@@ -40,7 +40,7 @@ public class AdminUserParseFunction implements IParseFunction {
|
||||
log.warn("[apply][获取用户{{}}为空", value);
|
||||
return "";
|
||||
}
|
||||
// 返回格式 ZT源码(13888888888)
|
||||
// 返回格式 芋道源码(13888888888)
|
||||
String nickname = user.getNickname();
|
||||
if (StrUtil.isEmpty(user.getMobile())) {
|
||||
return nickname;
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.Duration;
|
||||
|
||||
@ConfigurationProperties(prefix = "cloud.sms-code")
|
||||
@ConfigurationProperties(prefix = "zt.sms-code")
|
||||
@Validated
|
||||
@Data
|
||||
public class SmsCodeProperties {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
|
||||
/**
|
||||
* 验证码的开关,默认为 true
|
||||
*/
|
||||
@Value("${cloud.captcha.enable:true}")
|
||||
@Value("${zt.captcha.enable:true}")
|
||||
@Setter // 为了单测:开启或者关闭验证码
|
||||
private Boolean captchaEnable;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class MemberServiceImpl implements MemberService {
|
||||
|
||||
@Value("${cloud.info.base-package}")
|
||||
@Value("${zt.info.base-package}")
|
||||
private String basePackage;
|
||||
|
||||
private volatile Object memberUserApi;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* cloud-module-member 模块的适配,解除 cloud-module-system 对它们的依赖
|
||||
* zt-module-member 模块的适配,解除 zt-module-system 对它们的依赖
|
||||
*/
|
||||
package com.zt.plat.module.system.service.member;
|
||||
|
||||
@@ -88,7 +88,7 @@ public class SocialClientServiceImpl implements SocialClientService {
|
||||
* 2. trial:体验版
|
||||
* 3. developer:开发版
|
||||
*/
|
||||
@Value("${cloud.wxa-code.env-version:release}")
|
||||
@Value("${zt.wxa-code.env-version:release}")
|
||||
public String envVersion;
|
||||
/**
|
||||
* 订阅消息跳转小程序类型
|
||||
@@ -97,7 +97,7 @@ public class SocialClientServiceImpl implements SocialClientService {
|
||||
* 2. trial:体验版
|
||||
* 3. formal:正式版
|
||||
*/
|
||||
@Value("${cloud.wxa-subscribe-message.miniprogram-state:formal}")
|
||||
@Value("${zt.wxa-subscribe-message.miniprogram-state:formal}")
|
||||
public String miniprogramState;
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -57,7 +57,7 @@ import static java.util.Collections.singleton;
|
||||
public class TenantServiceImpl implements TenantService {
|
||||
|
||||
@SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection")
|
||||
@Autowired(required = false) // 由于 cloud.tenant.enable 配置项,可以关闭多租户的功能,所以这里只能不强制注入
|
||||
@Autowired(required = false) // 由于 zt.tenant.enable 配置项,可以关闭多租户的功能,所以这里只能不强制注入
|
||||
private TenantProperties tenantProperties;
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -123,7 +123,7 @@ wx:
|
||||
key-prefix: wa # Redis Key 的前缀
|
||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
||||
|
||||
--- #################### ZT相关配置 ####################
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -133,10 +133,10 @@ wx:
|
||||
key-prefix: wa # Redis Key 的前缀
|
||||
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
|
||||
|
||||
--- #################### ZT相关配置 ####################
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# ZT配置项,设置当前项目所有自定义的配置
|
||||
cloud:
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
captcha:
|
||||
|
||||
@@ -85,7 +85,7 @@ mybatis-plus:
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
banner: false # 关闭控制台的 Banner 打印
|
||||
type-aliases-package: ${cloud.info.base-package}.dal.dataobject
|
||||
type-aliases-package: ${zt.info.base-package}.dal.dataobject
|
||||
encryptor:
|
||||
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
|
||||
|
||||
@@ -159,15 +159,15 @@ aj:
|
||||
req-check-minute-limit: 60 # check 接口一分钟内请求数限制
|
||||
req-verify-minute-limit: 60 # verify 接口一分钟内请求数限制
|
||||
|
||||
--- #################### ZT相关配置 ####################
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
cloud:
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat.module.system
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.cloud.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
url: http://dashboard.zt.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
xss:
|
||||
enable: false
|
||||
exclude-urls: # 如下 url,仅仅是为了演示,去掉配置也没关系
|
||||
@@ -175,7 +175,7 @@ cloud:
|
||||
swagger:
|
||||
title: 管理后台
|
||||
description: 提供管理员管理的所有功能
|
||||
version: ${cloud.info.version}
|
||||
version: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
ignore-urls: # 登录时不校验租户,登录后强制用户选择后进入系统
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<configuration>
|
||||
<!-- 引用 Spring Boot 的 logback 基础配置 -->
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<!-- 变量 cloud.info.base-package,基础业务包 -->
|
||||
<springProperty scope="context" name="cloud.info.base-package" source="cloud.info.base-package"/>
|
||||
<!-- 变量 zt.info.base-package,基础业务包 -->
|
||||
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
|
||||
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
||||
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class AliyunSmsClientTest extends BaseMockitoUnitTest {
|
||||
private final SmsChannelProperties properties = new SmsChannelProperties()
|
||||
.setApiKey(randomString()) // 随机一个 apiKey,避免构建报错
|
||||
.setApiSecret(randomString()) // 随机一个 apiSecret,避免构建报错
|
||||
.setSignature("ZT源码");
|
||||
.setSignature("芋道源码");
|
||||
|
||||
@InjectMocks
|
||||
private final AliyunSmsClient smsClient = new AliyunSmsClient(properties);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class HuaweiSmsClientTest extends BaseMockitoUnitTest {
|
||||
private final SmsChannelProperties properties = new SmsChannelProperties()
|
||||
.setApiKey(randomString() + " " + randomString()) // 随机一个 apiKey,避免构建报错
|
||||
.setApiSecret(randomString()) // 随机一个 apiSecret,避免构建报错
|
||||
.setSignature("ZT源码");
|
||||
.setSignature("芋道源码");
|
||||
|
||||
@InjectMocks
|
||||
private HuaweiSmsClient smsClient = new HuaweiSmsClient(properties);
|
||||
|
||||
@@ -33,7 +33,7 @@ public class QiniuSmsClientTest extends BaseMockitoUnitTest {
|
||||
private final SmsChannelProperties properties = new SmsChannelProperties()
|
||||
.setApiKey(randomString())// 随机一个 apiKey,避免构建报错
|
||||
.setApiSecret(randomString()) // 随机一个 apiSecret,避免构建报错
|
||||
.setSignature("ZT源码");
|
||||
.setSignature("芋道源码");
|
||||
|
||||
@InjectMocks
|
||||
private QiniuSmsClient smsClient = new QiniuSmsClient(properties);
|
||||
@@ -89,7 +89,7 @@ public class QiniuSmsClientTest extends BaseMockitoUnitTest {
|
||||
String apiTemplateId = randomString();
|
||||
// mock 方法
|
||||
httpUtilsMockedStatic.when(() -> HttpUtils.get(anyString(), anyMap()))
|
||||
.thenReturn("{\"audit_status\":\"passed\",\"created_at\":1724231187,\"description\":\"\",\"disable_broadcast\":false,\"disable_broadcast_reason\":\"\",\"disable_reason\":\"\",\"disabled\":false,\"id\":\"1826184073773596672\",\"is_oversea\":false,\"name\":\"dd\",\"parameters\":[\"code\"],\"reject_reason\":\"\",\"signature_id\":\"1826099896017498112\",\"signature_text\":\"cloud\",\"template\":\"您的验证码为:${code}\",\"type\":\"verification\",\"uid\":1383022432,\"updated_at\":1724288561,\"variable_count\":0}");
|
||||
.thenReturn("{\"audit_status\":\"passed\",\"created_at\":1724231187,\"description\":\"\",\"disable_broadcast\":false,\"disable_broadcast_reason\":\"\",\"disable_reason\":\"\",\"disabled\":false,\"id\":\"1826184073773596672\",\"is_oversea\":false,\"name\":\"dd\",\"parameters\":[\"code\"],\"reject_reason\":\"\",\"signature_id\":\"1826099896017498112\",\"signature_text\":\"zt\",\"template\":\"您的验证码为:${code}\",\"type\":\"verification\",\"uid\":1383022432,\"updated_at\":1724288561,\"variable_count\":0}");
|
||||
// 调用
|
||||
SmsTemplateRespDTO result = smsClient.getSmsTemplate(apiTemplateId);
|
||||
// 断言
|
||||
|
||||
@@ -62,7 +62,7 @@ public class SmsClientTests {
|
||||
SmsChannelProperties properties = new SmsChannelProperties()
|
||||
.setApiKey(System.getenv("SMS_TENCENT_ACCESS_KEY") + " " + sdkAppId)
|
||||
.setApiSecret(System.getenv("SMS_TENCENT_SECRET_KEY"))
|
||||
.setSignature("ZT源码");
|
||||
.setSignature("芋道源码");
|
||||
TencentSmsClient client = new TencentSmsClient(properties);
|
||||
// 准备参数
|
||||
Long sendLogId = System.currentTimeMillis();
|
||||
@@ -81,7 +81,7 @@ public class SmsClientTests {
|
||||
SmsChannelProperties properties = new SmsChannelProperties()
|
||||
.setApiKey(System.getenv("SMS_TENCENT_ACCESS_KEY") + " " + sdkAppId)
|
||||
.setApiSecret(System.getenv("SMS_TENCENT_SECRET_KEY"))
|
||||
.setSignature("ZT源码");
|
||||
.setSignature("芋道源码");
|
||||
TencentSmsClient client = new TencentSmsClient(properties);
|
||||
// 准备参数
|
||||
String apiTemplateId = "358212";
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TencentSmsClientTest extends BaseMockitoUnitTest {
|
||||
private final SmsChannelProperties properties = new SmsChannelProperties()
|
||||
.setApiKey(randomString() + " " + randomString()) // 随机一个 apiKey,避免构建报错
|
||||
.setApiSecret(randomString()) // 随机一个 apiSecret,避免构建报错
|
||||
.setSignature("ZT源码");
|
||||
.setSignature("芋道源码");
|
||||
|
||||
@InjectMocks
|
||||
private TencentSmsClient smsClient = new TencentSmsClient(properties);
|
||||
|
||||
@@ -115,7 +115,7 @@ public class MailTemplateServiceImplTest extends BaseDbUnitTest {
|
||||
});
|
||||
mailTemplateMapper.insert(dbMailTemplate);
|
||||
// 测试 name 不匹配
|
||||
mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setName("ZT")));
|
||||
mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setName("芋道")));
|
||||
// 测试 code 不匹配
|
||||
mailTemplateMapper.insert(cloneIgnoreId(dbMailTemplate, o -> o.setCode("test_02")));
|
||||
// 测试 accountId 不匹配
|
||||
|
||||
@@ -157,7 +157,7 @@ public class SmsChannelServiceTest extends BaseDbUnitTest {
|
||||
public void testGetSmsChannelPage() {
|
||||
// mock 数据
|
||||
SmsChannelDO dbSmsChannel = randomPojo(SmsChannelDO.class, o -> { // 等会查询到
|
||||
o.setSignature("ZT源码");
|
||||
o.setSignature("芋道源码");
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
o.setCreateTime(buildTime(2020, 12, 12));
|
||||
});
|
||||
@@ -170,7 +170,7 @@ public class SmsChannelServiceTest extends BaseDbUnitTest {
|
||||
smsChannelMapper.insert(cloneIgnoreId(dbSmsChannel, o -> o.setCreateTime(buildTime(2020, 11, 11))));
|
||||
// 准备参数
|
||||
SmsChannelPageReqVO reqVO = new SmsChannelPageReqVO();
|
||||
reqVO.setSignature("ZT");
|
||||
reqVO.setSignature("芋道");
|
||||
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
reqVO.setCreateTime(buildBetweenTime(2020, 12, 1, 2020, 12, 24));
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ public class SmsTemplateServiceImplTest extends BaseDbUnitTest {
|
||||
o.setType(SmsTemplateTypeEnum.PROMOTION.getType());
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
o.setCode("tudou");
|
||||
o.setContent("ZT源码");
|
||||
o.setContent("芋道源码");
|
||||
o.setApiTemplateId("yunai");
|
||||
o.setChannelId(1L);
|
||||
o.setCreateTime(buildTime(2021, 11, 11));
|
||||
@@ -231,7 +231,7 @@ public class SmsTemplateServiceImplTest extends BaseDbUnitTest {
|
||||
reqVO.setType(SmsTemplateTypeEnum.PROMOTION.getType());
|
||||
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
reqVO.setCode("tu");
|
||||
reqVO.setContent("ZT");
|
||||
reqVO.setContent("芋道");
|
||||
reqVO.setApiTemplateId("yu");
|
||||
reqVO.setChannelId(1L);
|
||||
reqVO.setCreateTime(buildBetweenTime(2021, 11, 1, 2021, 12, 1));
|
||||
|
||||
@@ -438,7 +438,7 @@ public class SocialClientServiceImplTest extends BaseDbUnitTest {
|
||||
o.setName("芋头");
|
||||
o.setSocialType(SocialTypeEnum.GITEE.getType());
|
||||
o.setUserType(UserTypeEnum.ADMIN.getValue());
|
||||
o.setClientId("cloud");
|
||||
o.setClientId("zt");
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
});
|
||||
socialClientMapper.insert(dbSocialClient);
|
||||
|
||||
@@ -258,7 +258,7 @@ public class SocialUserServiceImplTest extends BaseDbUnitTest {
|
||||
SocialUserDO dbSocialUser = randomPojo(SocialUserDO.class, o -> { // 等会查询到
|
||||
o.setType(SocialTypeEnum.GITEE.getType());
|
||||
o.setNickname("芋艿");
|
||||
o.setOpenid("cloudyuanma");
|
||||
o.setOpenid("ztyuanma");
|
||||
o.setCreateTime(buildTime(2020, 1, 15));
|
||||
});
|
||||
socialUserMapper.insert(dbSocialUser);
|
||||
@@ -274,7 +274,7 @@ public class SocialUserServiceImplTest extends BaseDbUnitTest {
|
||||
SocialUserPageReqVO reqVO = new SocialUserPageReqVO();
|
||||
reqVO.setType(SocialTypeEnum.GITEE.getType());
|
||||
reqVO.setNickname("芋");
|
||||
reqVO.setOpenid("cloud");
|
||||
reqVO.setOpenid("zt");
|
||||
reqVO.setCreateTime(buildBetweenTime(2020, 1, 10, 2020, 1, 20));
|
||||
|
||||
// 调用
|
||||
|
||||
@@ -141,7 +141,7 @@ public class TenantPackageServiceImplTest extends BaseDbUnitTest {
|
||||
public void testGetTenantPackagePage() {
|
||||
// mock 数据
|
||||
TenantPackageDO dbTenantPackage = randomPojo(TenantPackageDO.class, o -> { // 等会查询到
|
||||
o.setName("ZT源码");
|
||||
o.setName("芋道源码");
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
o.setRemark("源码解析");
|
||||
o.setCreateTime(buildTime(2022, 10, 10));
|
||||
@@ -157,7 +157,7 @@ public class TenantPackageServiceImplTest extends BaseDbUnitTest {
|
||||
tenantPackageMapper.insert(cloneIgnoreId(dbTenantPackage, o -> o.setCreateTime(buildTime(2022, 11, 11))));
|
||||
// 准备参数
|
||||
TenantPackagePageReqVO reqVO = new TenantPackagePageReqVO();
|
||||
reqVO.setName("ZT");
|
||||
reqVO.setName("芋道");
|
||||
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
reqVO.setRemark("源码");
|
||||
reqVO.setCreateTime(buildBetweenTime(2022, 10, 9, 2022, 10, 11));
|
||||
|
||||
@@ -144,14 +144,14 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
|
||||
when(userService.createUser(argThat(user -> {
|
||||
assertEquals("yunai", user.getUsername());
|
||||
assertEquals("yuanma", user.getPassword());
|
||||
assertEquals("ZT", user.getNickname());
|
||||
assertEquals("芋道", user.getNickname());
|
||||
assertEquals("15601691300", user.getMobile());
|
||||
return true;
|
||||
}))).thenReturn(300L);
|
||||
|
||||
// 准备参数
|
||||
TenantSaveReqVO reqVO = randomPojo(TenantSaveReqVO.class, o -> {
|
||||
o.setContactName("ZT");
|
||||
o.setContactName("芋道");
|
||||
o.setContactMobile("15601691300");
|
||||
o.setPackageId(100L);
|
||||
o.setStatus(randomCommonStatus());
|
||||
@@ -286,7 +286,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
|
||||
public void testGetTenantPage() {
|
||||
// mock 数据
|
||||
TenantDO dbTenant = randomPojo(TenantDO.class, o -> { // 等会查询到
|
||||
o.setName("ZT源码");
|
||||
o.setName("芋道源码");
|
||||
o.setContactName("芋艿");
|
||||
o.setContactMobile("15601691300");
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
@@ -305,7 +305,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
|
||||
tenantMapper.insert(cloneIgnoreId(dbTenant, o -> o.setCreateTime(buildTime(2021, 12, 12))));
|
||||
// 准备参数
|
||||
TenantPageReqVO reqVO = new TenantPageReqVO();
|
||||
reqVO.setName("ZT");
|
||||
reqVO.setName("芋道");
|
||||
reqVO.setContactName("艿");
|
||||
reqVO.setContactMobile("1560");
|
||||
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
@@ -322,11 +322,11 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
|
||||
@Test
|
||||
public void testGetTenantByName() {
|
||||
// mock 数据
|
||||
TenantDO dbTenant = randomPojo(TenantDO.class, o -> o.setName("ZT"));
|
||||
TenantDO dbTenant = randomPojo(TenantDO.class, o -> o.setName("芋道"));
|
||||
tenantMapper.insert(dbTenant);// @Sql: 先插入出一条存在的数据
|
||||
|
||||
// 调用
|
||||
TenantDO result = tenantService.getTenantByName("ZT");
|
||||
TenantDO result = tenantService.getTenantByName("芋道");
|
||||
// 校验存在
|
||||
assertPojoEquals(result, dbTenant);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest {
|
||||
@BeforeEach
|
||||
public void before() {
|
||||
// mock 初始化密码
|
||||
when(configApi.getConfigValueByKey(USER_INIT_PASSWORD_KEY)).thenReturn(success("cloudyuanma"));
|
||||
when(configApi.getConfigValueByKey(USER_INIT_PASSWORD_KEY)).thenReturn(success("ztyuanma"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -121,14 +121,14 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest {
|
||||
}));
|
||||
when(postService.getPostList(eq(reqVO.getPostIds()), isNull())).thenReturn(posts);
|
||||
// mock passwordEncoder 的方法
|
||||
when(passwordEncoder.encode(eq(reqVO.getPassword()))).thenReturn("cloudyuanma");
|
||||
when(passwordEncoder.encode(eq(reqVO.getPassword()))).thenReturn("ztyuanma");
|
||||
|
||||
// 调用
|
||||
Long userId = userService.createUser(reqVO);
|
||||
// 断言
|
||||
AdminUserDO user = userMapper.selectById(userId);
|
||||
assertPojoEquals(reqVO, user, "password", "id","deptIds","status","userSource");
|
||||
assertEquals("cloudyuanma", user.getPassword());
|
||||
assertEquals("ztyuanma", user.getPassword());
|
||||
assertEquals(CommonStatusEnum.ENABLE.getStatus(), user.getStatus());
|
||||
// 断言关联岗位
|
||||
List<UserPostDO> userPosts = userPostMapper.selectListByUserId(user.getId());
|
||||
@@ -255,7 +255,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest {
|
||||
userMapper.insert(dbUser);
|
||||
// 准备参数
|
||||
Long userId = dbUser.getId();
|
||||
String password = "cloud";
|
||||
String password = "zt";
|
||||
// mock 方法
|
||||
when(passwordEncoder.encode(anyString())).then(
|
||||
(Answer<String>) invocationOnMock -> "encode:" + invocationOnMock.getArgument(0));
|
||||
@@ -684,7 +684,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest {
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
}));
|
||||
when(postService.getPostList(eq(reqVO.getPostIds()), isNull())).thenReturn(posts);
|
||||
when(passwordEncoder.encode(eq(reqVO.getPassword()))).thenReturn("cloudyuanma");
|
||||
when(passwordEncoder.encode(eq(reqVO.getPassword()))).thenReturn("ztyuanma");
|
||||
|
||||
// 调用
|
||||
Long userId = userService.createUser(reqVO);
|
||||
|
||||
@@ -47,9 +47,9 @@ mybatis-plus:
|
||||
|
||||
--- #################### 监控相关配置 ####################
|
||||
|
||||
--- #################### ZT相关配置 ####################
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# ZT配置项,设置当前项目所有自定义的配置
|
||||
cloud:
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
info:
|
||||
base-package: com.zt.plat.module
|
||||
|
||||
Reference in New Issue
Block a user