Forráskód Böngészése

修改查询table sql语句 兼容性

pixel 4 éve
szülő
commit
7721f7f7ae
2 módosított fájl, 3 hozzáadás és 3 törlés
  1. 2 2
      server/config.yaml
  2. 1 1
      server/service/sys_auto_code.go

+ 2 - 2
server/config.yaml

@@ -11,8 +11,8 @@ jwt:
 # mysql connect configuration
 mysql:
     username: root
-    password: 'Aa@6447985'
-    path: '127.0.0.1:3306'
+    password: 'wztxz19971029'
+    path: '47.103.196.252:3306'
     db-name: 'qmPlus'
     config: 'charset=utf8&parseTime=True&loc=Local'
     max-idle-conns: 10

+ 1 - 1
server/service/sys_auto_code.go

@@ -119,7 +119,7 @@ func GetAllTplFile(pathName string, fileList []string) ([]string, error) {
 }
 
 func GetTables(dbName string) (err error, TableNames []request.TableReq) {
-	err = global.GVA_DB.Raw("select table_name from information_schema.tables where table_schema= ? and table_type= ? ", dbName, "base table").Scan(&TableNames).Error
+	err = global.GVA_DB.Raw("select table_name as table_name from information_schema.tables where table_schema = ?", dbName).Scan(&TableNames).Error
 	return err, TableNames
 }