1. 剔除掉多余的文档以及标记

This commit is contained in:
chenbowen
2025-11-28 18:12:00 +08:00
parent 30bd4810f5
commit 0c22975df0
432 changed files with 705 additions and 1650200 deletions

View File

@@ -15,13 +15,13 @@ import java.util.List;
@Builder
public class AuthMenuRespVO {
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private Long id;
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long parentId;
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String name;
@Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post")

View File

@@ -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 = "芋道源码")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
private String nickname;
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
@@ -62,13 +62,13 @@ public class AuthPermissionInfoRespVO {
@Builder
public static class MenuVO {
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private Long id;
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long parentId;
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String name;
@Schema(description = "路由地址,仅菜单类型为菜单或者目录时,才需要传", example = "post")

View File

@@ -20,7 +20,7 @@ public class AuthRegisterReqVO extends CaptchaVerificationReqVO {
@Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
private String username;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@NotBlank(message = "用户昵称不能为空")
@Size(max = 30, message = "用户昵称长度不能超过 30 个字符")
private String nickname;

View File

@@ -9,7 +9,7 @@ import java.util.List;
@Data
public class DeptListReqVO {
@Schema(description = "部门名称,模糊匹配", example = "芋道")
@Schema(description = "部门名称,模糊匹配", example = "ZT")
private String name;
@Schema(description = "部门编码,精确匹配", example = "ZT001")

View File

@@ -18,10 +18,10 @@ public class DeptRespVO {
@Schema(description = "部门编码", example = "DEPT_001")
private String code;
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String name;
@Schema(description = "部门简称", example = "芋道科技")
@Schema(description = "部门简称", example = "ZT科技")
private String shortName;
@Schema(description = "父部门 ID", example = "1024")

View File

@@ -23,7 +23,7 @@ public class DeptSaveReqVO {
@Size(max = 50, message = "部门编码长度不能超过 50 个字符")
private String code;
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@NotBlank(message = "部门名称不能为空")
@Size(max = 30, message = "部门名称长度不能超过 30 个字符")
private String name;

View File

@@ -20,7 +20,7 @@ public class DeptSimpleRespVO {
@Schema(description = "部门编码", example = "DEPT_001")
private String code;
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String name;
@Schema(description = "父部门 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")

View File

@@ -13,7 +13,7 @@ public class PostPageReqVO extends PageParam {
@Schema(description = "岗位编码,模糊匹配", example = "zt")
private String code;
@Schema(description = "岗位名称,模糊匹配", example = "芋道")
@Schema(description = "岗位名称,模糊匹配", example = "ZT")
private String name;
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")

View File

@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class DictDataPageReqVO extends PageParam {
@Schema(description = "字典标签", example = "芋道")
@Schema(description = "字典标签", example = "ZT")
@Size(max = 100, message = "字典标签长度不能超过100个字符")
private String label;

View File

@@ -23,7 +23,7 @@ public class DictDataRespVO {
@ExcelProperty("字典排序")
private Integer sort;
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@ExcelProperty("字典标签")
private String label;

View File

@@ -19,7 +19,7 @@ public class DictDataSaveReqVO {
@NotNull(message = "显示顺序不能为空")
private Integer sort;
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@NotBlank(message = "字典标签不能为空")
@Size(max = 100, message = "字典标签长度不能超过100个字符")
private String label;

View File

@@ -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 = "芋道")
@Schema(description = "字典类型名称,模糊匹配", example = "ZT")
private String name;
@Schema(description = "字典类型,模糊匹配", example = "sys_common_sex")

View File

@@ -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 = "芋道")
@Schema(description = "字典类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String name;
@Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "sys_common_sex")

View File

@@ -36,6 +36,9 @@ public class IWorkFullSyncReqVO {
@Schema(description = "是否包含已失效canceled=1的记录", example = "false")
private Boolean includeCanceled = Boolean.FALSE;
@Schema(description = "是否允许更新已存在的本地实体", example = "false")
private Boolean allowUpdate = Boolean.FALSE;
public Set<IWorkSyncEntityTypeEnum> resolveScopes() {
EnumSet<IWorkSyncEntityTypeEnum> defaults = EnumSet.allOf(IWorkSyncEntityTypeEnum.class);
if (scopes == null || scopes.isEmpty()) {

View File

@@ -18,7 +18,7 @@ public class LoginLogPageReqVO extends PageParam {
@Schema(description = "用户 IP模拟匹配", example = "127.0.0.1")
private String userIp;
@Schema(description = "用户账号,模拟匹配", example = "芋道")
@Schema(description = "用户账号,模拟匹配", example = "ZT")
private String username;
@Schema(description = "操作状态", example = "true")

View File

@@ -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 = "芋道")
@Schema(description = "用户编号", example = "ZT")
private Long userId;
@Schema(description = "操作模块业务编号", example = "1")

View File

@@ -27,7 +27,7 @@ public class OperateLogRespVO implements VO {
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@Trans(type = TransType.SIMPLE, target = AdminUserDO.class, fields = "nickname", ref = "userName")
private Long userId;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@ExcelProperty("操作人")
private String userName;
@@ -43,7 +43,7 @@ public class OperateLogRespVO implements VO {
@ExcelProperty("操作模块业务编号")
private Long bizId;
@Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。")
@Schema(description = "操作明细", example = "修改编号为 1 的用户信息,将性别从男改成女,将姓名从ZT改成源码。")
private String action;
@Schema(description = "拓展字段", example = "{'orderId': 1}")

View File

@@ -10,7 +10,7 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class NoticePageReqVO extends PageParam {
@Schema(description = "通知公告名称,模糊匹配", example = "芋道")
@Schema(description = "通知公告名称,模糊匹配", example = "ZT")
private String title;
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")

View File

@@ -25,7 +25,7 @@ public class NotifyMessageRespVO {
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "test_01")
private String templateCode;
@Schema(description = "模版发送人名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "模版发送人名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String templateNickname;
@Schema(description = "模版内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试内容")

View File

@@ -7,7 +7,7 @@ tenant-id: {{adminTenantId}}
{
"id": "1",
"secret": "admin123",
"name": "芋道源码",
"name": "ZT源码",
"logo": "https://www.iocoder.cn/images/favicon.ico",
"description": "我是描述",
"status": 0,

View File

@@ -10,5 +10,5 @@ Authorization: Bearer 47f9c74ec11041f193b777ebb95c3b0d
tenant-id: {{adminTenantId}}
{
"nickname": "芋道源码"
"nickname": "ZT源码"
}

View File

@@ -19,10 +19,10 @@ public class OAuth2UserInfoRespVO {
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String username;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String nickname;
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")

View File

@@ -15,7 +15,7 @@ import jakarta.validation.constraints.Size;
@AllArgsConstructor
public class OAuth2UserUpdateReqVO {
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@Size(max = 30, message = "用户昵称长度不能超过 30 个字符")
private String nickname;

View File

@@ -7,7 +7,7 @@ import lombok.Data;
@Data
public class MenuListReqVO {
@Schema(description = "菜单名称,模糊匹配", example = "芋道")
@Schema(description = "菜单名称,模糊匹配", example = "ZT")
private String name;
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")

View File

@@ -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 = "芋道")
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@NotBlank(message = "菜单名称不能为空")
@Size(max = 50, message = "菜单名称长度不能超过50个字符")
private String name;

View File

@@ -13,7 +13,7 @@ public class MenuSaveVO {
@Schema(description = "菜单编号", example = "1024")
private Long id;
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@NotBlank(message = "菜单名称不能为空")
@Size(max = 50, message = "菜单名称长度不能超过50个字符")
private String name;

View File

@@ -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 = "芋道")
@Schema(description = "菜单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String name;
@Schema(description = "父菜单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")

View File

@@ -15,7 +15,7 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
@EqualsAndHashCode(callSuper = true)
public class RolePageReqVO extends PageParam {
@Schema(description = "角色名称,模糊匹配", example = "芋道")
@Schema(description = "角色名称,模糊匹配", example = "ZT")
private String name;
@Schema(description = "角色标识,模糊匹配", example = "zt")

View File

@@ -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 = "芋道")
@Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String name;
}

View File

@@ -20,7 +20,7 @@ public class SmsChannelPageReqVO extends PageParam {
@Schema(description = "任务状态", example = "1")
private Integer status;
@Schema(description = "短信签名,模糊匹配", example = "芋道源码")
@Schema(description = "短信签名,模糊匹配", example = "ZT源码")
private String signature;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

View File

@@ -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 = "芋道源码")
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
@NotNull(message = "短信签名不能为空")
private String signature;

View File

@@ -13,7 +13,7 @@ public class SmsChannelSaveReqVO {
@Schema(description = "编号", example = "1024")
private Long id;
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
@NotNull(message = "短信签名不能为空")
private String signature;

View File

@@ -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 = "芋道源码")
@Schema(description = "短信签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT源码")
private String signature;
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")

View File

@@ -24,7 +24,7 @@ public class SocialUserRespVO {
@Schema(description = "原始 Token 数据,一般是 JSON 格式", requiredMode = Schema.RequiredMode.REQUIRED, example = "{}")
private String rawTokenInfo;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String nickname;
@Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png")

View File

@@ -1,5 +1,5 @@
### 获取租户编号 /admin-api/system/get-id-by-name
GET {{baseUrl}}/system/tenant/get-id-by-name?name=芋道源码
GET {{baseUrl}}/system/tenant/get-id-by-name?name=ZT源码
### 创建租户 /admin-api/system/tenant/create
POST {{baseUrl}}/system/tenant/create
@@ -8,8 +8,8 @@ Authorization: Bearer {{token}}
tenant-id: {{adminTenantId}}
{
"name": "芋道",
"contactName": "芋艿",
"name": "ZT",
"contactName": "ZT",
"contactMobile": "15601691300",
"status": 0,
"domain": "https://www.iocoder.cn",

View File

@@ -17,10 +17,10 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
@ToString(callSuper = true)
public class TenantPageReqVO extends PageParam {
@Schema(description = "租户名", example = "芋道")
@Schema(description = "租户名", example = "ZT")
private String name;
@Schema(description = "联系人", example = "芋艿")
@Schema(description = "联系人", example = "ZT")
private String contactName;
@Schema(description = "联系手机", example = "15601691300")

View File

@@ -22,11 +22,11 @@ public class TenantRespVO {
@ExcelProperty("租户编号")
private Long id;
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@ExcelProperty("租户名")
private String name;
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@ExcelProperty("联系人")
private String contactName;

View File

@@ -19,11 +19,11 @@ public class TenantSaveReqVO {
@Schema(description = "租户编号", example = "1024")
private Long id;
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@Schema(description = "租户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@NotNull(message = "租户名不能为空")
private String name;
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@NotNull(message = "联系人不能为空")
private String contactName;

View File

@@ -129,7 +129,7 @@ public class UserController {
// 手动创建导出 demo
List<UserImportExcelVO> list = Arrays.asList(
UserImportExcelVO.builder().username("yunai").deptId(1L).email("yunai@iocoder.cn").mobile("15601691300")
.nickname("芋道").status(CommonStatusEnum.ENABLE.getStatus()).sex(SexEnum.MALE.getSex()).build(),
.nickname("ZT").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()
);

View File

@@ -22,7 +22,7 @@ public class UserProfileRespVO {
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zt")
private String username;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String nickname;
@Schema(description = "用户邮箱", example = "zt@iocoder.cn")

View File

@@ -14,7 +14,7 @@ import jakarta.validation.constraints.Size;
@Data
public class UserProfileUpdateReqVO {
@Schema(description = "用户昵称", example = "芋艿")
@Schema(description = "用户昵称", example = "ZT")
@Size(max = 30, message = "用户昵称长度不能超过 30 个字符")
private String nickname;

View File

@@ -25,7 +25,7 @@ public class UserRespVO{
@ExcelProperty("用户名称")
private String username;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@ExcelProperty("用户昵称")
private String nickname;

View File

@@ -33,7 +33,7 @@ public class UserSaveReqVO {
@DiffLogField(name = "用户账号")
private String username;
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
@Size(max = 30, message = "用户昵称长度不能超过30个字符")
@DiffLogField(name = "用户昵称")
private String nickname;

View File

@@ -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 = "芋道")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String nickname;
@Schema(description = "部门ID", example = "我是一个用户")

View File

@@ -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 = "芋道")
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
private String label;
@Schema(description = "字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "iocoder")

View File

@@ -56,7 +56,7 @@ public class OperateLogDO extends BaseDO {
/**
* 日志内容,记录整个操作的明细
*
* 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从芋道改成源码。
* 例如说,修改编号为 1 的用户信息,将性别从男改成女,将姓名从ZT改成源码。
*/
private String action;
/**

View File

@@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
/**
* JustAuth 配置类 TODO 芋艿:等 justauth 1.4.1 版本发布!!!
* JustAuth 配置类 TODO ZT:等 justauth 1.4.1 版本发布!!!
*
* @author ZT
*/

View File

@@ -43,7 +43,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
// TODO @芋艿:等官方发布 1.4.1
// TODO @ZT:等官方发布 1.4.1
/**
* <p>
* AuthRequest工厂类

View File

@@ -40,7 +40,7 @@ public class AdminUserParseFunction implements IParseFunction {
log.warn("[apply][获取用户{{}}为空", value);
return "";
}
// 返回格式 芋道源码(13888888888)
// 返回格式 ZT源码(13888888888)
String nickname = user.getNickname();
if (StrUtil.isEmpty(user.getMobile())) {
return nickname;

View File

@@ -19,7 +19,7 @@ public class SecurityConfiguration {
@Override
public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
// TODO 芋艿:这个每个项目都需要重复配置,得捉摸有没通用的方案
// TODO ZT:这个每个项目都需要重复配置,得捉摸有没通用的方案
// Swagger 接口文档
registry.requestMatchers("/v3/api-docs/**").permitAll()
.requestMatchers("/webjars/**").permitAll()

View File

@@ -36,15 +36,7 @@ public interface IWorkSyncProcessor {
this.createIfMissing = createIfMissing;
}
public static SyncOptions full(boolean includeCanceled) {
return new SyncOptions(includeCanceled, false, true);
}
public static SyncOptions single(boolean createIfMissing) {
return new SyncOptions(true, true, Boolean.TRUE.equals(createIfMissing));
}
public static SyncOptions custom(boolean includeCanceled, boolean allowUpdate, boolean createIfMissing) {
public static SyncOptions custom(boolean includeCanceled, boolean allowUpdate,boolean createIfMissing) {
return new SyncOptions(includeCanceled, allowUpdate, createIfMissing);
}

View File

@@ -43,6 +43,7 @@ public class IWorkIntegrationServiceImpl implements IWorkIntegrationService {
private static final TypeReference<Map<String, Object>> MAP_TYPE = new TypeReference<>() {
};
private static final okhttp3.MediaType JSON_MEDIA_TYPE = okhttp3.MediaType.get("application/json; charset=UTF-8");
private static final int MAX_REASON_LENGTH = 400;
private final IWorkProperties properties;
private final ObjectMapper objectMapper;
@@ -594,6 +595,18 @@ public class IWorkIntegrationServiceImpl implements IWorkIntegrationService {
if (node.has("errmsg")) {
return node.get("errmsg").asText();
}
if (node.has("errorMsg")) {
return node.get("errorMsg").asText();
}
if (node.has("error")) {
return node.get("error").asText();
}
if (node.has("detail")) {
return node.get("detail").asText();
}
if (node.has("info")) {
return node.get("info").asText();
}
return null;
}
@@ -730,15 +743,70 @@ public class IWorkIntegrationServiceImpl implements IWorkIntegrationService {
String responseBody = response.body() != null ? response.body().string() : null;
if (!response.isSuccessful()) {
log.error("[iWork] request {} failed. status={} body={}", request.url(), response.code(), responseBody);
throw ServiceExceptionUtil.exception(errorCode, response.code(), responseBody);
throw buildRemoteException(errorCode, response.code(), responseBody);
}
return responseBody;
} catch (IOException ex) {
log.error("[iWork] request {} failed", request.url(), ex);
throw ServiceExceptionUtil.exception(errorCode, ex.getMessage());
throw buildRemoteException(errorCode, -1, ex.getMessage());
}
}
private ServiceException buildRemoteException(ErrorCode errorCode, int statusCode, String responseBody) {
StringBuilder message = new StringBuilder(errorCode.getMsg());
if (statusCode > 0) {
message.append("HTTP ").append(statusCode).append("");
}
String reason = extractReadableReason(responseBody);
if (StringUtils.hasText(reason)) {
message.append("").append(reason);
}
return ServiceExceptionUtil.exception0(errorCode.getCode(), message.toString());
}
private String extractReadableReason(String responseBody) {
if (!StringUtils.hasText(responseBody)) {
return null;
}
String trimmed = responseBody.trim();
if (isJsonLike(trimmed)) {
try {
JsonNode node = objectMapper.readTree(trimmed);
String resolved = resolveMessage(node);
if (!StringUtils.hasText(resolved) && node.has("data")) {
JsonNode data = node.get("data");
if (data.has("message")) {
resolved = data.get("message").asText();
} else if (data.has("msg")) {
resolved = data.get("msg").asText();
}
}
if (StringUtils.hasText(resolved)) {
return abbreviate(resolved, MAX_REASON_LENGTH);
}
trimmed = objectMapper.writeValueAsString(node);
} catch (Exception ignored) {
// fall through to plain text handling
}
}
return abbreviate(trimmed.replaceAll("\\s+", " "), MAX_REASON_LENGTH);
}
private boolean isJsonLike(String text) {
if (!StringUtils.hasText(text)) {
return false;
}
char firstChar = text.charAt(0);
return firstChar == '{' || firstChar == '[';
}
private String abbreviate(String value, int maxLength) {
if (!StringUtils.hasText(value) || value.length() <= maxLength) {
return value;
}
return value.substring(0, maxLength) + "...";
}
private void logCurlCommand(Request request) {
if (request == null || !log.isInfoEnabled()) {
return;

View File

@@ -182,7 +182,9 @@ public class IWorkSyncServiceImpl implements IWorkSyncService {
}
private IWorkSyncProcessor.SyncOptions buildFullSyncOptions(IWorkFullSyncReqVO reqVO) {
return IWorkSyncProcessor.SyncOptions.full(Boolean.TRUE.equals(reqVO.getIncludeCanceled()));
boolean includeCanceled = Boolean.TRUE.equals(reqVO.getIncludeCanceled());
boolean allowUpdate = Boolean.TRUE.equals(reqVO.getAllowUpdate());
return IWorkSyncProcessor.SyncOptions.custom(includeCanceled, allowUpdate, true);
}
private void ensureIWorkSuccess(String action, boolean success, String remoteMessage) {

View File

@@ -86,7 +86,7 @@ public class OAuth2GrantServiceImpl implements OAuth2GrantService {
@Override
public OAuth2AccessTokenDO grantClientCredentials(String clientId, List<String> scopes) {
// TODO 芋艿:项目中使用 OAuth2 解决的是三方应用的授权,内部的 SSO 等问题,所以暂时不考虑 client_credentials 这个场景
// TODO ZT:项目中使用 OAuth2 解决的是三方应用的授权,内部的 SSO 等问题,所以暂时不考虑 client_credentials 这个场景
throw new UnsupportedOperationException("暂时不支持 client_credentials 授权模式");
}

View File

@@ -62,8 +62,8 @@ public class SmsCodeServiceImpl implements SmsCodeService {
lastSmsCode.getTodayIndex() >= smsCodeProperties.getSendMaximumQuantityPerDay()) { // 超过当天发送的上限。
throw exception(SMS_CODE_EXCEED_SEND_MAXIMUM_QUANTITY_PER_DAY);
}
// TODO 芋艿:提升,每个 IP 每天可发送数量
// TODO 芋艿:提升,每个 IP 每小时可发送数量
// TODO ZT:提升,每个 IP 每天可发送数量
// TODO ZT:提升,每个 IP 每小时可发送数量
}
// 创建验证码记录

View File

@@ -133,7 +133,7 @@ wx:
key-prefix: wa # Redis Key 的前缀
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
--- #################### 芋道相关配置 ####################
--- #################### ZT相关配置 ####################

View File

@@ -103,7 +103,7 @@ logging:
# 配置自己写的 MyBatis Mapper 打印日志
com.zt.plat.module.system.dal.mysql: debug
com.zt.plat.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO ZT先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
--- #################### 微信公众号、小程序相关配置 ####################
wx:
@@ -133,9 +133,9 @@ wx:
key-prefix: wa # Redis Key 的前缀
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
--- #################### 芋道相关配置 ####################
--- #################### ZT相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
# ZT配置项,设置当前项目所有自定义的配置
zt:
env: # 多环境的配置项
tag: ${HOSTNAME}

View File

@@ -68,7 +68,7 @@ springdoc:
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
knife4j:
enable: false # TODO 芋艿需要关闭增强具体原因见https://github.com/xiaoymin/knife4j/issues/874
enable: false # TODO ZT需要关闭增强具体原因见https://github.com/xiaoymin/knife4j/issues/874
setting:
language: zh_cn
@@ -194,7 +194,7 @@ aj:
req-check-minute-limit: 60 # check 接口一分钟内请求数限制
req-verify-minute-limit: 60 # verify 接口一分钟内请求数限制
--- #################### 芋道相关配置 ####################
--- #################### ZT相关配置 ####################
zt:
info: