This commit is contained in:
laodaming
2023-08-29 10:21:11 +08:00
parent 72a26c07f2
commit 458202ba6e
2 changed files with 16 additions and 11 deletions

View File

@@ -117,7 +117,7 @@ func (t *FsProductTemplateV2Model) GetProductTemplateListByParams(ctx context.Co
func (t *FsProductTemplateV2Model) FindFirstOneCloudRenderByProductIdModelIdTemplateTag(ctx context.Context, productId, modelId int64, templateTag string) (resp *FsProductTemplateV2, err error) {
err = t.db.WithContext(ctx).Model(&FsProductTemplateV2{}).
Where("product_id = ? and model_id = ? and template_tag = ? ", productId, modelId, templateTag).
Where("status = ? and is_del = ? and element_model_id != ?", 1, 0, 0).
Where("status = ? and is_del = ? ", 1, 0).
Order("sort ASC").
Take(&resp).Error
return resp, err