From 0a4217b2009f329e3c643889bc5f495a36ceccf8 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 24 Oct 2024 16:01:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E6=8A=80=E9=A6=86=E6=8A=BD=E5=A5=96?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=8F=82=E4=B8=8E=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbproxy/svc/l_lotterycode.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbproxy/svc/l_lotterycode.go b/dbproxy/svc/l_lotterycode.go index c542a21..502f9ae 100644 --- a/dbproxy/svc/l_lotterycode.go +++ b/dbproxy/svc/l_lotterycode.go @@ -83,7 +83,8 @@ func (svc *LotteryCodeSvc) GetJoinNum(req *model.GetLotteryCodeReq, resp *int) ( tc := new(m) err = c.Pipe([]bson.M{ {"$match": bson.M{"snid": bson.M{"$gt": 0}, "cid": req.CId, "startts": req.StartTs}}, - {"$group": bson.M{"_id": bson.M{"snid": "$snid"}, "count": bson.M{"$sum": "$count"}}}, + {"$group": bson.M{"_id": bson.M{"snid": "$snid"}}}, + {"$count": "count"}, }).AllowDiskUse().One(tc) if err != nil && !errors.Is(err, mgo.ErrNotFound) { logger.Logger.Warn("GetJoinNum error:", err)