fix
This commit is contained in:
@@ -5,7 +5,7 @@ import "context"
|
||||
// TODO: 使用model的属性做你想做的
|
||||
type GetTagPropByProductIdsWithProductTagRsp struct {
|
||||
FsProductTagProp
|
||||
Title string `json:"title"`
|
||||
TemplateTag string `json:"template_tag"`
|
||||
}
|
||||
|
||||
func (p *FsProductTagPropModel) GetTagPropByProductIdsWithProductTag(ctx context.Context, productIds []int64) (resp []GetTagPropByProductIdsWithProductTagRsp, err error) {
|
||||
@@ -14,7 +14,7 @@ func (p *FsProductTagPropModel) GetTagPropByProductIdsWithProductTag(ctx context
|
||||
}
|
||||
err = p.db.WithContext(ctx).Table(p.name+" as p ").
|
||||
Joins("left join fs_product_template_tags as t on p.template_tag_id = t.id").
|
||||
Select("p.*,t.title as title").
|
||||
Select("p.*,t.template_tag as template_tag").
|
||||
Where("p.product_id in (?) and p.status = ? and t.status = ?", productIds, 1, 1).
|
||||
Find(&resp).Error
|
||||
return resp, err
|
||||
|
||||
Reference in New Issue
Block a user