Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -589,6 +589,8 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
|
||||
}
|
||||
}
|
||||
|
||||
// 直接返回的 原因是,一个订单在达达发布多次运单时,QueryOrderInfo获取到的运单始终是最后一个运单的配送价格!所以直接返回算了!
|
||||
return localPrice, nil
|
||||
// 平台状态兑换金额
|
||||
var vendorPrice int64 = 0
|
||||
// 未接单不扣款
|
||||
|
||||
@@ -88,12 +88,11 @@ func (c *DeliveryHandler) onWaybillMsg(msg *mtpsapi.CallbackOrderMsg) (retVal *m
|
||||
order := c.callbackMsg2Waybill(msg)
|
||||
// 多次取消,只处理第一次
|
||||
if msg.Status == mtpsapi.OrderStatusCanceled {
|
||||
bill, err := partner.CurOrderManager.LoadWaybill(msg.MtPeisongID, model.VendorIDMTPS)
|
||||
if err != nil {
|
||||
return mtpsapi.Err2CallbackResponse(err, fmt.Sprintf("%s", "获取订单状态错误"))
|
||||
}
|
||||
if bill.Status == model.OrderStatusCanceled {
|
||||
return mtpsapi.SuccessResponse
|
||||
orderStatus, _ := orderman.FixedOrderManager.GetWayBillStatusList(msg.OrderID, msg.MtPeisongID, model.VendorIDMTPS)
|
||||
for _, v := range orderStatus {
|
||||
if v.VendorStatus == "99" {
|
||||
return mtpsapi.SuccessResponse
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -290,6 +290,14 @@ func (d DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeison
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) GetWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2 string) (tipFee int64, err error) {
|
||||
return api.SfPsAPI.QueryTipFee(vendorWaybillID)
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) UpdateWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2, cityCode string, tipFee int64) (err error) {
|
||||
return api.SfPsAPI.AddTipFee(vendorWaybillID, tipFee)
|
||||
}
|
||||
|
||||
// OnWaybillMsg 配送状态更改回调
|
||||
func OnWaybillMsg(urlIndex string, msg interface{}) (resp *sfps2.CallbackResponse) {
|
||||
order := GetWaybillByStatus(urlIndex, msg)
|
||||
|
||||
@@ -198,6 +198,20 @@ func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo
|
||||
return deliveryFeeInfo, err
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) GetWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2 string) (tipFee int64, err error) {
|
||||
// uu跑腿没有获取小费的接口,直接返回系统支付的金额
|
||||
//order, err := api.UuAPI.GetOrderDetail(vendorOrderID)
|
||||
//if err == nil {
|
||||
// tipFee = jxutils.StandardPrice2Int(order.Tips)
|
||||
//}
|
||||
//return tipFee, err
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) UpdateWaybillTip(ctx *jxcontext.Context, vendorOrgCode, vendorStoreID, vendorOrderID, vendorWaybillID, vendorWaybillID2, cityCode string, tipFee int64) (err error) {
|
||||
return api.UuAPI.AddTip(vendorOrderID, vendorWaybillID, int(tipFee))
|
||||
}
|
||||
|
||||
func (d DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
|
||||
return fmt.Errorf("UU跑腿暂不支持此操作")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user