This commit is contained in:
devad 2024-10-13 13:55:48 +08:00
parent 277ae3ea4c
commit 5d5669b503
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ func (l *ListNoticeLogic) ListNotice(req *clientCore.ListNoticeReq) (*clientCore
var resp clientCore.ListNoticeResp var resp clientCore.ListNoticeResp
l.svcCtx.DbEngin.Raw("select * from t_notice order by created_time desc").Scan(&notices) //TODO 防止数据量过大限制查询记录100条
l.svcCtx.DbEngin.Raw("select * from t_notice order by created_time desc limit 100").Scan(&notices)
for _, notice := range notices { for _, notice := range notices {
resp.Data = append(resp.Data, notice) resp.Data = append(resp.Data, notice)
} }