1
This commit is contained in:
@@ -230,7 +230,7 @@ func (c *BaseScheduler) AgreeOrRefuseRefund(ctx *jxcontext.Context, afsOrderID s
|
||||
)
|
||||
waybills, _ := dao.GetWaybills(db, order.VendorOrderID)
|
||||
//美团的订单如果是同意全部退款,要取消所有三方运单并停止调度
|
||||
if order.VendorID == model.VendorIDMTWM {
|
||||
if order.VendorID == model.VendorIDMTWM || order.VendorID == model.VendorIDJX {
|
||||
var (
|
||||
afsCount, orderCount int
|
||||
)
|
||||
@@ -242,13 +242,19 @@ func (c *BaseScheduler) AgreeOrRefuseRefund(ctx *jxcontext.Context, afsOrderID s
|
||||
orderCount += v.Count
|
||||
}
|
||||
//如果售后退款的商品数等于订单商品数,我就当是全部退款了
|
||||
if afsCount == orderCount {
|
||||
if afsCount == orderCount && order.VendorID == model.VendorIDMTWM {
|
||||
order.DeliveryFlag |= model.OrderDeliveryFlagMaskScheduleDisabled
|
||||
partner.CurOrderManager.UpdateOrderFields(order, []string{"DeliveryFlag"})
|
||||
for _, v := range waybills {
|
||||
c.CancelWaybill(v, partner.CancelWaybillReasonOther, partner.CancelWaybillReasonStrActive)
|
||||
}
|
||||
}
|
||||
if afsCount == orderCount && order.VendorID == model.VendorIDJX {
|
||||
order.DeliveryFlag |= model.OrderDeliveryFlagMaskScheduleDisabled
|
||||
order.Status = model.OrderStatusCanceled
|
||||
order.VendorStatus = utils.Int2Str(model.OrderStatusCanceled)
|
||||
partner.CurOrderManager.UpdateOrderFields(order, []string{"DeliveryFlag", "Status", "VendorStatus"})
|
||||
}
|
||||
}
|
||||
if order.EarningType == model.EarningTypePoints {
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user