From a83b8e8fbc23ae37348e1c551a98ea9a54896bbc Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 30 Dec 2022 00:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +---- pom.xml | 4 ++-- yudao-dependencies/pom.xml | 7 +++++++ .../core/rule/dept/DeptDataPermissionRuleTest.java | 2 +- yudao-framework/yudao-spring-boot-starter-biz-ip/pom.xml | 1 - .../iocoder/yudao/framework/ip/core/utils/AreaUtils.java | 4 +++- .../src/test/resources/application-unit-test.yaml | 2 +- .../yudao/module/infra/service/file/FileServiceTest.java | 2 +- .../src/test/resources/application-unit-test.yaml | 2 +- yudao-module-mall/pom.xml | 5 +---- .../src/test/resources/application-unit-test.yaml | 2 +- .../src/test/resources/application-unit-test.yaml | 2 +- .../src/test/resources/application-unit-test.yaml | 2 +- .../src/test/resources/application-unit-test.yaml | 2 +- .../src/test/resources/application-unit-test.yaml | 2 +- .../yudao/module/system/service/dept/DeptServiceTest.java | 8 ++++++++ .../module/system/service/dict/DictDataServiceTest.java | 4 ++-- .../src/test/resources/application-unit-test.yaml | 2 +- yudao-ui-admin/src/views/mall/trade/order/detail.vue | 7 ++++--- yudao-ui-admin/src/views/mall/trade/order/index.vue | 3 ++- 20 files changed, 40 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 80b60d900..f85c3a1d9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -**严肃声明:现在、未来都不会有商业版本,所有功能全部开源!** - -**拒绝虚假开源,售卖商业版,程序员不骗程序员!!** +**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!** **「我喜欢写代码,乐此不疲」** **「我喜欢做开源,以此为乐」** @@ -181,7 +179,6 @@ ps:核心功能已经实现,正在对接微信小程序中... | `yudao-module-system` | 系统功能的 Module 模块 | | `yudao-module-member` | 会员中心的 Module 模块 | | `yudao-module-infra` | 基础设施的 Module 模块 | -| `yudao-module-tool` | 研发工具的 Module 模块 | | `yudao-module-bpm` | 工作流程的 Module 模块 | | `yudao-module-pay` | 支付系统的 Module 模块 | diff --git a/pom.xml b/pom.xml index 8f8f62990..3b1d56ef2 100644 --- a/pom.xml +++ b/pom.xml @@ -14,12 +14,12 @@ yudao-server yudao-module-member - yudao-module-bpm yudao-module-system yudao-module-infra yudao-module-pay - + yudao-module-visualization + yudao-example diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 78d3bcf34..277f9d347 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -56,6 +56,7 @@ 2.6.0 1.3.0 4.1.85.Final + 2.6.6 3.0.0 4.10.0 @@ -515,6 +516,12 @@ ${netty-all.version} + + org.lionsoul + ip2region + ${ip2region.version} + + com.squareup.okio diff --git a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/test/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRuleTest.java b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/test/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRuleTest.java index a50e2382f..2481b2acb 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/test/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRuleTest.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/test/java/cn/iocoder/yudao/framework/datapermission/core/rule/dept/DeptDataPermissionRuleTest.java @@ -227,7 +227,7 @@ class DeptDataPermissionRuleTest extends BaseMockitoUnitTest { // 调用 Expression expression = rule.getExpression(tableName, tableAlias); // 断言 - assertEquals("u.dept_id IN (10, 20) OR u.id = 1", expression.toString()); + assertEquals("(u.dept_id IN (10, 20) OR u.id = 1)", expression.toString()); assertSame(deptDataPermission, loginUser.getContext(DeptDataPermissionRule.CONTEXT_KEY, DeptDataPermissionRespDTO.class)); } } diff --git a/yudao-framework/yudao-spring-boot-starter-biz-ip/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-ip/pom.xml index f30ce1255..4ee1dc5b8 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-ip/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-ip/pom.xml @@ -34,7 +34,6 @@ org.lionsoul ip2region - ${ip2region.version} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java index c77f8be30..d3fe59a6c 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java @@ -28,7 +28,9 @@ public class AreaUtils { @SuppressWarnings("InstantiationOfUtilityClass") private final static AreaUtils INSTANCE = new AreaUtils(); - + /** + * Area 内存缓存,提升访问速度 + */ private static Map areas; private AreaUtils() { diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml index 25bfe0a62..1bbe0f530 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java index 2d4285bee..90bde8f4e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java @@ -79,7 +79,7 @@ public class FileServiceTest extends BaseDbUnitTest { FileClient client = mock(FileClient.class); when(fileConfigService.getMasterFileClient()).thenReturn(client); String url = randomString(); - when(client.upload(same(content), same(path), same("image/jpeg"))).thenReturn(url); + when(client.upload(same(content), same(path), eq("image/jpeg"))).thenReturn(url); when(client.getId()).thenReturn(10L); String name = "单测文件名"; // 调用 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml index 3a2079cdc..31e5ae5c9 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-module-mall/pom.xml b/yudao-module-mall/pom.xml index 4c362d526..37484f00c 100644 --- a/yudao-module-mall/pom.xml +++ b/yudao-module-mall/pom.xml @@ -15,18 +15,15 @@ ${project.artifactId} - 商城大模块,由 product 商品、promotion 营销、trade 交易 coupon等组成 + 商城大模块,由 product 商品、promotion 营销、trade 交易等组成 - - yudao-module-promotion-api yudao-module-promotion-biz yudao-module-product-api yudao-module-product-biz yudao-module-trade-api yudao-module-trade-biz - diff --git a/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml b/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml index 3a2079cdc..31e5ae5c9 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-mall/yudao-module-product-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml b/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml index 60914d97f..a384353aa 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-mall/yudao-module-promotion-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml b/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml index 113a0fee5..19dd0e97b 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-mall/yudao-module-trade-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml b/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml index 60914d97f..a384353aa 100644 --- a/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-member/yudao-module-member-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml b/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml index 60914d97f..a384353aa 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-pay/yudao-module-pay-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceTest.java index 6a140fc6c..e17187ad6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceTest.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.system.service.dept; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO; @@ -12,6 +13,7 @@ import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; import com.google.common.collect.Multimap; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; @@ -47,6 +49,12 @@ public class DeptServiceTest extends BaseDbUnitTest { @MockBean private DeptProducer deptProducer; + @BeforeEach + public void setUp() { + // 清理租户上下文 + TenantContextHolder.clear(); + } + @Test @SuppressWarnings("unchecked") void testInitLocalCache() { diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceTest.java index bf38bace1..02fba6c21 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictDataServiceTest.java @@ -57,7 +57,7 @@ public class DictDataServiceTest extends BaseDbUnitTest { // 准备参数 DictDataPageReqVO reqVO = new DictDataPageReqVO(); reqVO.setLabel("芋"); - reqVO.setDictType("yu"); + reqVO.setDictType("yunai"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 调用 @@ -86,7 +86,7 @@ public class DictDataServiceTest extends BaseDbUnitTest { // 准备参数 DictDataExportReqVO reqVO = new DictDataExportReqVO(); reqVO.setLabel("芋"); - reqVO.setDictType("yu"); + reqVO.setDictType("yunai"); reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 调用 diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml b/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml index 63ea5546d..460d4a250 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/application-unit-test.yaml @@ -9,7 +9,7 @@ spring: # 数据源配置项 datasource: name: ruoyi-vue-pro - url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 + url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式;DATABASE_TO_UPPER 配置表和字段使用小写 driver-class-name: org.h2.Driver username: sa password: diff --git a/yudao-ui-admin/src/views/mall/trade/order/detail.vue b/yudao-ui-admin/src/views/mall/trade/order/detail.vue index 013f2c31e..fe3e29604 100644 --- a/yudao-ui-admin/src/views/mall/trade/order/detail.vue +++ b/yudao-ui-admin/src/views/mall/trade/order/detail.vue @@ -58,7 +58,8 @@ @@ -79,7 +80,7 @@ - + ¥{{ (order.originalPrice / 100.0).toFixed(2) }} ¥{{ (order.deliveryPrice / 100.0).toFixed(2) }} ¥{{ (order.adjustPrice / 100.0).toFixed(2) }} @@ -92,7 +93,7 @@ ¥{{ (order.pointPrice / 100.0).toFixed(2) }} - + ¥{{ (order.payPrice / 100.0).toFixed(2) }} diff --git a/yudao-ui-admin/src/views/mall/trade/order/index.vue b/yudao-ui-admin/src/views/mall/trade/order/index.vue index ae9d59b30..619e27609 100644 --- a/yudao-ui-admin/src/views/mall/trade/order/index.vue +++ b/yudao-ui-admin/src/views/mall/trade/order/index.vue @@ -99,7 +99,8 @@ {{row.spuName}} - {{property.propertyName}}:{{property.valueName}} + + {{property.propertyName}}:{{property.valueName}}