1
This commit is contained in:
@@ -185,19 +185,19 @@ func (c *PurchaseHandler) onAfsOrderMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaia
|
||||
dao.UpdateEntity(db, afs, "Status", "VendorStatus", "Flag")
|
||||
}
|
||||
|
||||
if orderStatus.Status == model.AfsOrderStatusFinished {
|
||||
goodsOrder, _ := partner.CurOrderManager.LoadOrder(orderStatus.RefVendorOrderID, model.VendorIDEBAI)
|
||||
afsSkuList, _ := dao.GetOrderRefundSkuList(db, []string{goodsOrder.VendorOrderID})
|
||||
var afsSku int = 0
|
||||
for _, v := range afsSkuList {
|
||||
afsSku += v.Count
|
||||
}
|
||||
if afsSku == goodsOrder.GoodsCount && goodsOrder.GoodsCount != 0 {
|
||||
goodsOrder.Status = model.OrderStatusCanceled
|
||||
goodsOrder.VendorStatus = orderStatus.VendorStatus
|
||||
dao.UpdateEntity(db, goodsOrder, "Status", "VendorStatus")
|
||||
}
|
||||
}
|
||||
//if orderStatus.Status == model.AfsOrderStatusFinished {
|
||||
// goodsOrder, _ := partner.CurOrderManager.LoadOrder(orderStatus.RefVendorOrderID, model.VendorIDEBAI)
|
||||
// afsSkuList, _ := dao.GetOrderRefundSkuList(db, []string{goodsOrder.VendorOrderID})
|
||||
// var afsSku int = 0
|
||||
// for _, v := range afsSkuList {
|
||||
// afsSku += v.Count
|
||||
// }
|
||||
// if afsSku == goodsOrder.GoodsCount && goodsOrder.GoodsCount != 0 {
|
||||
// goodsOrder.Status = model.OrderStatusCanceled
|
||||
// goodsOrder.VendorStatus = orderStatus.VendorStatus
|
||||
// dao.UpdateEntity(db, goodsOrder, "Status", "VendorStatus")
|
||||
// }
|
||||
//}
|
||||
|
||||
retVal = api.EbaiAPI.Err2CallbackResponse(msg.Cmd, err, nil)
|
||||
}
|
||||
|
||||
@@ -124,6 +124,10 @@ func (c *PurchaseHandler) onOrderMsg(a *jdapi.API, msg *jdapi.CallbackOrderMsg)
|
||||
retVal = jdapi.Err2CallbackResponse(err, status.VendorStatus)
|
||||
}
|
||||
}
|
||||
if status.Status == model.OrderStatusFinished {
|
||||
c.OnFinancialMsg(msg)
|
||||
jdapi.Err2CallbackResponse(c.updateOrderFinancialInfo(a, msg.BillID), status.VendorStatus)
|
||||
}
|
||||
}
|
||||
return retVal
|
||||
}
|
||||
@@ -700,5 +704,5 @@ func (c *PurchaseHandler) GetPlatformLogisticsFee(order *model.GoodsOrder) (int6
|
||||
|
||||
// ApplyCompensationOrder 订单索赔
|
||||
func (c *PurchaseHandler) ApplyCompensationOrder(order *model.GoodsOrder) (string, error) {
|
||||
return "",nil
|
||||
return "", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user