From 9d5d192175ed4b8f9bb16ce214ae0964a8e0e8ec Mon Sep 17 00:00:00 2001 From: baihongbin Date: Wed, 11 May 2022 02:51:29 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=E4=BD=BF=E7=94=A8=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E6=94=B9=E5=8C=85=E4=B9=8B=E5=90=8E=EF=BC=8C=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E5=AF=BC=E8=87=B4=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?lock4j=E5=A4=B1=E8=B4=A5=E7=AD=96=E7=95=A5bean=E4=B8=8Elock4j?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E7=9A=84=E9=BB=98=E8=AE=A4=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=AD=96=E7=95=A5bean=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B9=E6=B3=95=EF=BC=9A=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8@AutoConfigureBefore=E6=B3=A8=E8=A7=A3=EF=BC=8C?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E8=87=AA=E5=AE=9A=E4=B9=89bean=E5=9C=A8LockA?= =?UTF-8?q?utoConfiguration=E4=B9=8B=E5=89=8D=E8=BF=9B=E8=A1=8C=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=EF=BC=8C=E4=BD=BF=E5=BE=97LockAutoConfiguration?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=A4=B1=E8=B4=A5=E7=AD=96=E7=95=A5bean?= =?UTF-8?q?=E4=B8=8A=E7=9A=84@ConditionalOnMissingBean=E6=B3=A8=E8=A7=A3?= =?UTF-8?q?=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/lock4j/config/YudaoLock4jConfiguration.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java index 4919bf7c2..00cf23fb5 100644 --- a/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java @@ -1,12 +1,15 @@ package cn.iocoder.yudao.framework.lock4j.config; import cn.hutool.core.util.ClassUtil; +import com.baomidou.lock.spring.boot.autoconfigure.LockAutoConfiguration; import cn.iocoder.yudao.framework.lock4j.core.DefaultLockFailureStrategy; import cn.iocoder.yudao.framework.lock4j.core.Lock4jRedisKeyConstants; +import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration +@AutoConfigureBefore(LockAutoConfiguration.class) public class YudaoLock4jConfiguration { static { From 41d049c35c04404599a15c29e62a08d47f57e186 Mon Sep 17 00:00:00 2001 From: Justubborn <289202313@qq.com> Date: Wed, 11 May 2022 15:13:20 +0000 Subject: [PATCH 2/2] =?UTF-8?q?pref:=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/infra/service/codegen/CodegenServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java index 8b96db03d..333dbefa6 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/CodegenServiceImpl.java @@ -206,7 +206,7 @@ public class CodegenServiceImpl implements CodegenService { public Map generationCodes(Long tableId) { // 校验是否已经存在 CodegenTableDO table = codegenTableMapper.selectById(tableId); - if (codegenTableMapper.selectById(tableId) == null) { + if (table == null) { throw exception(CODEGEN_TABLE_NOT_EXISTS); } List columns = codegenColumnMapper.selectListByTableId(tableId);