Commit 41d049c35c04404599a15c29e62a08d47f57e186
Committed by
Gitee
1 parent
4f7cd65e
pref: 代码优化
Showing
1 changed file
with
1 additions
and
1 deletions
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); |