This commit is contained in:
laodaming
2023-09-08 18:49:56 +08:00
parent 1442b0cf64
commit 1f28a64442
2 changed files with 6 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ func (t *FsProductTemplateV2Model) GetProductTemplateListByParams(ctx context.Co
// 获取开启云渲染模板
func (t *FsProductTemplateV2Model) FindOneCloudRenderByProductIdModelIdTemplateTag(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 = ? and element_model_id > ? ", productId, modelId, templateTag, 0).
Where("product_id = ? and model_id = ? and template_tag = ? ", productId, modelId, templateTag).
Where("status = ? and is_del = ?", 1, 0).
Order("sort ASC").
Take(&resp).Error