商品列表sku价格
This commit is contained in:
parent
e19dd2e368
commit
a20b4b7ec8
|
@ -67,7 +67,7 @@ type Goods struct {
|
|||
PriceVm uint32 `json:"price_vm"` // 积分价格
|
||||
PriceRm uint32 `json:"price_rm"` // 人民币价格
|
||||
//Stock uint32 `json:"stock"` // 库存
|
||||
ShowDiscount int `json:"show_discount"` //是否展示折扣价
|
||||
ShowDiscount int8 `json:"show_discount"` //是否展示折扣价
|
||||
|
||||
GoodsCat *GoodsCat `json:"goods_cat" gorm:"-"`
|
||||
GoodsDiscount *GoodsDiscount `json:"goods_discount" gorm:"-"`
|
||||
|
@ -1404,7 +1404,7 @@ func (o *GoodsOrder) SetDeliverStore() error {
|
|||
func GetGoodsFirstSkuCombo(goodsId []uint32) []GoodsAttributeCombo {
|
||||
var list []GoodsAttributeCombo
|
||||
err := orm.Eloquent.
|
||||
Raw("SELECT b.* FROM (SELECT goods_id, MAX(sort) FROM goods_attribute GROUP BY goods_id) AS a INNER JOIN goods_attribute_combo b ON a.goods_id = b.goods_id where a.goods_id in (?) GROUP BY b.goods_id", goodsId).
|
||||
Raw("SELECT b.* FROM goods_attribute AS a INNER JOIN goods_attribute_combo b ON a.goods_id = b.goods_id where a.goods_id in (?) GROUP BY b.goods_id", goodsId).
|
||||
Scan(&list).
|
||||
Error
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user