From c54b330cdf636f635bb638edf54bfa25766291d3 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 17 Oct 2022 20:44:30 +0800 Subject: [PATCH] =?UTF-8?q?!271=20=E5=8D=87=E7=BA=A7=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E5=8F=8A=20vue3=E9=83=A8=E5=88=86=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 +- yudao-dependencies/pom.xml | 44 +++++++++---------- .../framework/common/enums/DocumentEnum.java | 5 ++- .../core/context/TenantContextHolder.java | 4 +- .../excel/core/convert/DictConvert.java | 17 +++---- .../excel/core/convert/JsonConvert.java | 13 ++---- .../core/DefaultLockFailureStrategy.java | 7 +-- .../yudao-spring-boot-starter-redis/pom.xml | 1 - .../convert/message/BpmMessageConvert.java | 6 ++- 9 files changed, 52 insertions(+), 49 deletions(-) diff --git a/pom.xml b/pom.xml index e5986837e..046585f27 100644 --- a/pom.xml +++ b/pom.xml @@ -32,8 +32,8 @@ 3.0.0-M5 3.8.0 - 1.18.20 - 1.4.1.Final + 1.18.24 + 1.5.2.Final UTF-8 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 1bac18123..1ae17d7e6 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -16,19 +16,19 @@ 1.6.2-snapshot - 2.6.9 + 2.6.12 2021.0.1 2021.0.1.0 3.0.3 - 1.6.6 + 1.6.7 2.5 - 1.2.11 - 3.4.3.4 + 1.2.13 + 3.5.2 3.5.2 - 3.5.0 - 3.17.3 + 3.5.2 + 3.17.7 2.7.15 @@ -36,38 +36,38 @@ 2.3.1 - 2.2.0 + 2.2.2 1.7.1 - 8.7.0 - 2.6.7 - 0.31.0 + 8.12.0 + 2.6.9 + 0.33.0 - 7.2.6.RELEASE - 0.1.16 - 4.0.0 + 7.2.9.RELEASE + 1.0.4 + 4.8.0 6.7.2 3.0.4 - 1.18.20 - 1.4.1.Final - 5.8.5 - 2.2.7 + 1.18.24 + 1.5.2.Final + 5.8.8 + 3.1.1 2.3 1.0.5 - 2.0.5 + 1.2.83 30.1.1-jre 5.1.0 - 2.12.2 + 2.14.0 3.8.0 0.1.55 - 2.4.1 + 2.5.0 1.3.0 - 4.1.75.Final + 4.1.82.Final 8.2.2 - 4.6.0 + 4.6.2 2.2.1 3.1.561 1.2.7 diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DocumentEnum.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DocumentEnum.java index b304462e5..0d2c64c8b 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DocumentEnum.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/DocumentEnum.java @@ -12,8 +12,9 @@ import lombok.Getter; @AllArgsConstructor public enum DocumentEnum { - REDIS_INSTALL("https://gitee.com/zhijiantianya/ruoyi-vue-pro/issues/I4VCSJ", "Redis 安装文档"); - + REDIS_INSTALL("https://gitee.com/zhijiantianya/ruoyi-vue-pro/issues/I4VCSJ", "Redis 安装文档"), + TENANT("https://doc.iocoder.cn", "SaaS 多租户文档"); + private final String url; private final String memo; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java index a42acc41c..3b15398d6 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/context/TenantContextHolder.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.tenant.core.context; +import cn.iocoder.yudao.framework.common.enums.DocumentEnum; import com.alibaba.ttl.TransmittableThreadLocal; /** @@ -36,7 +37,8 @@ public class TenantContextHolder { public static Long getRequiredTenantId() { Long tenantId = getTenantId(); if (tenantId == null) { - throw new NullPointerException("TenantContextHolder 不存在租户编号"); // TODO 芋艿:增加文档链接 + throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:" + + DocumentEnum.TENANT.getUrl()); } return tenantId; } diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/DictConvert.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/DictConvert.java index 7698cf4a6..182c83a72 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/DictConvert.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/DictConvert.java @@ -5,8 +5,9 @@ import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import com.alibaba.excel.converters.Converter; import com.alibaba.excel.enums.CellDataTypeEnum; -import com.alibaba.excel.metadata.CellData; import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.data.ReadCellData; +import com.alibaba.excel.metadata.data.WriteCellData; import com.alibaba.excel.metadata.property.ExcelContentProperty; import lombok.extern.slf4j.Slf4j; @@ -29,11 +30,11 @@ public class DictConvert implements Converter { } @Override - public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + public Object convertToJavaData(ReadCellData readCellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { // 使用字典解析 String type = getType(contentProperty); - String label = cellData.getStringValue(); + String label = readCellData.getStringValue(); String value = DictFrameworkUtils.parseDictDataValue(type, label); if (value == null) { log.error("[convertToJavaData][type({}) 解析不掉 label({})]", type, label); @@ -45,11 +46,11 @@ public class DictConvert implements Converter { } @Override - public CellData convertToExcelData(Object object, ExcelContentProperty contentProperty, - GlobalConfiguration globalConfiguration) { + public WriteCellData convertToExcelData(Object object, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { // 空时,返回空 if (object == null) { - return new CellData<>(""); + return new WriteCellData<>(""); } // 使用字典格式化 @@ -58,10 +59,10 @@ public class DictConvert implements Converter { String label = DictFrameworkUtils.getDictDataLabel(type, value); if (label == null) { log.error("[convertToExcelData][type({}) 转换不了 label({})]", type, value); - return new CellData<>(""); + return new WriteCellData<>(""); } // 生成 Excel 小表格 - return new CellData<>(label); + return new WriteCellData<>(label); } private static String getType(ExcelContentProperty contentProperty) { diff --git a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/JsonConvert.java b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/JsonConvert.java index f0a577c0a..0d4794e5f 100644 --- a/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/JsonConvert.java +++ b/yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/JsonConvert.java @@ -3,8 +3,8 @@ package cn.iocoder.yudao.framework.excel.core.convert; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import com.alibaba.excel.converters.Converter; import com.alibaba.excel.enums.CellDataTypeEnum; -import com.alibaba.excel.metadata.CellData; import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.data.WriteCellData; import com.alibaba.excel.metadata.property.ExcelContentProperty; /** @@ -25,15 +25,10 @@ public class JsonConvert implements Converter { } @Override - public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - throw new UnsupportedOperationException("暂不支持,也不需要"); - } - - @Override - public CellData convertToExcelData(Object value, ExcelContentProperty contentProperty, - GlobalConfiguration globalConfiguration) { + public WriteCellData convertToExcelData(Object value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { // 生成 Excel 小表格 - return new CellData<>(JsonUtils.toJsonString(value)); + return new WriteCellData<>(JsonUtils.toJsonString(value)); } } diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/core/DefaultLockFailureStrategy.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/core/DefaultLockFailureStrategy.java index 3af543530..2cea08bf8 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/core/DefaultLockFailureStrategy.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/core/DefaultLockFailureStrategy.java @@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstant import com.baomidou.lock.LockFailureStrategy; import lombok.extern.slf4j.Slf4j; +import java.lang.reflect.Method; + /** * 自定义获取锁失败策略,抛出 {@link ServiceException} 异常 */ @@ -12,9 +14,8 @@ import lombok.extern.slf4j.Slf4j; public class DefaultLockFailureStrategy implements LockFailureStrategy { @Override - public void onLockFailure(String key, long acquireTimeout, int acquireCount) { - log.debug("[onLockFailure][线程:{} 获取锁失败,key:{} 获取超时时长:{} ms]", Thread.currentThread().getName(), key, acquireTimeout); + public void onLockFailure(String key, Method method, Object[] arguments) { + log.debug("[onLockFailure][线程:{} 获取锁失败,key:{} 获取失败:{} ]", Thread.currentThread().getName(), key, arguments); throw new ServiceException(GlobalErrorCodeConstants.LOCKED); } - } diff --git a/yudao-framework/yudao-spring-boot-starter-redis/pom.xml b/yudao-framework/yudao-spring-boot-starter-redis/pom.xml index 06ce85bd3..4b11789b4 100644 --- a/yudao-framework/yudao-spring-boot-starter-redis/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-redis/pom.xml @@ -35,7 +35,6 @@ io.netty netty-all - 4.1.75.Final diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java index 92683f4c9..181e29618 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.bpm.convert.message; import cn.iocoder.yudao.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.Map; @@ -11,6 +12,9 @@ public interface BpmMessageConvert { BpmMessageConvert INSTANCE = Mappers.getMapper(BpmMessageConvert.class); + @Mapping(target = "mobile", ignore = true) + @Mapping(source = "userId", target = "userId") + @Mapping(source = "templateCode", target = "templateCode") + @Mapping(source = "templateParams", target = "templateParams") SmsSendSingleToUserReqDTO convert(Long userId, String templateCode, Map templateParams); - }