This commit is contained in:
suyl
2021-10-22 16:40:25 +08:00
parent 22ebe82f8e
commit 1607e9cfa8
3 changed files with 6 additions and 4 deletions

View File

@@ -1918,9 +1918,9 @@ func UpdateJdsOrdersStatus(ctx *jxcontext.Context, orderCreatedStart, orderCreat
)
orderResult, err := jdshop.CurPurchaseHandler.GetJdsOrders(ctx, utils.Time2Str(orderCreatedStart), utils.Time2Str(orderCreatedEnd), 1, pageSize)
if orderResult.TotalCount > pageSize {
for pageNO := 2; pageNO < orderResult.TotalCount/pageSize+1; pageNO++ {
orderResult, _ := jdshop.CurPurchaseHandler.GetJdsOrders(ctx, utils.Time2Str(orderCreatedStart), utils.Time2Str(orderCreatedEnd), pageNO, pageSize)
for _, order := range orderResult.OrderList {
for pageNO := 1; pageNO < orderResult.TotalCount/pageSize+1; pageNO++ {
orderResult2, _ := jdshop.CurPurchaseHandler.GetJdsOrders(ctx, utils.Time2Str(orderCreatedStart), utils.Time2Str(orderCreatedEnd), pageNO, pageSize)
for _, order := range orderResult2.OrderList {
if order.OrderStatus == jdshopapi.OrderStatusCancelm2 {
orderIDs = append(orderIDs, order.OrderID)
}