订单修改
This commit is contained in:
@@ -1014,6 +1014,7 @@ func SaveJdsOrders(ctx *jxcontext.Context, orderCreatedStart, orderCreatedEnd ti
|
|||||||
}
|
}
|
||||||
for _, order := range orders {
|
for _, order := range orders {
|
||||||
// partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order))
|
// 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)
|
noticeMsg := fmt.Sprintf("京东商城新订单,订单号:[%v] ,将要发到的门店id:[%v] , 门店名:[%v]", order.VendorOrderID, order.StoreID, order.StoreName)
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "DDC5657B43EE11E9A9FF525400E86DC0", "京东商城来新订单了!", noticeMsg)
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "DDC5657B43EE11E9A9FF525400E86DC0", "京东商城来新订单了!", noticeMsg)
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "1439B3E07D3911EA881A525400E86DC0", "京东商城来新订单了!", 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) {
|
func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (orders []*model.GoodsOrder, err error) {
|
||||||
for _, jdsOrder := range result.OrderList {
|
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
|
continue
|
||||||
}
|
}
|
||||||
orderDetail, err := api.JdShopAPI.OrderDetail(utils.Int64ToStr(jdsOrder.OrderID))
|
orderDetail, err := api.JdShopAPI.OrderDetail(utils.Int64ToStr(jdsOrder.OrderID))
|
||||||
|
|||||||
Reference in New Issue
Block a user