refactor: 使用 TableName() 替代硬编码表名 client_instance
This commit is contained in:
@@ -93,7 +93,7 @@ func (h *ConfigHandler) List(c *gin.Context) {
|
|||||||
Cnt int `xorm:"cnt"`
|
Cnt int `xorm:"cnt"`
|
||||||
}
|
}
|
||||||
var results []countResult
|
var results []countResult
|
||||||
dao.Engine.Table("client_instance").
|
dao.Engine.Table(&model.ClientInstance{}).
|
||||||
Select("app_config_id, COUNT(*) as cnt").
|
Select("app_config_id, COUNT(*) as cnt").
|
||||||
In("app_config_id", configIds).
|
In("app_config_id", configIds).
|
||||||
GroupBy("app_config_id").
|
GroupBy("app_config_id").
|
||||||
|
|||||||
Reference in New Issue
Block a user