From f30f710981472d588698a309165f28e60315ea87 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Thu, 17 Oct 2024 10:35:39 +0800 Subject: [PATCH] 1 --- app/mix/dao/mongo.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index 708b1f94..9e71bd35 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -6364,7 +6364,17 @@ func (m *Mongo) DeleteNotifBcsts(ctx *gin.Context, ids []int64) error { } func (m *Mongo) GetNotifBcstListByVersRange(ctx *gin.Context, vers_lb int64, vers_up int64) ([]*dbstruct.NotifBcst, error) { + list := make([]*dbstruct.NotifBcst, 0) col := m.getColNotifBcst() + query := qmgo.M{ + "del_flag": 0, + } + err := col.Find(ctx, query).Sort("-ct").Skip(int64(req.Offset)).Limit(int64(req.Limit)).All(&list) + if err == qmgo.ErrNoSuchDocuments { + err = nil + return list, err + } + return list, err } // 瑞文智商测试表相关