From 159b16a8a7aadbed253d0ed317d8b93d715cd57d Mon Sep 17 00:00:00 2001 From: Leufolium Date: Thu, 11 Apr 2024 20:17:55 +0800 Subject: [PATCH] by Robin at 20240411 --- app/mix/service/apiservice.go | 3 +-- app/mix/service/service.go | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index dfe9eaa1..8cb4bda7 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -2323,10 +2323,9 @@ func (s *Service) ApiUpdateZoneMoment(ctx *gin.Context, req *zonemomentproto.Api // 回退空间内统计总数 if isReauditRequired { - id := util.DerefInt64(req.ZoneMoment.Id) mediaCountInc := len(zonemoment.MediaComp.GetImageIds()) videoCountInc := len(zonemoment.MediaComp.GetVideoIds()) - err := _DefaultZone.RecordStatisticsById(ctx, id, -1, -int64(mediaCountInc), -int64(videoCountInc)) + err := _DefaultZone.RecordStatisticsById(ctx, util.DerefInt64(zonemoment.Zid), -1, -int64(mediaCountInc), -int64(videoCountInc)) if err != nil { logger.Error("RecordStatisticsById fail, req: %v, err: %v", util.ToJson(req), err) ec = errcode.ErrCodeZoneSrvFail diff --git a/app/mix/service/service.go b/app/mix/service/service.go index f3c9a698..8453af4f 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -3295,10 +3295,9 @@ func (s *Service) OpDeleteZoneMoment(ctx *gin.Context, req *zonemomentproto.OpDe } // 回退空间内统计总数 - id := util.DerefInt64(req.Id) mediaCountInc := len(zonemoment.MediaComp.GetImageIds()) videoCountInc := len(zonemoment.MediaComp.GetVideoIds()) - err = _DefaultZone.RecordStatisticsById(ctx, id, -1, -int64(mediaCountInc), -int64(videoCountInc)) + err = _DefaultZone.RecordStatisticsById(ctx, util.DerefInt64(zonemoment.Zid), -1, -int64(mediaCountInc), -int64(videoCountInc)) if err != nil { logger.Error("RecordStatisticsById fail, req: %v, err: %v", util.ToJson(req), err) ec = errcode.ErrCodeZoneSrvFail @@ -3387,7 +3386,7 @@ func (s *Service) OpReviewZoneMoment(ctx *gin.Context, req *zonemomentproto.OpRe } mediaCountInc := len(zonemoment.MediaComp.GetImageIds()) videoCountInc := len(zonemoment.MediaComp.GetVideoIds()) - err = _DefaultZone.RecordStatisticsById(ctx, id, 1, int64(mediaCountInc), int64(videoCountInc)) + err = _DefaultZone.RecordStatisticsById(ctx, util.DerefInt64(zonemoment.Zid), 1, int64(mediaCountInc), int64(videoCountInc)) if err != nil { logger.Error("RecordStatisticsById fail, req: %v, err: %v", util.ToJson(req), err) ec = errcode.ErrCodeZoneSrvFail