修复(#8): 分组管理核心缺陷与测试覆盖 (#11)

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-06-04 03:13:38 -07:00
committed by GitHub
parent 377f13da48
commit 34cd1c524e
10 changed files with 510 additions and 74 deletions
@@ -76,16 +76,16 @@ func (l *GetGroupHistoryDetailLogic) GetGroupHistoryDetail(req *types.GetGroupHi
configSnapshot := make(map[string]interface{})
configSnapshot["group_details"] = details
// 获取配置快照(从 system_config 读取)
// 获取配置快照(从 system 读取)
var configValue string
if history.GroupMode == "average" {
l.svcCtx.DB.Table("system_config").
Where("`key` = ?", "group.average_config").
l.svcCtx.DB.Table("system").
Where("`category` = ? AND `key` = ?", "group", "average_config").
Select("value").
Scan(&configValue)
} else if history.GroupMode == "traffic" {
l.svcCtx.DB.Table("system_config").
Where("`key` = ?", "group.traffic_config").
l.svcCtx.DB.Table("system").
Where("`category` = ? AND `key` = ?", "group", "traffic_config").
Select("value").
Scan(&configValue)
}