fusenapi/model/gmodel/fs_faq_logic.go
2023-06-21 18:59:27 +08:00

11 lines
348 B
Go
Executable File

package gmodel
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
}