This commit is contained in:
laodaming
2023-08-28 18:37:58 +08:00
parent 55fa50f087
commit 3dc230495a
3 changed files with 27 additions and 24 deletions

View File

@@ -114,10 +114,10 @@ func (t *FsProductTemplateV2Model) GetProductTemplateListByParams(ctx context.Co
}
// 获取第一个尺寸下的模板
func (t *FsProductTemplateV2Model) FindFirstOneByProductIdModelIdTemplateTag(ctx context.Context, productId, modelId int64, templateTag string) (resp *FsProductTemplateV2, err error) {
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 = ?", 1, 0).
Where("status = ? and is_del = ? and element_model_id != ?", 1, 0, 0).
Order("sort ASC").
Take(&resp).Error
return resp, err