订单修改

This commit is contained in:
苏尹岚
2020-06-04 17:46:03 +08:00
parent 791d9e0d21
commit 80494da280

View File

@@ -1014,6 +1014,7 @@ func SaveJdsOrders(ctx *jxcontext.Context, orderCreatedStart, orderCreatedEnd ti
}
for _, order := range orders {
// partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order))
globals.SugarLogger.Debugf("SaveJdsOrders order: [%v]", order)
noticeMsg := fmt.Sprintf("京东商城新订单,订单号:[%v] ,将要发到的门店id[%v] , 门店名:[%v]", order.VendorOrderID, order.StoreID, order.StoreName)
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "DDC5657B43EE11E9A9FF525400E86DC0", "京东商城来新订单了!", noticeMsg)
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "1439B3E07D3911EA881A525400E86DC0", "京东商城来新订单了!", noticeMsg)
@@ -1024,7 +1025,12 @@ func SaveJdsOrders(ctx *jxcontext.Context, orderCreatedStart, orderCreatedEnd ti
func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (orders []*model.GoodsOrder, err error) {
for _, jdsOrder := range result.OrderList {
//等待付款的排除
if jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusWaittingPay || jdsOrder.OrderStatus == jdshopapi.JdsOrderStatusWaittingPayDel {
if jdsOrder.OrderStatus != jdshopapi.JdsOrderStatusWaittingExport && jdsOrder.OrderStatus != jdshopapi.JdsOrderStatusPause {
continue
}
//有可能是库里已经有这个订单了
orderE, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(jdsOrder.OrderID)+"01", model.VendorIDJDShop)
if orderE != nil {
continue
}
orderDetail, err := api.JdShopAPI.OrderDetail(utils.Int64ToStr(jdsOrder.OrderID))