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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user