From 7cb60f01b6045c72da4cd35c3570634ff4522738 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Fri, 26 Apr 2024 23:01:55 +0800 Subject: [PATCH] by Robin at 20240426 --- app/mix/dao/mongo.go | 1 + app/mix/service/apiservice.go | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index 6021405a..35fdebfd 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -1003,6 +1003,7 @@ func (m *Mongo) ClearLoginWrongPswdTimes(ctx *gin.Context) error { up := qmgo.M{ "$set": qmgo.M{ "wrong_pswd_times": int64(0), + "is_locked": int64(0), }, } diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index 359a3eb8..f38cb4b5 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -2884,9 +2884,24 @@ func (s *Service) ApiGetZoneMomentStatisticsByCreaterMid(ctx *gin.Context, req * paidLimit = dailyLimit } + // 总发帖次数统计 + totalFreeCount, err := _DefaultZoneMoment.OpCountByMidAndCType(ctx, req.BaseRequest.Mid, consts.ZoneMomentCType_Free) + if err != nil { + logger.Error("_DefaultZoneMoment OpCountByMidAndCType fail, req: %v, err: %v", util.ToJson(req), err) + ec = errcode.ErrCodeZoneMomentSrvFail + return + } + + totalPaidCount, err := _DefaultZoneMoment.OpCountByMidAndCType(ctx, req.BaseRequest.Mid, consts.ZoneMomentCType_Paid) + if err != nil { + logger.Error("_DefaultZoneMoment OpCountByMidAndCType fail, req: %v, err: %v", util.ToJson(req), err) + ec = errcode.ErrCodeZoneMomentSrvFail + return + } + result = &zonemomentproto.ApiListStatisticsByCreaterMidData{ - FreeCount: freeCount, - PaidCount: paidCount, + FreeCount: totalFreeCount, + PaidCount: totalPaidCount, RejectedCount: rejectedCount, PaidLimit: paidLimit, }