This commit is contained in:
laodaming
2023-09-15 15:27:39 +08:00
parent ee92468392
commit 6987f2c2d1
4 changed files with 8 additions and 2 deletions

View File

@@ -71,6 +71,11 @@ func (p *FsProductPriceModel) GetPriceListByProductIds(ctx context.Context, prod
}
return
}
func (p *FsProductPriceModel) FindOneBySizeId(ctx context.Context, sizeId int64) (resp *FsProductPrice, err error) {
err = p.db.WithContext(ctx).Model(&FsProductPrice{}).
Where("`size_id` = ? and `status` = ?", sizeId, 1).Take(&resp).Error
return resp, err
}
// 产品价格
type ProductPrice struct {