by Robin at 20240430

This commit is contained in:
Leufolium 2024-04-30 09:40:19 +08:00
parent 7f18d00df4
commit aa32674ed3
3 changed files with 10 additions and 2 deletions

View File

@ -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 {

View File

@ -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)
}

View File

@ -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,
})