yxh пре 4 година
родитељ
комит
279a32aea7
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      app/system/service/tools_gen_table.go

+ 1 - 1
app/system/service/tools_gen_table.go

@@ -689,7 +689,7 @@ func (s *toolsGenTable) writeDb(path string, ctx context.Context) (err error) {
 			sql := strings.Join(sqlStr, "")
 			gstr.ReplaceByArray(sql, []string{"@parentId", gconv.String(id), "@now", now.Format("Y-m-d H:i:s")})
 			//插入业务
-			res, err = g.DB().Exec(sql)
+			res, err = tx.Exec(sql)
 			if err != nil {
 				tx.Rollback()
 				return