fusenapi/model/gmodel/fs_faq_logic.go

11 lines
348 B
Go
Raw Permalink Normal View History

2023-06-16 11:26:48 +00:00
package gmodel
2023-06-21 10:59:27 +00:00
import "context"
func (m *FsFaqModel) FindOneByTagId(ctx context.Context, tagId int, STATUS_ON int64) (faqs []*FsFaq, err error) {
err = m.db.WithContext(ctx).
Select("id", "tag_id", "tag_name", "title", "content").
Where("tag_id = ? AND status = ?", tagId, STATUS_ON).Order("sort DESC").Find(&faqs).Error
return faqs, err
}