配送相关接口调整
This commit is contained in:
@@ -173,14 +173,18 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
||||
item.GoodCount += goodItem.GoodCount
|
||||
}
|
||||
}
|
||||
addParams := map[string]interface{}{
|
||||
"note": utils.FilterMb4(order.BuyerComment),
|
||||
"goods_detail": string(utils.MustMarshal(goods)),
|
||||
"goods_pickup_info": fmt.Sprintf("%s第%d号单", model.VendorChineseNames[order.VendorID], order.OrderSeq),
|
||||
"poi_seq": fmt.Sprintf("#%d", order.OrderSeq),
|
||||
}
|
||||
// addParams := map[string]interface{}{
|
||||
// "note": utils.FilterMb4(order.BuyerComment),
|
||||
// "goods_detail": string(utils.MustMarshal(goods)),
|
||||
// "goods_pickup_info": fmt.Sprintf("%s第%d号单", model.VendorChineseNames[order.VendorID], order.OrderSeq),
|
||||
// "poi_seq": fmt.Sprintf("#%d", order.OrderSeq),
|
||||
// }
|
||||
billParams.Note = utils.FilterMb4(order.BuyerComment)
|
||||
billParams.GoodsDetail = string(utils.MustMarshal(goods))
|
||||
billParams.GoodsPickupInfo = fmt.Sprintf("%s第%d号单", model.VendorChineseNames[order.VendorID], order.OrderSeq)
|
||||
billParams.PoiSeq = fmt.Sprintf("#%d", order.OrderSeq)
|
||||
if globals.EnableStoreWrite {
|
||||
result, err2 := api.MtpsAPI.CreateOrderByShop(billParams, addParams)
|
||||
result, err2 := api.MtpsAPI.CreateOrderByShop2(billParams)
|
||||
if err = err2; err == nil {
|
||||
bill = &model.Waybill{
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
@@ -192,7 +196,7 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
||||
}
|
||||
delivery.OnWaybillCreated(bill)
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("CreateWaybill failed, orderID:%s, billParams:%v, addParams:%v, error:%v", order.VendorOrderID, billParams, addParams, err)
|
||||
globals.SugarLogger.Debugf("CreateWaybill failed, orderID:%s, billParams:%v, error:%v", order.VendorOrderID, billParams, err)
|
||||
}
|
||||
} else {
|
||||
err = fmt.Errorf("测试环境不能真正创建运单")
|
||||
|
||||
Reference in New Issue
Block a user