Merge pull request 'feat-IRONFANS-40-20240125-Robin' (#101) from feat-IRONFANS-40-20240125-Robin into main

Reviewed-on: #101
This commit is contained in:
chenhao 2024-02-05 19:11:08 +08:00
commit 5a4ecf01fe
3 changed files with 7 additions and 1 deletions

View File

@ -263,7 +263,7 @@ func Init(r *gin.Engine) {
opMomentGroup.POST("update", middleware.JSONParamValidator(momentproto.OpUpdateReq{}), middleware.JwtAuthenticator(), OpUpdateMoment)
opMomentGroup.POST("delete", middleware.JSONParamValidator(momentproto.OpDeleteReq{}), middleware.JwtAuthenticator(), OpDeleteMoment)
opMomentGroup.POST("list", middleware.JSONParamValidator(momentproto.OpListReq{}), middleware.JwtAuthenticator(), OpGetMomentList)
opMomentGroup.POST("list_by_mid", middleware.JSONParamValidator(momentproto.OpListReq{}), middleware.JwtAuthenticator(), OpGetMomentListByMid)
opMomentGroup.POST("list_by_mid", middleware.JSONParamValidator(momentproto.OpListByMidReq{}), middleware.JwtAuthenticator(), OpGetMomentListByMid)
opMomentGroup.POST("thumbs_up", middleware.JSONParamValidator(momentproto.OpThumbsUpReq{}), middleware.JwtAuthenticator(), OpThumbsUpMoment)
opMomentGroup.POST("list_by_ids", middleware.JSONParamValidator(momentproto.OpListByIdsReq{}), middleware.JwtAuthenticator(), OpGetMomentListByIds)

View File

@ -111,6 +111,8 @@ func OpGetMomentListByMid(ctx *gin.Context) {
data.More = 1
}
ReplyOk(ctx, data)
}
func OpGetMomentListByIds(ctx *gin.Context) {

View File

@ -331,6 +331,10 @@ func (s *Service) utilUnThumbsUpMoment(ctx *gin.Context, req *momentproto.OpThum
func (s *Service) utilFillMomentsStreamerInfo(ctx *gin.Context, moments []*dbstruct.Moment, option int) (vos []momentproto.MomentVO, ec errcode.ErrCode) {
ec = errcode.ErrCodeMomentSrvOk
if len(moments) == 0 {
return
}
// 组装midList
midSet := make(map[int64]*dbstruct.Moment)
for _, moment := range moments {