From 5d5669b503efc1b1a1c781155e2ab32f01af6ad9 Mon Sep 17 00:00:00 2001 From: devad Date: Sun, 13 Oct 2024 13:55:48 +0800 Subject: [PATCH] fix --- internal/logic/core/listnoticelogic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/logic/core/listnoticelogic.go b/internal/logic/core/listnoticelogic.go index be6e6061..136e72fc 100644 --- a/internal/logic/core/listnoticelogic.go +++ b/internal/logic/core/listnoticelogic.go @@ -26,7 +26,8 @@ func (l *ListNoticeLogic) ListNotice(req *clientCore.ListNoticeReq) (*clientCore var resp clientCore.ListNoticeResp - l.svcCtx.DbEngin.Raw("select * from t_notice order by created_time desc").Scan(¬ices) + //TODO 防止数据量过大,限制查询记录100条 + l.svcCtx.DbEngin.Raw("select * from t_notice order by created_time desc limit 100").Scan(¬ices) for _, notice := range notices { resp.Data = append(resp.Data, notice) }