diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index 423c32cb..316418e5 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -2645,6 +2645,16 @@ func (s *Service) ApiDeleteZoneMoment(ctx *gin.Context, req *zonemomentproto.Api } } + // 回退空间内统计总数 + mediaCountInc := len(zonemoment.MediaComp.GetImageIds()) + videoCountInc := len(zonemoment.MediaComp.GetVideoIds()) + err = _DefaultZone.RecordStatisticsById(ctx, zonemoment.GetZid(), -1, -int64(mediaCountInc), -int64(videoCountInc)) + if err != nil { + logger.Error("RecordStatisticsById fail, req: %v, err: %v", util.ToJson(req), err) + ec = errcode.ErrCodeZoneSrvFail + return + } + // 回退每日发帖次数 totalIncr := int64(-1) _, err = _DefaultZoneMomentCreateTimes.OpGetAndUpdate(ctx, zone.GetMid(), totalIncr)