Merge branch 'develop' into feature/mhw-v1.01
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
@@ -142,3 +142,7 @@ func (m *FsUserMaterialModel) GetListByUser(ctx context.Context, userId, guestId
|
||||
Where(cond).Order("id DESC").Limit(limit).Find(&resp).Error
|
||||
return resp, err
|
||||
}
|
||||
func (m *FsUserMaterialModel) FindOneByLogoResourceId(ctx context.Context, logoResourceId string) (resp *FsUserMaterial, err error) {
|
||||
err = m.db.WithContext(ctx).Model(&FsUserMaterial{}).Where("`resource_id` = ?", logoResourceId).Take(&resp).Error
|
||||
return resp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user