!165 代码优化

Merge pull request !165 from Justubborn/master
This commit is contained in:
芋道源码 2022-05-11 15:46:27 +00:00 committed by Gitee
commit 3294442121
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -206,7 +206,7 @@ public class CodegenServiceImpl implements CodegenService {
public Map<String, String> generationCodes(Long tableId) { public Map<String, String> generationCodes(Long tableId) {
// 校验是否已经存在 // 校验是否已经存在
CodegenTableDO table = codegenTableMapper.selectById(tableId); CodegenTableDO table = codegenTableMapper.selectById(tableId);
if (codegenTableMapper.selectById(tableId) == null) { if (table == null) {
throw exception(CODEGEN_TABLE_NOT_EXISTS); throw exception(CODEGEN_TABLE_NOT_EXISTS);
} }
List<CodegenColumnDO> columns = codegenColumnMapper.selectListByTableId(tableId); List<CodegenColumnDO> columns = codegenColumnMapper.selectListByTableId(tableId);