sku排序

This commit is contained in:
范俊成 2023-09-21 15:08:16 +08:00
parent d292ab57f0
commit 4c723d4531

View File

@ -260,7 +260,9 @@ func (m *GoodsDetailReq) GoodsDetail() (*Goods, error) {
return nil, err
}
var goodsAttributes []GoodsAttribute
err = DB.Table("goods_attribute").Where("goods_id=?", m.GoodsId).
err = DB.Table("goods_attribute").
Where("goods_id=?", m.GoodsId).
Order("sort DESC").
Find(&goodsAttributes).Error
if err != nil {
log.Error().Msgf("goods attribute err:%#v", err)