master
howell 3 years ago
parent 65a28b6b19
commit c7a38087e6

@ -235,7 +235,7 @@ func GetGoodsRespByInfoList(goodsList []goods.Information, userID uint, isSale b
skuMap[v.GoodsID] = v
}
var mainPhotoList []goods.MainPhoto
mysql2.Db.Select("url").First(&mainPhotoList, "goods_id in (?) AND is_master = 1", ids)
mysql2.Db.Select("url").Find(&mainPhotoList, "goods_id in (?) AND is_master = 1", ids)
mpMap := make(map[uint]goods.MainPhoto)
for _, v := range mainPhotoList {
@ -243,7 +243,7 @@ func GetGoodsRespByInfoList(goodsList []goods.Information, userID uint, isSale b
}
var brandList []goods.Brand
mysql2.Db.First(&brandList, "id in (?)", bids)
mysql2.Db.Find(&brandList, "id in (?)", bids)
brandMap := make(map[uint]goods.Brand)
for _, v := range brandList {
brandMap[v.ID] = v

Loading…
Cancel
Save