diff --git a/api/proto/zonemoment/proto/zonemoment_op.go b/api/proto/zonemoment/proto/zonemoment_op.go index e07eb587..ef6a29dd 100644 --- a/api/proto/zonemoment/proto/zonemoment_op.go +++ b/api/proto/zonemoment/proto/zonemoment_op.go @@ -73,11 +73,12 @@ type OpListByMidReq struct { base.BaseRequest MType *int64 `json:"m_type"` // 媒体类型 Status *int64 `json:"status"` // 状态 - CtUpperBound *int64 `json:"ct_upper_bound"` //创建时间上界,闭区间 - CtLowerBound *int64 `json:"ct_lower_bound"` //创建时间下界,开区间,可为0 + CtUpperBound *int64 `json:"ct_upper_bound"` // 创建时间上界,闭区间 + CtLowerBound *int64 `json:"ct_lower_bound"` // 创建时间下界,开区间,可为0 Offset int `json:"offset"` Limit int `json:"limit"` Sort []string + Uid *int64 } type OpListByMidData struct { diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index 8fa03fa7..d73dfb9b 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -4192,6 +4192,12 @@ func (m *Mongo) GetZoneMomentListByMid(ctx *gin.Context, req *zonemomentproto.Op "mid": req.GetBaseRequest().Mid, "del_flag": 0, } + if req.Uid != nil { + query["mid"] = util.DerefInt64(req.Uid) + } else { + query["mid"] = req.GetBaseRequest().Mid + } + if req.MType != nil { query["m_type"] = util.DerefInt64(req.MType) } diff --git a/app/mix/service/service.go b/app/mix/service/service.go index d77aab89..5269b764 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -3385,6 +3385,7 @@ func (s *Service) OpGetZoneMomentListByUserId(ctx *gin.Context, req *zonemomentp list, err := _DefaultZoneMoment.OpListByMid(ctx, &zonemomentproto.OpListByMidReq{ BaseRequest: req.BaseRequest, + Uid: account.Mid, CtUpperBound: req.CtUpperBound, CtLowerBound: req.CtLowerBound, })