mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 22:57:17 +08:00 
			
		
		
		
	chore: continew-starter 2.3.0 => 2.4.0
1.IBaseEnum => BaseEnum 2.移除 Jackson BaseEnum 配置(已迁移到 Starter 项目) 3.修复导出报错 4.接口文档枚举显示增强
This commit is contained in:
		| @@ -19,7 +19,7 @@ package top.continew.admin.system.enums; | ||||
| import cn.hutool.core.util.StrUtil; | ||||
| import lombok.Getter; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| import java.util.Arrays; | ||||
| import java.util.Collections; | ||||
| @@ -33,7 +33,7 @@ import java.util.List; | ||||
|  */ | ||||
| @Getter | ||||
| @RequiredArgsConstructor | ||||
| public enum FileTypeEnum implements IBaseEnum<Integer> { | ||||
| public enum FileTypeEnum implements BaseEnum<Integer> { | ||||
|  | ||||
|     /** | ||||
|      * 其他 | ||||
|   | ||||
| @@ -19,7 +19,7 @@ package top.continew.admin.system.enums; | ||||
| import cn.hutool.core.collection.CollUtil; | ||||
| import lombok.Getter; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| @@ -31,7 +31,7 @@ import java.util.List; | ||||
|  */ | ||||
| @Getter | ||||
| @RequiredArgsConstructor | ||||
| public enum ImportPolicyEnum implements IBaseEnum<Integer> { | ||||
| public enum ImportPolicyEnum implements BaseEnum<Integer> { | ||||
|  | ||||
|     /** | ||||
|      * 跳过该行 | ||||
|   | ||||
| @@ -18,7 +18,7 @@ package top.continew.admin.system.enums; | ||||
|  | ||||
| import lombok.Getter; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| /** | ||||
|  * 操作状态枚举 | ||||
| @@ -28,7 +28,7 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
|  */ | ||||
| @Getter | ||||
| @RequiredArgsConstructor | ||||
| public enum LogStatusEnum implements IBaseEnum<Integer> { | ||||
| public enum LogStatusEnum implements BaseEnum<Integer> { | ||||
|  | ||||
|     /** | ||||
|      * 成功 | ||||
|   | ||||
| @@ -19,7 +19,7 @@ package top.continew.admin.system.enums; | ||||
| import lombok.Getter; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import top.continew.admin.common.constant.UiConstants; | ||||
| import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| import java.time.LocalDateTime; | ||||
|  | ||||
| @@ -31,7 +31,7 @@ import java.time.LocalDateTime; | ||||
|  */ | ||||
| @Getter | ||||
| @RequiredArgsConstructor | ||||
| public enum NoticeStatusEnum implements IBaseEnum<Integer> { | ||||
| public enum NoticeStatusEnum implements BaseEnum<Integer> { | ||||
|  | ||||
|     /** | ||||
|      * 待发布 | ||||
|   | ||||
| @@ -18,7 +18,7 @@ package top.continew.admin.system.enums; | ||||
|  | ||||
| import lombok.Getter; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
|  | ||||
| /** | ||||
|  * 存储类型枚举 | ||||
| @@ -28,7 +28,7 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
|  */ | ||||
| @Getter | ||||
| @RequiredArgsConstructor | ||||
| public enum StorageTypeEnum implements IBaseEnum<Integer> { | ||||
| public enum StorageTypeEnum implements BaseEnum<Integer> { | ||||
|  | ||||
|     /** | ||||
|      * 兼容S3协议存储 | ||||
|   | ||||
| @@ -22,7 +22,7 @@ import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.continew.admin.common.enums.DisEnableStatusEnum; | ||||
| import top.continew.starter.extension.crud.annotation.TreeField; | ||||
| import top.continew.starter.extension.crud.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.extension.crud.model.resp.BaseDetailResp; | ||||
|  | ||||
| import java.io.Serial; | ||||
|   | ||||
| @@ -20,7 +20,7 @@ import com.alibaba.excel.annotation.ExcelProperty; | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.continew.admin.common.enums.DisEnableStatusEnum; | ||||
| import top.continew.starter.extension.crud.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.extension.crud.model.resp.BaseDetailResp; | ||||
|  | ||||
| import java.io.Serial; | ||||
|   | ||||
| @@ -25,7 +25,7 @@ import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.continew.admin.common.enums.DataScopeEnum; | ||||
| import top.continew.admin.system.service.RoleDeptService; | ||||
| import top.continew.starter.extension.crud.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.extension.crud.model.resp.BaseDetailResp; | ||||
|  | ||||
| import java.io.Serial; | ||||
|   | ||||
| @@ -31,7 +31,7 @@ import top.continew.admin.common.enums.DisEnableStatusEnum; | ||||
| import top.continew.admin.common.enums.GenderEnum; | ||||
| import top.continew.admin.common.util.helper.LoginHelper; | ||||
| import top.continew.admin.system.service.DeptService; | ||||
| import top.continew.starter.extension.crud.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.extension.crud.model.resp.BaseDetailResp; | ||||
| import top.continew.starter.file.excel.converter.ExcelListConverter; | ||||
| import top.continew.starter.security.crypto.annotation.FieldEncrypt; | ||||
|   | ||||
| @@ -21,7 +21,7 @@ import com.alibaba.excel.annotation.ExcelProperty; | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.continew.admin.system.enums.LogStatusEnum; | ||||
| import top.continew.starter.extension.crud.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -21,7 +21,7 @@ import com.alibaba.excel.annotation.ExcelProperty; | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.Data; | ||||
| import top.continew.admin.system.enums.LogStatusEnum; | ||||
| import top.continew.starter.extension.crud.converter.ExcelBaseEnumConverter; | ||||
| import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; | ||||
|  | ||||
| import java.io.Serial; | ||||
| import java.io.Serializable; | ||||
|   | ||||
| @@ -33,7 +33,7 @@ import top.continew.starter.cache.redisson.util.RedisUtils; | ||||
| import top.continew.starter.core.autoconfigure.project.ProjectProperties; | ||||
| import top.continew.starter.core.constant.StringConstants; | ||||
| import top.continew.starter.core.util.validate.CheckUtils; | ||||
| import top.continew.starter.data.mybatis.plus.base.IBaseEnum; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
| import top.continew.starter.extension.crud.model.resp.LabelValueResp; | ||||
| import top.continew.starter.extension.crud.service.impl.BaseServiceImpl; | ||||
|  | ||||
| @@ -106,7 +106,7 @@ public class DictItemServiceImpl extends BaseServiceImpl<DictItemMapper, DictIte | ||||
|     private List<LabelValueResp> toEnumDict(Class<?> enumClass) { | ||||
|         Object[] enumConstants = enumClass.getEnumConstants(); | ||||
|         return Arrays.stream(enumConstants).map(e -> { | ||||
|             IBaseEnum baseEnum = (IBaseEnum)e; | ||||
|             BaseEnum baseEnum = (BaseEnum)e; | ||||
|             return new LabelValueResp(baseEnum.getDescription(), baseEnum.getValue(), baseEnum.getColor()); | ||||
|         }).toList(); | ||||
|     } | ||||
| @@ -116,7 +116,7 @@ public class DictItemServiceImpl extends BaseServiceImpl<DictItemMapper, DictIte | ||||
|      */ | ||||
|     @PostConstruct | ||||
|     public void init() { | ||||
|         Set<Class<?>> classSet = ClassUtil.scanPackageBySuper(projectProperties.getBasePackage(), IBaseEnum.class); | ||||
|         Set<Class<?>> classSet = ClassUtil.scanPackageBySuper(projectProperties.getBasePackage(), BaseEnum.class); | ||||
|         ENUM_DICT_CACHE.putAll(classSet.stream() | ||||
|             .collect(Collectors.toMap(cls -> StrUtil.toUnderlineCase(cls.getSimpleName()) | ||||
|                 .toLowerCase(), this::toEnumDict))); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user