diff --git a/yudao-framework/pom.xml b/yudao-framework/pom.xml index e13419176..e5ad00428 100644 --- a/yudao-framework/pom.xml +++ b/yudao-framework/pom.xml @@ -25,7 +25,6 @@ yudao-spring-boot-starter-excel yudao-spring-boot-starter-test - yudao-spring-boot-starter-biz-operatelog yudao-spring-boot-starter-biz-dict diff --git a/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/core/service/DictDataFrameworkService.java b/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/core/service/DictDataFrameworkService.java index 6ff51c33e..870f63a55 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/core/service/DictDataFrameworkService.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-dict/src/main/java/cn/iocoder/yudao/framework/dict/core/service/DictDataFrameworkService.java @@ -24,12 +24,4 @@ public interface DictDataFrameworkService { */ DictDataRespDTO parseDictDataFromCache(String type, String label); - /** - * 获得指定类型的字典数据,从缓存中 - * - * @param type 字典类型 - * @return 字典数据列表 - */ - List listDictDatasFromCache(String type); - } diff --git a/yudao-framework/yudao-spring-boot-starter-extension/pom.xml b/yudao-framework/yudao-spring-boot-starter-extension/pom.xml deleted file mode 100644 index 5791975f9..000000000 --- a/yudao-framework/yudao-spring-boot-starter-extension/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - yudao-framework - cn.iocoder.cloud - ${revision} - - 4.0.0 - - yudao-spring-boot-starter-extension - jar - - ${project.artifactId} - 扩展点组件 - https://github.com/YunaiV/ruoyi-vue-pro - - - - - - - - cn.iocoder.cloud - yudao-common - - - - - org.springframework - spring-context - provided - - - - org.springframework - spring-beans - provided - - - - - org.springframework.boot - spring-boot-starter-aop - - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - junit - junit - test - - - - - jakarta.validation - jakarta.validation-api - - - diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/config/YudaoExtensionAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/config/YudaoExtensionAutoConfiguration.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/BusinessScenario.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/BusinessScenario.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/ExtensionBootstrap.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/ExtensionBootstrap.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/AbstractComponentExecutor.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/AbstractComponentExecutor.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/ExtensionContext.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/ExtensionContext.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/ExtensionContextHolder.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/ExtensionContextHolder.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/ExtensionExecutor.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/context/ExtensionExecutor.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/factory/ExtensionDefinition.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/factory/ExtensionDefinition.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/factory/ExtensionFactory.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/factory/ExtensionFactory.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/factory/ExtensionRegisterFactory.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/factory/ExtensionRegisterFactory.java deleted file mode 100644 index 15b802436..000000000 --- a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/factory/ExtensionRegisterFactory.java +++ /dev/null @@ -1,86 +0,0 @@ -package cn.iocoder.yudao.framework.extension.core.factory; - -import cn.iocoder.yudao.framework.extension.core.BusinessScenario; -import cn.iocoder.yudao.framework.extension.core.point.ExtensionPoint; -import cn.iocoder.yudao.framework.extension.core.stereotype.Extension; -import lombok.extern.slf4j.Slf4j; -import org.springframework.aop.support.AopUtils; -import org.springframework.context.ApplicationContext; -import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.stereotype.Component; -import org.springframework.util.ClassUtils; - -import javax.validation.constraints.NotNull; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * @description 注册工厂 - * @author Qingchen - * @version 1.0.0 - * @date 2021-08-28 23:07 - * @class cn.iocoder.yudao.framework.extension.core.factory.ExtensionRegisterFactory.java - */ -@Component -@Slf4j -public class ExtensionRegisterFactory implements ExtensionFactory { - - /** - * spring ApplicationContext - */ - private ApplicationContext applicationContext; - - /** - * 扩展点实现类集合 - */ - private Map registerExtensionBeans = new ConcurrentHashMap<>(); - - @Override - public void register(String basePackage) { - final Map beans = applicationContext.getBeansWithAnnotation(Extension.class); - if(beans == null || beans.isEmpty()) { - return; - } - - beans.values().forEach(point -> doRegister((ExtensionPoint) point)); - log.info("业务场景相关扩展点注册完成,注册数量: {}", registerExtensionBeans.size()); - } - - @Override - public T get(BusinessScenario businessScenario, Class clazz) { - - final ExtensionDefinition definition = registerExtensionBeans.get(businessScenario.getUniqueIdentity()); - if(definition == null) { - log.error("获取业务场景扩展点实现失败,失败原因:尚未定义该业务场景相关扩展点。{}", businessScenario); - throw new RuntimeException("尚未定义该业务场景相关扩展点 [" + businessScenario + "]"); - } - - return (T) definition.getExtensionPoint(); - } - - /** - * 注册扩展点 - * @param point - */ - private void doRegister(@NotNull ExtensionPoint point) { - Class extensionClazz = point.getClass(); - - if (AopUtils.isAopProxy(point)) { - extensionClazz = ClassUtils.getUserClass(point); - } - - Extension extension = AnnotationUtils.findAnnotation(extensionClazz, Extension.class); - final BusinessScenario businessScenario = BusinessScenario.valueOf(extension.businessId(), extension.useCase(), extension.scenario()); - final ExtensionDefinition definition = ExtensionDefinition.valueOf(businessScenario, point); - final ExtensionDefinition exist = registerExtensionBeans.get(businessScenario.getUniqueIdentity()); - if(exist != null && !exist.equals(definition)) { - throw new RuntimeException("相同的业务场景重复注册了不同类型的扩展点实现 :【" + definition + "】【" + exist + "】"); - } - - registerExtensionBeans.put(businessScenario.getUniqueIdentity(), definition); - } - - public void setApplicationContext(ApplicationContext applicationContext) { - this.applicationContext = applicationContext; - } -} diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/package-info.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/package-info.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/point/ExtensionPoint.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/point/ExtensionPoint.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/stereotype/Extension.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/stereotype/Extension.java deleted file mode 100644 index eaa9f99f8..000000000 --- a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/core/stereotype/Extension.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.iocoder.yudao.framework.extension.core.stereotype; - -import cn.iocoder.yudao.framework.extension.core.BusinessScenario; -import org.springframework.stereotype.Component; - -import java.lang.annotation.*; - -/** - * @description 表示带注释的类是“扩展组件” - * @author Qingchen - * @version 1.0.0 - * @date 2021-08-28 21:59 - * @class cn.iocoder.yudao.framework.extension.core.stereotype.Extension.java - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -@Component -public @interface Extension { - - /** - * 业务
- * 一个自负盈亏的财务主体,比如tmall、淘宝和零售通就是三个不同的业务 - * @return - */ - String businessId() default BusinessScenario.DEFAULT_BUSINESS_ID; - - /** - * 用例
- * 描述了用户和系统之间的互动,每个用例提供了一个或多个场景。比如,支付订单就是一个典型的用例。 - * @return - */ - String useCase() default BusinessScenario.DEFAULT_USECASE; - - /** - * 场景
- * 场景也被称为用例的实例(Instance),包括用例所有的可能情况(正常的和异常的)。比如对于"订单支付"这个用例,就有“支付宝支付”、“银行卡支付”、"微信支付"等多个场景 - * @return - */ - String scenario() default BusinessScenario.DEFAULT_SCENARIO; -} diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/package-info.java b/yudao-framework/yudao-spring-boot-starter-extension/src/main/java/cn/iocoder/yudao/framework/extension/package-info.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/main/resources/META-INF/spring.factories b/yudao-framework/yudao-spring-boot-starter-extension/src/main/resources/META-INF/spring.factories deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/Application.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/Application.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/ExtensionTest.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/ExtensionTest.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/package-info.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/package-info.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/PayExtensionPoint.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/PayExtensionPoint.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/command/TransactionsCommand.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/command/TransactionsCommand.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/domain/TransactionsResult.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/domain/TransactionsResult.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/impl/AlipayService.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/impl/AlipayService.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/impl/WechatPayService.java b/yudao-framework/yudao-spring-boot-starter-extension/src/test/java/cn/iocoder/yudao/framework/extension/pay/impl/WechatPayService.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-framework/yudao-spring-boot-starter-extension/《芋道 Spring Boot 扩展点组件》.md b/yudao-framework/yudao-spring-boot-starter-extension/《芋道 Spring Boot 扩展点组件》.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java index 9c38a368b..3dc21d932 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceImpl.java @@ -163,11 +163,6 @@ public class DictDataServiceImpl implements DictDataService { return DictDataConvert.INSTANCE.convert02(labelDictDataCache.get(type, label)); } - @Override - public List listDictDatasFromCache(String type) { - return DictDataConvert.INSTANCE.convertList03(labelDictDataCache.row(type).values()); - } - @Override public Long createDictData(DictDataCreateReqVO reqVO) { // 校验正确性