Browse Source

修改查询table sql语句 兼容性

main
pixel 4 years ago
parent
commit
7721f7f7ae
  1. 4
      server/config.yaml
  2. 2
      server/service/sys_auto_code.go

4
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

2
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
}

Loading…
Cancel
Save