mirror of
https://github.com/1024-lab/smart-admin.git
synced 2026-06-02 03:55:59 +00:00
v2.0 优化代码生成提示
This commit is contained in:
@@ -149,6 +149,11 @@ public class CodeGeneratorService {
|
||||
}
|
||||
}
|
||||
|
||||
// 校验表必须有主键
|
||||
if(!tableColumns.stream().filter( e -> "PRI".equalsIgnoreCase(e.getColumnKey())).findAny().isPresent()){
|
||||
return ResponseDTO.userErrorParam("表必须有主键,请联系后端查看下数据库表结构");
|
||||
}
|
||||
|
||||
codeGeneratorConfigEntity.setTableName(form.getTableName());
|
||||
codeGeneratorConfigEntity.setBasic(JSON.toJSONString(form.getBasic()));
|
||||
codeGeneratorConfigEntity.setFields(JSONArray.toJSONString(form.getFields()));
|
||||
|
||||
Reference in New Issue
Block a user