Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -86,7 +86,7 @@ func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int,
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
|
||||
err = api.FnAPI.ComplaintRider(bill.VendorOrderID, complaintReson2FnResonMap[resonID])
|
||||
err = api.FnAPI.ComplaintRider(bill.VendorOrderID, bill.VendorWaybillID, complaintReson2FnResonMap[resonID], resonContent)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -523,14 +523,14 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
|
||||
return 0, err
|
||||
}
|
||||
|
||||
isMerchantCancel := false
|
||||
// 获取发起取消的人员
|
||||
for _, v := range statusList {
|
||||
if v.VendorStatus == utils.Int64ToStr(model.WaybillStatusCancel) {
|
||||
isMerchantCancel = true // 商户取消
|
||||
break
|
||||
}
|
||||
}
|
||||
//isMerchantCancel := false
|
||||
//// 获取发起取消的人员
|
||||
//for _, v := range statusList {
|
||||
// if v.VendorStatus == utils.Int64ToStr(model.WaybillStatusCancel) {
|
||||
// isMerchantCancel = true // 商户取消
|
||||
// break
|
||||
// }
|
||||
//}
|
||||
|
||||
bill, err := partner.CurOrderManager.LoadWaybill(deliverId, model.VendorIDMTPS)
|
||||
if err != nil {
|
||||
@@ -549,17 +549,17 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
|
||||
}
|
||||
// 到店
|
||||
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusPickedUp) {
|
||||
if isMerchantCancel {
|
||||
return bill.DesiredFee, nil
|
||||
}
|
||||
return 0, nil
|
||||
//if isMerchantCancel {
|
||||
return bill.DesiredFee, nil
|
||||
//}
|
||||
//return 0, nil
|
||||
}
|
||||
// 接单
|
||||
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusAccepted) {
|
||||
if isMerchantCancel {
|
||||
return 200, nil
|
||||
}
|
||||
return 0, nil
|
||||
//if isMerchantCancel {
|
||||
return 200, nil
|
||||
//}
|
||||
//return 0, nil
|
||||
}
|
||||
// 待调度
|
||||
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusWaitingForSchedule) {
|
||||
|
||||
@@ -96,14 +96,14 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (v.WaybillVendorID == model.YES || v.WaybillVendorID == -1) && v.VendorID == model.VendorIDMTWM {
|
||||
continue
|
||||
}
|
||||
//if (v.WaybillVendorID == model.YES || v.WaybillVendorID == -1) && v.VendorID == model.VendorIDMTWM {
|
||||
// continue
|
||||
//}
|
||||
|
||||
if orderId == "" { // 订单id为空是,是定时轮询操作,不做此状态
|
||||
waybillList, _ := dao.GetWaybills(dao.GetDB(), v.VendorOrderID, nil)
|
||||
if len(waybillList) > 0 && waybillList[0].Status > model.WaybillStatusEndBegin {
|
||||
globals.SugarLogger.Debugf("订单物流状态结束,不在推送订单状态:orderID[%s],wayBillId[%s]", v.VendorOrderID, waybillList[0].VendorWaybillID)
|
||||
globals.SugarLogger.Debug("订单物流状态结束,不在推送订单状态:orderID[%s],wayBillId[%s]", v.VendorOrderID, waybillList[0].VendorWaybillID)
|
||||
continue
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,14 @@ func UpdateFakeWayBillToTiktok() {
|
||||
|
||||
// 设置骑手和下一状态时间
|
||||
makeRiderInfo(fakeWayBill[i], riderInfo)
|
||||
|
||||
if riderInfo.CourierName == "" && fakeWayBill[i].CourierName != "" {
|
||||
riderInfo.CourierName = fakeWayBill[i].CourierName
|
||||
riderInfo.CourierPhone = fakeWayBill[i].CourierMobile
|
||||
}
|
||||
if riderInfo.CourierName == "" && fakeWayBill[i].CourierName == "" {
|
||||
riderInfo.CourierName = "石锋"
|
||||
riderInfo.CourierPhone = "18048531223"
|
||||
}
|
||||
if riderInfo.LogisticsContext != model.RiderGetOrderDeliverFailed && riderInfo.LogisticsContext != model.RiderGetOrderDeliverOther && riderInfo.LogisticsContext != model.RiderWaitRider {
|
||||
riderInfo.LogisticsContext = fmt.Sprintf(riderInfo.LogisticsContext, riderInfo.CourierName, riderInfo.CourierPhone)
|
||||
}
|
||||
@@ -452,7 +459,7 @@ func UpdateFakeWayBillToTiktok() {
|
||||
globals.SugarLogger.Debugf("UPDATA goods_order Err :%s", err.Error())
|
||||
}
|
||||
// 饿百订单推送订单送达
|
||||
if fakeWayBill[i].OrderVendorID == model.VendorIDEBAI || fakeWayBill[i].OrderVendorID == model.VendorIDMTWM {
|
||||
if fakeWayBill[i].OrderVendorID == model.VendorIDEBAI || fakeWayBill[i].OrderVendorID == model.VendorIDTaoVegetable || fakeWayBill[i].OrderVendorID == model.VendorIDMTWM {
|
||||
if err := handler.Swtich2SelfDelivered(order, "JingXiAdmin"); err != nil {
|
||||
globals.SugarLogger.Errorf("Swtich2SelfDelivered err := %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user