Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into develop

This commit is contained in:
eson
2023-09-20 17:36:25 +08:00
4 changed files with 28 additions and 8 deletions

View File

@@ -43,8 +43,8 @@ func (pt *FsProductTemplateTagsModel) GetListByTagNames(ctx context.Context, tag
err = db.Limit(limit).Find(&resp).Error
return resp, err
}
func (pt *FsProductTemplateTagsModel) FindOneByTagName(ctx context.Context, tagName string, fields ...string) (resp *FsProductTemplateTags, err error) {
db := pt.db.WithContext(ctx).Model(&FsProductTemplateTags{}).Where("`template_tag` = ? and `status` = ?", tagName, 1)
func (pt *FsProductTemplateTagsModel) FindOneByTagName(ctx context.Context, templateTagName string, fields ...string) (resp *FsProductTemplateTags, err error) {
db := pt.db.WithContext(ctx).Model(&FsProductTemplateTags{}).Where("`template_tag` = ? and `status` = ?", templateTagName, 1)
if len(fields) != 0 {
db = db.Select(fields[0])
}