Commit 67afd821503d1a1dceb3a73a4f64ca797027cebc

Authored by YunaiV
2 parents 9e10e0fd 190150d1

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

yudao-framework/yudao-spring-boot-starter-protection/src/main/java/cn/iocoder/yudao/framework/lock4j/config/YudaoLock4jConfiguration.java
1 package cn.iocoder.yudao.framework.lock4j.config; 1 package cn.iocoder.yudao.framework.lock4j.config;
2 2
3 import cn.hutool.core.util.ClassUtil; 3 import cn.hutool.core.util.ClassUtil;
  4 +import com.baomidou.lock.spring.boot.autoconfigure.LockAutoConfiguration;
4 import cn.iocoder.yudao.framework.lock4j.core.DefaultLockFailureStrategy; 5 import cn.iocoder.yudao.framework.lock4j.core.DefaultLockFailureStrategy;
5 import cn.iocoder.yudao.framework.lock4j.core.Lock4jRedisKeyConstants; 6 import cn.iocoder.yudao.framework.lock4j.core.Lock4jRedisKeyConstants;
  7 +import org.springframework.boot.autoconfigure.AutoConfigureBefore;
6 import org.springframework.context.annotation.Bean; 8 import org.springframework.context.annotation.Bean;
7 import org.springframework.context.annotation.Configuration; 9 import org.springframework.context.annotation.Configuration;
8 10
9 @Configuration 11 @Configuration
  12 +@AutoConfigureBefore(LockAutoConfiguration.class)
10 public class YudaoLock4jConfiguration { 13 public class YudaoLock4jConfiguration {
11 14
12 static { 15 static {
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 { @@ -206,7 +206,7 @@ public class CodegenServiceImpl implements CodegenService {
206 public Map<String, String> generationCodes(Long tableId) { 206 public Map<String, String> generationCodes(Long tableId) {
207 // 校验是否已经存在 207 // 校验是否已经存在
208 CodegenTableDO table = codegenTableMapper.selectById(tableId); 208 CodegenTableDO table = codegenTableMapper.selectById(tableId);
209 - if (codegenTableMapper.selectById(tableId) == null) { 209 + if (table == null) {
210 throw exception(CODEGEN_TABLE_NOT_EXISTS); 210 throw exception(CODEGEN_TABLE_NOT_EXISTS);
211 } 211 }
212 List<CodegenColumnDO> columns = codegenColumnMapper.selectListByTableId(tableId); 212 List<CodegenColumnDO> columns = codegenColumnMapper.selectListByTableId(tableId);