From 242074a4912047ffdb05b172103aa8ecd9946916 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Mon, 5 Feb 2024 19:03:35 +0800 Subject: [PATCH 1/3] fix null --- app/mix/service/utilservice.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/mix/service/utilservice.go b/app/mix/service/utilservice.go index 17cc79f3..8745295e 100644 --- a/app/mix/service/utilservice.go +++ b/app/mix/service/utilservice.go @@ -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 { From 9178b4a5ce03441ca2b4b233912300879f5cecac Mon Sep 17 00:00:00 2001 From: Leufolium Date: Mon, 5 Feb 2024 19:06:42 +0800 Subject: [PATCH 2/3] by Robin at 20240205 --- app/mix/controller/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mix/controller/init.go b/app/mix/controller/init.go index 572070d3..95313d36 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -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) From 87c431ce8e00129d1cb6141caa90f6ba30cc4611 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Mon, 5 Feb 2024 19:09:18 +0800 Subject: [PATCH 3/3] return info --- app/mix/controller/moment_op.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/mix/controller/moment_op.go b/app/mix/controller/moment_op.go index 84b74a37..f523abe3 100644 --- a/app/mix/controller/moment_op.go +++ b/app/mix/controller/moment_op.go @@ -111,6 +111,8 @@ func OpGetMomentListByMid(ctx *gin.Context) { data.More = 1 } + ReplyOk(ctx, data) + } func OpGetMomentListByIds(ctx *gin.Context) {