Commit b4d186e5 by mushishixian

fix

parent e5b95d4e
Showing with 18 additions and 9 deletions
......@@ -168,17 +168,26 @@ func getUpdateGoodsData(bomId int, bomItems []model.BomItem, deliveryType, sort
var ziyingGoodsMapList []GoodsMap
//如果是大陆收货(type=1),就要包含专卖,其中自营单独查
if deliveryType == 1 {
//先去自营查一遍
ziyingGoodsMapList, err = search("liexin_ziying", bomId, bomItems, deliveryType, sort, client, rawSearch)
if err != nil {
return nil, err
//如果是综合排序(sort=1)
if sort == 1 {
//先去自营查一遍
ziyingGoodsMapList, err = search("liexin_ziying", bomId, bomItems, deliveryType, sort, client, rawSearch)
if err != nil {
return nil, err
}
index = index + ",zhuanmai"
//查完以后去除已经匹配的自营商品,然后去搜索联营的商品
bomItems = removeZiyingMatchBomItem(ziyingGoodsMapList, bomItems)
lianyingGoodsMapList, _ := search(index, bomId, bomItems, deliveryType, sort, client, rawSearch)
goodsMapList = append(ziyingGoodsMapList, lianyingGoodsMapList...)
} else {
index = index + ",zhuanmai,liexin_ziying"
goodsMapList, err = search(index, bomId, bomItems, deliveryType, sort, client, rawSearch)
if err != nil {
return nil, err
}
}
index = index + ",zhuanmai"
}
//查完以后去除已经匹配的自营商品,然后去搜索联营的商品
bomItems = removeZiyingMatchBomItem(ziyingGoodsMapList, bomItems)
lianyingGoodsMapList, _ := search(index, bomId, bomItems, deliveryType, sort, client, rawSearch)
goodsMapList = append(ziyingGoodsMapList, lianyingGoodsMapList...)
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment