From 42bf01c4e707596de18408302b300b08faa84874 Mon Sep 17 00:00:00 2001 From: yuanzhao <2206582181@qq.com> Date: Thu, 7 Dec 2023 20:15:32 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=85=81=E8=AE=B8=E9=94=81=E4=BD=8F=5Fg?= =?UTF-8?q?en=E6=96=87=E4=BB=B6=E4=B8=8D=E5=86=8D=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console/commands/orm/mysql.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/console/commands/orm/mysql.go b/console/commands/orm/mysql.go index f49352d..7701aa9 100644 --- a/console/commands/orm/mysql.go +++ b/console/commands/orm/mysql.go @@ -61,6 +61,10 @@ func GenMysql(name string, conf Conf, out string) { mysqlTableName := parser.StringToSnake(table) file := out + "/" + mysqlTableName + if _, err := os.Stat(file + "_lock.go"); !os.IsNotExist(err) { + continue + } + str := "package " + name str += "\nimport (" + imports[table] + "\n)" str += "\n" + genOrmStruct(table, columns, conf, relationship[table])