刷新订单状态新增订单完成时间,畅销品自动关注放开城市限制

This commit is contained in:
苏尹岚
2020-01-14 18:22:21 +08:00
parent a643a324d2
commit 89f64ecc97
5 changed files with 16 additions and 12 deletions

View File

@@ -1062,11 +1062,12 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
goodsOrder := batchItemList[0].(*model.GoodsOrder)
if handler := partner.GetPurchaseOrderHandlerFromVendorID(goodsOrder.VendorID); handler != nil {
status, err2 := handler.GetOrderStatus(goodsOrder.VendorOrgCode, goodsOrder.VendorOrderID)
order, err2 := handler.GetOrder(goodsOrder.VendorOrgCode, goodsOrder.VendorOrderID)
if err = err2; err == nil {
if model.IsOrderFinalStatus(status) {
goodsOrder.Status = status
_, err = dao.UpdateEntity(db, goodsOrder, "Status")
if model.IsOrderFinalStatus(order.status) {
goodsOrder.Status = order.status
goodsOrder.OrderFinishedAt = order.OrderFinishedAt
_, err = dao.UpdateEntity(db, goodsOrder, "Status", "OrderFinishedAt")
}
}
}