Merge branch 'dev-lwl/fix' into test
This commit is contained in:
commit
a4b0c010a8
|
@ -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)
|
||||
|
@ -1454,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 {
|
||||
|
@ -1725,7 +1733,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