by Robin at 20240427
This commit is contained in:
parent
9fed951998
commit
9a5968f158
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue