mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-19 20:57:21 +08:00
build: continew-starter 2.13.4 => 2.14.0
1.适配 cs security-crypto 模块拆分及包名调整,重新引入密码编码器模块 2.适配 cs 树型结构字典配置命名调整 DICT_TREE -> TREE_DICT 3.cs QueryIgnore 已移除,自行处理所有 Query 参数 4.cs 修复多租户下开启多数据源拦截器返回结果异常的情况 5.cs 修复邮箱发送错误
This commit is contained in:
@@ -104,7 +104,7 @@ public class AuthServiceImpl implements AuthService {
|
||||
}
|
||||
// 构建路由树
|
||||
TreeField treeField = MenuResp.class.getDeclaredAnnotation(TreeField.class);
|
||||
TreeNodeConfig treeNodeConfig = crudProperties.getTree().genTreeNodeConfig(treeField);
|
||||
TreeNodeConfig treeNodeConfig = crudProperties.getTreeDictModel().genTreeNodeConfig(treeField);
|
||||
List<Tree<Long>> treeList = TreeUtil.build(menuList, treeField.rootId(), treeNodeConfig, (m, tree) -> {
|
||||
tree.setId(m.getId());
|
||||
tree.setParentId(m.getParentId());
|
||||
|
@@ -35,6 +35,6 @@ import top.continew.starter.extension.crud.enums.Api;
|
||||
@Tag(name = "部门管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/dept", api = {Api.TREE, Api.GET, Api.CREATE, Api.UPDATE, Api.BATCH_DELETE,
|
||||
Api.EXPORT, Api.DICT_TREE})
|
||||
Api.EXPORT, Api.TREE_DICT})
|
||||
public class DeptController extends BaseController<DeptService, DeptResp, DeptResp, DeptQuery, DeptReq> {
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ import java.lang.reflect.Method;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/system/menu", api = {Api.TREE, Api.GET, Api.CREATE, Api.UPDATE, Api.BATCH_DELETE,
|
||||
Api.DICT_TREE})
|
||||
Api.TREE_DICT})
|
||||
public class MenuController extends BaseController<MenuService, MenuResp, MenuResp, MenuQuery, MenuReq> {
|
||||
|
||||
@Operation(summary = "清除缓存", description = "清除缓存")
|
||||
|
@@ -26,7 +26,7 @@ import top.continew.admin.common.base.mapper.DataPermissionMapper;
|
||||
import top.continew.admin.system.model.entity.user.UserDO;
|
||||
import top.continew.admin.system.model.resp.user.UserDetailResp;
|
||||
import top.continew.starter.extension.datapermission.annotation.DataPermission;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
import top.continew.starter.encrypt.field.annotation.FieldEncrypt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@@ -20,7 +20,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.common.base.model.entity.BaseDO;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
import top.continew.starter.encrypt.field.annotation.FieldEncrypt;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
|
@@ -26,7 +26,7 @@ import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.common.base.model.entity.BaseDO;
|
||||
import top.continew.admin.system.enums.StorageTypeEnum;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
import top.continew.starter.encrypt.field.annotation.FieldEncrypt;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.net.URL;
|
||||
|
@@ -23,9 +23,9 @@ import lombok.Data;
|
||||
import top.continew.admin.common.base.model.entity.BaseDO;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.common.enums.GenderEnum;
|
||||
import top.continew.starter.encrypt.field.annotation.FieldEncrypt;
|
||||
import top.continew.starter.encrypt.password.encoder.encryptor.PasswordEncoderEncryptor;
|
||||
import top.continew.starter.extension.crud.annotation.DictModel;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
import top.continew.starter.security.crypto.enums.Algorithm;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -57,7 +57,7 @@ public class UserDO extends BaseDO {
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@FieldEncrypt(Algorithm.PASSWORD_ENCODER)
|
||||
@FieldEncrypt(encryptor = PasswordEncoderEncryptor.class)
|
||||
private String password;
|
||||
|
||||
/**
|
||||
|
@@ -44,6 +44,7 @@ public class ClientQuery implements Serializable {
|
||||
* 客户端类型
|
||||
*/
|
||||
@Schema(description = "客户端类型", example = "PC")
|
||||
@Query(type = QueryType.EQ)
|
||||
private String clientType;
|
||||
|
||||
/**
|
||||
@@ -57,5 +58,6 @@ public class ClientQuery implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description = "状态", example = "1")
|
||||
@Query(type = QueryType.EQ)
|
||||
private DisEnableStatusEnum status;
|
||||
}
|
@@ -49,5 +49,6 @@ public class DeptQuery implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description = "状态", example = "1")
|
||||
@Query(type = QueryType.EQ)
|
||||
private DisEnableStatusEnum status;
|
||||
}
|
||||
|
@@ -49,11 +49,13 @@ public class DictItemQuery implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description = "状态", example = "1")
|
||||
@Query(type = QueryType.EQ)
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
* 字典 ID
|
||||
*/
|
||||
@Schema(description = "字典 ID")
|
||||
@Query(type = QueryType.EQ)
|
||||
private Long dictId;
|
||||
}
|
@@ -49,11 +49,13 @@ public class FileQuery implements Serializable {
|
||||
* 上级目录
|
||||
*/
|
||||
@Schema(description = "上级目录", example = "/")
|
||||
@Query(type = QueryType.EQ)
|
||||
private String parentPath;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Schema(description = "类型", example = "2")
|
||||
@Query(type = QueryType.EQ)
|
||||
private FileTypeEnum type;
|
||||
}
|
@@ -52,6 +52,7 @@ public class MenuQuery implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description = "状态", example = "1")
|
||||
@Query(type = QueryType.EQ)
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
public MenuQuery(DisEnableStatusEnum status) {
|
||||
|
@@ -51,6 +51,7 @@ public class OptionQuery implements Serializable {
|
||||
* 类别
|
||||
*/
|
||||
@Schema(description = "类别", example = "SITE")
|
||||
@Query(type = QueryType.EQ)
|
||||
@EnumValue(value = OptionCategoryEnum.class, message = "类别无效")
|
||||
private String category;
|
||||
}
|
@@ -50,19 +50,20 @@ public class SmsConfigQuery implements Serializable {
|
||||
* 厂商
|
||||
*/
|
||||
@Schema(description = "厂商", example = "cloopen")
|
||||
@Query
|
||||
@Query(type = QueryType.EQ)
|
||||
private String supplier;
|
||||
|
||||
/**
|
||||
* Access Key
|
||||
*/
|
||||
@Schema(description = "Access Key", example = "7aaf0708674db3ee05676ecbc2f31b7b")
|
||||
@Query
|
||||
@Query(type = QueryType.EQ)
|
||||
private String accessKey;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description = "状态", example = "1")
|
||||
@Query(type = QueryType.EQ)
|
||||
private DisEnableStatusEnum status;
|
||||
}
|
@@ -20,6 +20,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.enums.SuccessFailureStatusEnum;
|
||||
import top.continew.starter.data.annotation.Query;
|
||||
import top.continew.starter.data.enums.QueryType;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@@ -42,20 +43,20 @@ public class SmsLogQuery implements Serializable {
|
||||
* 配置 ID
|
||||
*/
|
||||
@Schema(description = "配置 ID", example = "1")
|
||||
@Query
|
||||
@Query(type = QueryType.EQ)
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Schema(description = "手机号", example = "18888888888")
|
||||
@Query
|
||||
@Query(type = QueryType.EQ)
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 发送状态
|
||||
*/
|
||||
@Schema(description = "发送状态", example = "1")
|
||||
@Query
|
||||
@Query(type = QueryType.EQ)
|
||||
private SuccessFailureStatusEnum status;
|
||||
}
|
@@ -50,11 +50,13 @@ public class StorageQuery implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description = "状态", example = "1")
|
||||
@Query(type = QueryType.EQ)
|
||||
private DisEnableStatusEnum status;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Schema(description = "类型", example = "2")
|
||||
@Query(type = QueryType.EQ)
|
||||
private StorageTypeEnum type;
|
||||
}
|
@@ -36,7 +36,7 @@ import top.continew.admin.system.model.resp.DeptResp;
|
||||
import top.continew.admin.system.service.DeptService;
|
||||
import top.continew.starter.excel.converter.ExcelBaseEnumConverter;
|
||||
import top.continew.starter.excel.converter.ExcelListConverter;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
import top.continew.starter.encrypt.field.annotation.FieldEncrypt;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
@@ -290,7 +290,8 @@ public class FileServiceImpl extends BaseServiceImpl<FileMapper, FileDO, FileRes
|
||||
return;
|
||||
}
|
||||
// user/avatar/ => user、avatar
|
||||
String[] parentPathParts = StrUtil.split(parentPath, StringConstants.SLASH, false, true).toArray(String[]::new);
|
||||
String[] parentPathParts = StrUtil.split(parentPath, StringConstants.SLASH, false, true)
|
||||
.toArray(String[]::new);
|
||||
String lastPath = StringConstants.SLASH;
|
||||
StringBuilder currentPathBuilder = new StringBuilder();
|
||||
for (int i = 0; i < parentPathParts.length; i++) {
|
||||
|
@@ -80,10 +80,10 @@ import top.continew.starter.core.exception.BusinessException;
|
||||
import top.continew.starter.core.util.CollUtils;
|
||||
import top.continew.starter.core.util.FileUploadUtils;
|
||||
import top.continew.starter.core.util.validation.CheckUtils;
|
||||
import top.continew.starter.encrypt.field.util.EncryptHelper;
|
||||
import top.continew.starter.extension.crud.model.query.PageQuery;
|
||||
import top.continew.starter.extension.crud.model.query.SortQuery;
|
||||
import top.continew.starter.extension.crud.model.resp.PageResp;
|
||||
import top.continew.starter.security.crypto.util.EncryptHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
|
Reference in New Issue
Block a user