升级至8069版本:版本号更新/代理配置系统/红包计时埋点/长连接重构/回调修复

This commit is contained in:
2026-02-26 10:44:13 +08:00
parent 7cbd3d061d
commit 40a74d2ea7
38 changed files with 3639 additions and 235 deletions
+38
View File
@@ -128,6 +128,44 @@ func InitAnewLogin() {
// 等待所有协程完成
wg.Wait()
fmt.Println("初始化上线完成")
// 回调上线
go func() {
time.Sleep(3 * time.Second) // 等待连接稳定
connectMgr := service.WXServer.GetWXConnectMgr()
connectInfo := connectMgr.GetConnectInfo()
if connections, ok := connectInfo["connections"].([]map[string]interface{}); ok {
for _, conn := range connections {
if userInfoRaw, exists := conn["userInfo"]; exists {
var uuid string
switch v := userInfoRaw.(type) {
case *baseinfo.UserInfo:
uuid = v.UUID
case map[string]interface{}:
if uuidRaw, ok := v["UUID"]; ok {
if uuidStr, ok := uuidRaw.(string); ok {
uuid = uuidStr
}
}
}
if uuid != "" {
wxConn := connectMgr.GetWXConnectByUserInfoUUID(uuid)
if wxConn != nil {
wxCache := wxConn.GetWXCache()
// 设置消息同步完成标志,允许接收实时消息
wxCache.SetInitNewSyncFinished(true)
fmt.Printf("已激活消息接收 [UUID: %s]\n", uuid)
}
}
}
}
}
// 然后初始化回调配置
db.InitMessageCallbacks()
}()
// 启动定期清理未登录连接的协程
go func() {