Browse Source

Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/1.6.2

YunaiV 2 years ago
parent
commit
67afd82150

+ 3 - 0
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 {

+ 1 - 1
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<String, String> generationCodes(Long tableId) {
         // 校验是否已经存在
         CodegenTableDO table = codegenTableMapper.selectById(tableId);
-        if (codegenTableMapper.selectById(tableId) == null) {
+        if (table == null) {
             throw exception(CODEGEN_TABLE_NOT_EXISTS);
         }
         List<CodegenColumnDO> columns = codegenColumnMapper.selectListByTableId(tableId);