fixed: 修复其他数据库类型下无法获取表列表的bug

This commit is contained in:
pixelmaxQM
2024-08-05 20:05:23 +08:00
parent 7121968081
commit 332a8de2e9
3 changed files with 9 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ func (autoApi *AutoCodeApi) GetTables(c *gin.Context) {
dbName := c.Query("dbName")
businessDB := c.Query("businessDB")
if dbName == "" {
dbName = global.GVA_CONFIG.Mysql.Dbname
dbName = *global.GVA_ACTIVE_DBNAME
if businessDB != "" {
for _, db := range global.GVA_CONFIG.DBList {
if db.AliasName == businessDB {
@@ -85,7 +85,7 @@ func (autoApi *AutoCodeApi) GetColumn(c *gin.Context) {
businessDB := c.Query("businessDB")
dbName := c.Query("dbName")
if dbName == "" {
dbName = global.GVA_CONFIG.Mysql.Dbname
dbName = *global.GVA_ACTIVE_DBNAME
if businessDB != "" {
for _, db := range global.GVA_CONFIG.DBList {
if db.AliasName == businessDB {