diff --git a/boot-admin/pom.xml b/boot-admin/pom.xml index 4c2c4d7..5dda393 100644 --- a/boot-admin/pom.xml +++ b/boot-admin/pom.xml @@ -34,12 +34,6 @@ boot-generator - - - de.codecentric - spring-boot-admin-starter-client - - org.springframework.boot spring-boot-starter-test diff --git a/boot-admin/src/main/resources/application-dev.yml b/boot-admin/src/main/resources/application-dev.yml index 0b26217..9977535 100644 --- a/boot-admin/src/main/resources/application-dev.yml +++ b/boot-admin/src/main/resources/application-dev.yml @@ -65,7 +65,7 @@ spring.data: # 数据库索引 database: 0 # redis 密码必须配置 - password: boot123 + password: 123456 # 连接超时时间 timeout: 10s # 是否开启ssl diff --git a/boot-admin/src/main/resources/application-prod.yml b/boot-admin/src/main/resources/application-prod.yml index 2edca6b..cebd59a 100644 --- a/boot-admin/src/main/resources/application-prod.yml +++ b/boot-admin/src/main/resources/application-prod.yml @@ -43,24 +43,6 @@ spring: # url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # username: # password: -# oracle: -# type: ${spring.datasource.type} -# driverClassName: oracle.jdbc.OracleDriver -# url: jdbc:oracle:thin:@//localhost:1521/XE -# username: ROOT -# password: root -# postgres: -# type: ${spring.datasource.type} -# driverClassName: org.postgresql.Driver -# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true -# username: root -# password: root -# sqlserver: -# type: ${spring.datasource.type} -# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver -# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true -# username: SA -# password: root hikari: # 最大连接池数量 maxPoolSize: 20 diff --git a/boot-admin/src/main/resources/application.yml b/boot-admin/src/main/resources/application.yml index cccc43f..b0badc1 100644 --- a/boot-admin/src/main/resources/application.yml +++ b/boot-admin/src/main/resources/application.yml @@ -163,7 +163,7 @@ springdoc: enabled: true info: # 标题 - title: '标题:boot-Vue-Plus多租户管理系统_接口文档' + title: '标题:boot-base接口文档' # 描述 description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...' # 版本 @@ -184,14 +184,10 @@ springdoc: group-configs: - group: 1.演示模块 packages-to-scan: com.base.demo - - group: 2.通用模块 - packages-to-scan: com.base.web - group: 3.系统模块 packages-to-scan: com.base.system - group: 4.代码生成模块 packages-to-scan: com.base.generator - - group: 5.工作流模块 - packages-to-scan: com.base.workflow # 防止XSS攻击 xss: @@ -218,18 +214,6 @@ lock4j: # 分布式锁的超时时间,默认为 30 秒 expire: 30000 ---- # Actuator 监控端点的配置项 -management: - endpoints: - web: - exposure: - include: '*' - endpoint: - health: - show-details: ALWAYS - logfile: - external-file: ./logs/sys-console.log - --- # 默认/推荐使用sse推送 sse: enabled: true @@ -243,20 +227,3 @@ websocket: path: /resource/websocket # 设置访问源地址 allowedOrigins: '*' - ---- # warm-flow工作流配置 -warm-flow: - # 是否开启工作流,默认true - enabled: true - # 是否开启设计器ui - ui: true - # 默认Authorization,如果有多个token,用逗号分隔 - token-name: ${sa-token.token-name},clientid - # 流程状态对应的三元色 - chart-status-color: - ## 未办理 - - 62,62,62 - ## 待办理 - - 255,205,23 - ## 已办理 - - 157,255,0 diff --git a/boot-admin/src/main/resources/banner.txt b/boot-admin/src/main/resources/banner.txt index 21b1126..1a0b58f 100644 --- a/boot-admin/src/main/resources/banner.txt +++ b/boot-admin/src/main/resources/banner.txt @@ -1,8 +1,2 @@ Application Version: ${revision} Spring Boot Version: ${spring-boot.version} -__________ _____.___.__ ____ ____ __________.__ -\______ \__ __ ____\__ | |__| \ \ / /_ __ ____ \______ \ | __ __ ______ - | _/ | \/ _ \/ | | | ______ \ Y / | \_/ __ \ ______ | ___/ | | | \/ ___/ - | | \ | ( <_> )____ | | /_____/ \ /| | /\ ___/ /_____/ | | | |_| | /\___ \ - |____|_ /____/ \____// ______|__| \___/ |____/ \___ > |____| |____/____//____ > - \/ \/ \/ \/ diff --git a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/annotation/Translation.java b/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/annotation/Translation.java deleted file mode 100644 index 6036723..0000000 --- a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/annotation/Translation.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.base.common.framework.web.annotation; - -import com.base.common.framework.web.handler.TranslationHandler; -import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; - -import java.lang.annotation.*; - -/** - * 通用翻译注解 - * - * @author Lion Li - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD, ElementType.METHOD}) -@Documented -@JacksonAnnotationsInside -@JsonSerialize(using = TranslationHandler.class) -public @interface Translation { - - /** - * 类型 (需与实现类上的 {@link TranslationType} 注解type对应) - *

- * 默认取当前字段的值 如果设置了 @{@link Translation#mapper()} 则取映射字段的值 - */ - String type(); - - /** - * 映射字段 (如果不为空则取此字段的值) - */ - String mapper() default ""; - - /** - * 其他条件 例如: 字典type(sys_user_sex) - */ - String other() default ""; - -} diff --git a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/annotation/TranslationType.java b/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/annotation/TranslationType.java deleted file mode 100644 index 9c0abb4..0000000 --- a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/annotation/TranslationType.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.base.common.framework.web.annotation; - - -import com.base.common.framework.web.handler.impl.TranslationInterface; - -import java.lang.annotation.*; - -/** - * 翻译类型注解 (标注到{@link TranslationInterface} 的实现类) - * - * @author Lion Li - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -@Documented -public @interface TranslationType { - - /** - * 类型 - */ - String type(); - -} diff --git a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/config/TranslationConfig.java b/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/config/TranslationConfig.java deleted file mode 100644 index 43bb00d..0000000 --- a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/config/TranslationConfig.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.base.common.framework.web.config; - -import com.base.common.framework.web.annotation.TranslationType; -import com.base.common.framework.web.handler.TranslationBeanSerializerModifier; -import com.base.common.framework.web.handler.TranslationHandler; -import com.base.common.framework.web.handler.impl.TranslationInterface; -import com.fasterxml.jackson.databind.ObjectMapper; -import jakarta.annotation.PostConstruct; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfiguration; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 翻译模块配置类 - * - * @author Lion Li - */ -@Slf4j -@AutoConfiguration -public class TranslationConfig { - - @Autowired - private List> list; - - @Autowired - private ObjectMapper objectMapper; - - @PostConstruct - public void init() { - Map> map = new HashMap<>(list.size()); - for (TranslationInterface trans : list) { - if (trans.getClass().isAnnotationPresent(TranslationType.class)) { - TranslationType annotation = trans.getClass().getAnnotation(TranslationType.class); - map.put(annotation.type(), trans); - } else { - log.warn(trans.getClass().getName() + " 翻译实现类未标注 TranslationType 注解!"); - } - } - TranslationHandler.TRANSLATION_MAPPER.putAll(map); - // 设置 Bean 序列化修改器 - objectMapper.setSerializerFactory( - objectMapper.getSerializerFactory() - .withSerializerModifier(new TranslationBeanSerializerModifier())); - } - -} diff --git a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/constant/TransConstant.java b/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/constant/TransConstant.java deleted file mode 100644 index 7e97b33..0000000 --- a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/constant/TransConstant.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.base.common.framework.web.constant; - -/** - * 翻译常量 - * - * @author Lion Li - */ -public interface TransConstant { - - /** - * 用户id转账号 - */ - String USER_ID_TO_NAME = "user_id_to_name"; - - /** - * 用户id转用户名称 - */ - String USER_ID_TO_NICKNAME = "user_id_to_nickname"; - - /** - * 部门id转名称 - */ - String DEPT_ID_TO_NAME = "dept_id_to_name"; - - /** - * 字典type转label - */ - String DICT_TYPE_TO_LABEL = "dict_type_to_label"; - - /** - * ossId转url - */ - String OSS_ID_TO_URL = "oss_id_to_url"; - -} diff --git a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/TranslationBeanSerializerModifier.java b/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/TranslationBeanSerializerModifier.java deleted file mode 100644 index 85f49a1..0000000 --- a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/TranslationBeanSerializerModifier.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.base.common.framework.web.handler; - -import com.fasterxml.jackson.databind.BeanDescription; -import com.fasterxml.jackson.databind.SerializationConfig; -import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; -import com.fasterxml.jackson.databind.ser.BeanSerializerModifier; - -import java.util.List; - -/** - * Bean 序列化修改器 解决 Null 被单独处理问题 - * - * @author Lion Li - */ -public class TranslationBeanSerializerModifier extends BeanSerializerModifier { - - @Override - public List changeProperties(SerializationConfig config, BeanDescription beanDesc, - List beanProperties) { - for (BeanPropertyWriter writer : beanProperties) { - // 如果序列化器为 TranslationHandler 的话 将 Null 值也交给他处理 - if (writer.getSerializer() instanceof TranslationHandler serializer) { - writer.assignNullSerializer(serializer); - } - } - return beanProperties; - } - -} diff --git a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/TranslationHandler.java b/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/TranslationHandler.java deleted file mode 100644 index ac1787c..0000000 --- a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/TranslationHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.base.common.framework.web.handler; - -import cn.hutool.core.util.ObjectUtil; -import com.base.common.core.utils.StringUtils; -import com.base.common.core.utils.reflect.ReflectUtils; -import com.base.common.framework.web.annotation.Translation; -import com.base.common.framework.web.handler.impl.TranslationInterface; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.BeanProperty; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.ser.ContextualSerializer; -import lombok.extern.slf4j.Slf4j; - -import java.io.IOException; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.ConcurrentHashMap; - -/** - * 翻译处理器 - * - * @author Lion Li - */ -@Slf4j -public class TranslationHandler extends JsonSerializer implements ContextualSerializer { - - /** - * 全局翻译实现类映射器 - */ - public static final Map> TRANSLATION_MAPPER = new ConcurrentHashMap<>(); - - private Translation translation; - - @Override - public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException { - TranslationInterface trans = TRANSLATION_MAPPER.get(translation.type()); - if (ObjectUtil.isNotNull(trans)) { - // 如果映射字段不为空 则取映射字段的值 - if (StringUtils.isNotBlank(translation.mapper())) { - value = ReflectUtils.invokeGetter(gen.currentValue(), translation.mapper()); - } - // 如果为 null 直接写出 - if (ObjectUtil.isNull(value)) { - gen.writeNull(); - return; - } - Object result = trans.translation(value, translation.other()); - gen.writeObject(result); - } else { - gen.writeObject(value); - } - } - - @Override - public JsonSerializer createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException { - Translation translation = property.getAnnotation(Translation.class); - if (Objects.nonNull(translation)) { - this.translation = translation; - return this; - } - return prov.findValueSerializer(property.getType(), property); - } -} diff --git a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/impl/TranslationInterface.java b/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/impl/TranslationInterface.java deleted file mode 100644 index d5c8884..0000000 --- a/boot-common/boot-common-framework/src/main/java/com/base/common/framework/web/handler/impl/TranslationInterface.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.base.common.framework.web.handler.impl; - - -import com.base.common.framework.web.annotation.TranslationType; - -/** - * 翻译接口 (实现类需标注 {@link TranslationType} 注解标明翻译类型) - * - * @author Lion Li - */ -public interface TranslationInterface { - - /** - * 翻译 - * - * @param key 需要被翻译的键(不为空) - * @param other 其他参数 - * @return 返回键对应的值 - */ - T translation(Object key, String other); -} diff --git a/boot-common/boot-common-framework/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/boot-common/boot-common-framework/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index ad3b98c..5d4c774 100644 --- a/boot-common/boot-common-framework/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/boot-common/boot-common-framework/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -14,4 +14,3 @@ com.base.common.framework.web.config.UndertowConfig com.base.common.framework.web.config.JacksonConfig com.base.common.framework.web.config.IdempotentConfig com.base.common.framework.web.config.RateLimiterConfig -com.base.common.framework.web.config.TranslationConfig \ No newline at end of file diff --git a/boot-modules/boot-demo/src/main/java/com/base/demo/domain/vo/TestDemoVo.java b/boot-modules/boot-demo/src/main/java/com/base/demo/domain/vo/TestDemoVo.java index 8a06f36..e0ee287 100644 --- a/boot-modules/boot-demo/src/main/java/com/base/demo/domain/vo/TestDemoVo.java +++ b/boot-modules/boot-demo/src/main/java/com/base/demo/domain/vo/TestDemoVo.java @@ -4,8 +4,6 @@ import cn.idev.excel.annotation.ExcelIgnoreUnannotated; import cn.idev.excel.annotation.ExcelProperty; import com.base.common.framework.excel.annotation.ExcelNotation; import com.base.common.framework.excel.annotation.ExcelRequired; -import com.base.common.framework.web.annotation.Translation; -import com.base.common.framework.web.constant.TransConstant; import com.base.demo.domain.TestDemo; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; @@ -85,7 +83,6 @@ public class TestDemoVo implements Serializable { /** * 创建人账号 */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy") @ExcelProperty(value = "创建人账号") private String createByName; @@ -104,7 +101,6 @@ public class TestDemoVo implements Serializable { /** * 更新人账号 */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "updateBy") @ExcelProperty(value = "更新人账号") private String updateByName; diff --git a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysNoticeVo.java b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysNoticeVo.java index 9cf190c..196dc76 100644 --- a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysNoticeVo.java +++ b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysNoticeVo.java @@ -1,7 +1,5 @@ package com.base.system.domain.vo; -import com.base.common.framework.web.annotation.Translation; -import com.base.common.framework.web.constant.TransConstant; import com.base.system.domain.SysNotice; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; @@ -62,7 +60,6 @@ public class SysNoticeVo implements Serializable { /** * 创建人名称 */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy") private String createByName; /** diff --git a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysOssVo.java b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysOssVo.java index 052abf5..51f954c 100644 --- a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysOssVo.java +++ b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysOssVo.java @@ -1,7 +1,5 @@ package com.base.system.domain.vo; -import com.base.common.framework.web.annotation.Translation; -import com.base.common.framework.web.constant.TransConstant; import com.base.system.domain.SysOss; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; @@ -65,7 +63,6 @@ public class SysOssVo implements Serializable { /** * 上传人名称 */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy") private String createByName; /** diff --git a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysPostVo.java b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysPostVo.java index ba611a6..ca51dec 100644 --- a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysPostVo.java +++ b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysPostVo.java @@ -4,8 +4,6 @@ import cn.idev.excel.annotation.ExcelIgnoreUnannotated; import cn.idev.excel.annotation.ExcelProperty; import com.base.common.framework.excel.annotation.ExcelDictFormat; import com.base.common.framework.excel.convert.ExcelDictConvert; -import com.base.common.framework.web.annotation.Translation; -import com.base.common.framework.web.constant.TransConstant; import com.base.system.domain.SysPost; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; @@ -85,7 +83,6 @@ public class SysPostVo implements Serializable { /** * 部门名 */ - @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "deptId") private String deptName; } diff --git a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysUserVo.java b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysUserVo.java index beca64e..f190bc4 100644 --- a/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysUserVo.java +++ b/boot-modules/boot-system/src/main/java/com/base/system/domain/vo/SysUserVo.java @@ -1,8 +1,6 @@ package com.base.system.domain.vo; import com.base.common.framework.web.annotation.Sensitive; -import com.base.common.framework.web.annotation.Translation; -import com.base.common.framework.web.constant.TransConstant; import com.base.common.framework.web.core.SensitiveStrategy; import com.base.system.domain.SysUser; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -73,7 +71,6 @@ public class SysUserVo implements Serializable { /** * 头像地址 */ - @Translation(type = TransConstant.OSS_ID_TO_URL) private Long avatar; /** @@ -111,7 +108,6 @@ public class SysUserVo implements Serializable { /** * 部门名 */ - @Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "deptId") private String deptName; /** diff --git a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/DeptNameTranslationImpl.java b/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/DeptNameTranslationImpl.java deleted file mode 100644 index 2f28c15..0000000 --- a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/DeptNameTranslationImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.base.system.service.impl.translation; - -import com.base.common.core.service.DeptService; -import com.base.common.framework.web.annotation.TranslationType; -import com.base.common.framework.web.constant.TransConstant; -import com.base.common.framework.web.handler.impl.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * 部门翻译实现 - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.DEPT_ID_TO_NAME) -public class DeptNameTranslationImpl implements TranslationInterface { - - private final DeptService deptService; - - @Override - public String translation(Object key, String other) { - if (key instanceof String ids) { - return deptService.selectDeptNameByIds(ids); - } else if (key instanceof Long id) { - return deptService.selectDeptNameByIds(id.toString()); - } - return null; - } -} diff --git a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/DictTypeTranslationImpl.java b/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/DictTypeTranslationImpl.java deleted file mode 100644 index 7131c8e..0000000 --- a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/DictTypeTranslationImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.base.system.service.impl.translation; - -import com.base.common.core.service.DictService; -import com.base.common.core.utils.StringUtils; -import com.base.common.framework.web.annotation.TranslationType; -import com.base.common.framework.web.constant.TransConstant; -import com.base.common.framework.web.handler.impl.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * 字典翻译实现 - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.DICT_TYPE_TO_LABEL) -public class DictTypeTranslationImpl implements TranslationInterface { - - private final DictService dictService; - - @Override - public String translation(Object key, String other) { - if (key instanceof String dictValue && StringUtils.isNotBlank(other)) { - return dictService.getDictLabel(other, dictValue); - } - return null; - } -} diff --git a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/NicknameTranslationImpl.java b/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/NicknameTranslationImpl.java deleted file mode 100644 index c56bdca..0000000 --- a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/NicknameTranslationImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.base.system.service.impl.translation; - -import com.base.common.core.service.UserService; -import com.base.common.framework.web.annotation.TranslationType; -import com.base.common.framework.web.constant.TransConstant; -import com.base.common.framework.web.handler.impl.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * 用户名称翻译实现 - * - * @author may - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.USER_ID_TO_NICKNAME) -public class NicknameTranslationImpl implements TranslationInterface { - - private final UserService userService; - - @Override - public String translation(Object key, String other) { - if (key instanceof Long id) { - return userService.selectNicknameByIds(id.toString()); - } else if (key instanceof String ids) { - return userService.selectNicknameByIds(ids); - } - return null; - } -} diff --git a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/OssUrlTranslationImpl.java b/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/OssUrlTranslationImpl.java deleted file mode 100644 index 0a1b885..0000000 --- a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/OssUrlTranslationImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.base.system.service.impl.translation; - -import com.base.common.core.service.OssService; -import com.base.common.framework.web.annotation.TranslationType; -import com.base.common.framework.web.constant.TransConstant; -import com.base.common.framework.web.handler.impl.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * OSS翻译实现 - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.OSS_ID_TO_URL) -public class OssUrlTranslationImpl implements TranslationInterface { - - private final OssService ossService; - - @Override - public String translation(Object key, String other) { - if (key instanceof String ids) { - return ossService.selectUrlByIds(ids); - } else if (key instanceof Long id) { - return ossService.selectUrlByIds(id.toString()); - } - return null; - } -} diff --git a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/UserNameTranslationImpl.java b/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/UserNameTranslationImpl.java deleted file mode 100644 index e00536f..0000000 --- a/boot-modules/boot-system/src/main/java/com/base/system/service/impl/translation/UserNameTranslationImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.base.system.service.impl.translation; - -import com.base.common.core.service.UserService; -import com.base.common.framework.web.annotation.TranslationType; -import com.base.common.framework.web.constant.TransConstant; -import com.base.common.framework.web.handler.impl.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * 用户名翻译实现 - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.USER_ID_TO_NAME) -public class UserNameTranslationImpl implements TranslationInterface { - - private final UserService userService; - - @Override - public String translation(Object key, String other) { - if (key instanceof Long id) { - return userService.selectUserNameById(id); - } - return null; - } -} diff --git a/pom.xml b/pom.xml index aea78c8..8096942 100644 --- a/pom.xml +++ b/pom.xml @@ -254,17 +254,6 @@ ${sms4j.version} - - de.codecentric - spring-boot-admin-starter-server - ${spring-boot-admin.version} - - - de.codecentric - spring-boot-admin-starter-client - ${spring-boot-admin.version} - - org.redisson