This commit is contained in:
eson
2023-06-21 18:59:27 +08:00
parent 28cc8a19ba
commit d987601afd
14 changed files with 152 additions and 63 deletions

View File

@@ -1 +1,10 @@
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
}