From 85bee6eeaabde5347b1ce70957506b4c1e7eaa5c Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 29 Jan 2024 15:18:25 +0800 Subject: [PATCH] update --- app/db/db_notice.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/db/db_notice.go b/app/db/db_notice.go index 8a31564..bab026d 100644 --- a/app/db/db_notice.go +++ b/app/db/db_notice.go @@ -50,11 +50,11 @@ func (noticeDb *NoticeDb) FindNoticeById(ids interface{}) (*[]model.Notice, erro func (noticeDb *NoticeDb) FindNotice(limit, start int) (*[]model.Notice, error) { var m []model.Notice if limit == 0 || start == 0 { - if err := noticeDb.Db.Asc("sort").Find(&m); err != nil { + if err := noticeDb.Db.Where("is_pop_to_central_kitchen = 0").Asc("sort").Find(&m); err != nil { return nil, logx.Error(err) } } else { - if err := noticeDb.Db.Asc("sort").Limit(limit, start).Find(m); err != nil { + if err := noticeDb.Db.Where("is_pop_to_central_kitchen = 0").Asc("sort").Limit(limit, start).Find(m); err != nil { return nil, logx.Error(err) } }