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) } }