分页搜索新增编号搜索

This commit is contained in:
wucongxing8150 2024-09-11 10:05:09 +08:00
parent d3e5526ffc
commit eec6e56567
2 changed files with 6 additions and 0 deletions

View File

@ -149,6 +149,9 @@ func (r *ArticleDao) GetArticlePageSearch(req requests.GetArticlePage, page, pag
// 标题
orQuery := global.Db.Model(&model.Article{}).Or("article_title LIKE ?", keyword)
// 编号
orQuery = orQuery.Or("article_number LIKE ?", keyword)
// 医院名称
hospitalSubQuery := global.Db.Model(&model.BaseHospital{}).
Select("hospital_id").

View File

@ -149,6 +149,9 @@ func (r *VideoDao) GetVideoPageSearch(req requests.GetVideoPage, page, pageSize
// 标题
orQuery := global.Db.Model(&model.Video{}).Or("video_title LIKE ?", keyword)
// 编号
orQuery = orQuery.Or("video_number LIKE ?", keyword)
// 医院名称
hospitalSubQuery := global.Db.Model(&model.BaseHospital{}).
Select("hospital_id").