刷新物料哦订单状态判断
This commit is contained in:
@@ -418,6 +418,8 @@ func doDailyWork2() {
|
||||
cms.CurVendorSync.SyncJdsStoresSkus(jxcontext.AdminCtx, nil, true, true)
|
||||
//刷新京东商城的门店库存
|
||||
cms.SyncJdsStoreStock(jxcontext.AdminCtx, true, true)
|
||||
//刷新京东商城订单结算价
|
||||
orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, time.Now().AddDate(0, 0, -2).Format("20060102"), time.Now().Format("20060102"))
|
||||
}
|
||||
|
||||
func doDailyWork() {
|
||||
@@ -451,8 +453,6 @@ func doDailyWork() {
|
||||
localjx.RefreshAllMatterOrderStatus(jxcontext.AdminCtx)
|
||||
//同步银豹到京西
|
||||
// cms.CurVendorSync.SyncStoreSkusFromYb(jxcontext.AdminCtx, nil, true, true)
|
||||
//刷新京东商城订单结算价
|
||||
orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, time.Now().AddDate(0, 0, -2).Format("20060102"), time.Now().Format("20060102"))
|
||||
//同步上架京东商城待售商品
|
||||
cms.RefreshJdsSkusStatus(jxcontext.AdminCtx)
|
||||
//同步美团配送与否状态及美团门店是否存在
|
||||
|
||||
@@ -1642,26 +1642,28 @@ func RefreshAllMatterOrderStatus(ctx *jxcontext.Context) (err error) {
|
||||
cancelCount++
|
||||
}
|
||||
}
|
||||
dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db)
|
||||
panic(r)
|
||||
if len(goodsList2) > 0 {
|
||||
dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db)
|
||||
panic(r)
|
||||
}
|
||||
}()
|
||||
if deliveringCount == 0 {
|
||||
v.Status = model.OrderStatusFinished
|
||||
} else {
|
||||
if cancelCount == len(goodsList2) {
|
||||
v.Status = model.OrderStatusCanceled
|
||||
}
|
||||
}
|
||||
}()
|
||||
if deliveringCount == 0 {
|
||||
v.Status = model.OrderStatusFinished
|
||||
} else {
|
||||
if cancelCount == len(goodsList2) {
|
||||
if v.Status < model.OrderStatusDelivering {
|
||||
v.Status = model.OrderStatusCanceled
|
||||
}
|
||||
dao.UpdateEntity(db, v, "Status")
|
||||
dao.Commit(db)
|
||||
changeOrderStatus(v.VendorOrderID, v.Status, "")
|
||||
}
|
||||
if v.Status < model.OrderStatusDelivering {
|
||||
v.Status = model.OrderStatusCanceled
|
||||
}
|
||||
dao.UpdateEntity(db, v, "Status")
|
||||
dao.Commit(db)
|
||||
changeOrderStatus(v.VendorOrderID, v.Status, "")
|
||||
} else {
|
||||
queryOrderStatus, _ := api.JdEclpAPI.QueryOrderStatus(v.EclpOutID)
|
||||
getTrackMessagePlusByOrderResult, _ := api.JdEclpAPI.GetTrackMessagePlusByOrder(v.VendorOrderID)
|
||||
|
||||
Reference in New Issue
Block a user