update ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java.

Signed-off-by: yi-l-i-yi-li <8995991+yi-l-i-yi-li@user.noreply.gitee.com>
This commit is contained in:
yi-l-i-yi-li 2022-08-15 11:22:33 +00:00 committed by Gitee
parent c61a805792
commit bc80c8d9aa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 0 deletions

View File

@ -207,6 +207,8 @@ public class GenController extends BaseController
if (sqlStatement instanceof MySqlCreateTableStatement)
{
MySqlCreateTableStatement createTableStatement = (MySqlCreateTableStatement) sqlStatement;
//检查sql是否存在关键字
SqlUtil.filterKeyword(createTableStatement.toString());
if (genTableService.createTable(createTableStatement.toString()))
{
String tableName = createTableStatement.getTableName().replaceAll("`", "");