refactor: 重构 PVP 匹配逻辑使用模型结构体
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-05 11:21:38 +08:00
committed by cnb
parent 2e7215946b
commit b1ca686e06
5 changed files with 61 additions and 39 deletions

View File

@@ -82,7 +82,8 @@ func ListenFunc(ctx g.Ctx) {
continue
}
cool.Logger.Info(ctx, "成功订阅 Redis 主题", "topic", subscribeTopic)
_, err = conn.Do(ctx, "subscribe", "sun:join:2458") //加入队列
_, err = conn.Do(ctx, "subscribe", "sun:join") //加入队列
_, err = conn.Do(ctx, "subscribe", "sun:cancel") //退出队列
// 4. 循环接收消息
connError := false
@@ -118,7 +119,7 @@ func ListenFunc(ctx g.Ctx) {
cool.Logger.Error(ctx, "执行函数失败", "payload", dataMap.Payload, "error", err)
}
}
if dataMap.Channel == "sun:join:2458" {
if dataMap.Channel == "sun:join" {
fightmap.ADD(dataMap.Payload)
//universalClient, _ := g.Redis("cool").Client().(goredis.UniversalClient)