记得上下班打卡 | git大法好,push需谨慎

Commit 924ed1a3 authored by 胡佳晨's avatar 胡佳晨

订单列表 倒叙

parent 471e7f6f
...@@ -59,12 +59,12 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService { ...@@ -59,12 +59,12 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
return ResponseDto.failure("参数错误"); return ResponseDto.failure("参数错误");
} }
int size = 40; int size = 40;
int initCount = (page - 1) * size; int finalCount = orderIds.size() - page * size;
int finalCount = page * size; int initCount = orderIds.size() - (page - 1) * size - 1;
if (finalCount >= orderIds.size()) { if (finalCount <= 0) {
finalCount = orderIds.size(); finalCount = 0;
} }
for (int i = initCount; i < finalCount; i++) { for (int i = initCount; i > finalCount; i--) {
String orderId = orderIds.get(i); String orderId = orderIds.get(i);
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId); GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
GoblinAppOrderListVo vo = GoblinAppOrderListVo.getNew(); GoblinAppOrderListVo vo = GoblinAppOrderListVo.getNew();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment