fix zmlist
This commit is contained in:
parent
5ef25b96f4
commit
55d7747ddb
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue