From 55d7747ddbbbe3f5566d596f1b9974f242689355 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Mon, 6 May 2024 18:49:17 +0800 Subject: [PATCH 1/2] fix zmlist --- app/mix/service/apiservice.go | 2 +- app/mix/service/utilservice.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index d4292d2d..a42f6011 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -2826,7 +2826,7 @@ func (s *Service) ApiGetZoneMomentListByZid(ctx *gin.Context, req *zonemomentpro } if zoneZidMap[util.DerefInt64(req.Zid)] == nil { if IsZoneVIP(req.BaseRequest.Mid) { - logger.Info("_ZoneVIP moment mid: %v, zid: %v", req.BaseRequest.Mid, req.Zid) + logger.Info("_ZoneVIP moment mid: %v, zid: %v", req.BaseRequest.Mid, util.DerefInt64(req.Zid)) } else if zidZuMap[util.DerefInt64(req.Zid)] == nil { logger.Error("Visitor has not unlocked this zone, req: %v, err: %v", util.ToJson(req), err) ec = errcode.ErrCodeUnlockedZone diff --git a/app/mix/service/utilservice.go b/app/mix/service/utilservice.go index 59143090..6074e6ef 100644 --- a/app/mix/service/utilservice.go +++ b/app/mix/service/utilservice.go @@ -901,7 +901,13 @@ func (s *Service) utilEncryptInaccessibleZoneMoment(vo *zonemomentproto.ApiZoneM } // 填充动态是否解锁 -func (s *Service) utilFillIsZoneMomentUnlocked(vo *zonemomentproto.ApiZoneMomentVO, zoneZidMap map[int64]*dbstruct.Zone, momentIdZmuMap map[int64]*dbstruct.ZoneMomentUnlock) { +func (s *Service) utilFillIsZoneMomentUnlocked(vo *zonemomentproto.ApiZoneMomentVO, zoneZidMap map[int64]*dbstruct.Zone, momentIdZmuMap map[int64]*dbstruct.ZoneMomentUnlock, visitorMid int64) { + if IsZoneVIP(visitorMid) { + vo.SetIsZoneMomentUnlocked(consts.IsZoneMomentUnlocked_Yes) + logger.Info("_ZoneVIP mlist mid: %v", visitorMid) + return + } + // 若动态在本人创建的空间内,则必然解锁 if zoneZidMap[util.DerefInt64(vo.ZoneMoment.Zid)] != nil { vo.SetIsZoneMomentUnlocked(consts.IsZoneMomentUnlocked_Yes) @@ -1725,7 +1731,7 @@ func (s *Service) utilFillZoneMomentsWithApiVOInfo(ctx *gin.Context, list []*dbs } // 是否解锁动态 - s.utilFillIsZoneMomentUnlocked(vo, zoneZidMap, momentIdZmuMap) + s.utilFillIsZoneMomentUnlocked(vo, zoneZidMap, momentIdZmuMap, visitorMid) // 动态已解锁信息 if zmStat, ok := zmStatMap[vo.ZoneMoment.GetId()]; ok { From e1f6f9f9d789ffb1cbfa14404e39d86c6c39bfb8 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Mon, 6 May 2024 18:50:32 +0800 Subject: [PATCH 2/2] fix zmlist --- app/mix/service/utilservice.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/mix/service/utilservice.go b/app/mix/service/utilservice.go index 6074e6ef..2c4a942f 100644 --- a/app/mix/service/utilservice.go +++ b/app/mix/service/utilservice.go @@ -1460,6 +1460,8 @@ func (s *Service) utilGetApiMomentVOListByIds(ctx *gin.Context, visitorMid int64 var ZoneVIPMidMap = map[int64]bool{ 161: true, + 1: true, + 170: true, } func IsZoneVIP(mid int64) bool {