From 5d11ef86d211f428584dd913e6de0c5435300794 Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Tue, 25 Mar 2025 21:59:14 +0800 Subject: [PATCH] this is 3.24 update --- .../controller/order/OrderController.java | 64 ------------------- .../heritage/utils/TimeSplitterUtils.java | 2 +- 2 files changed, 1 insertion(+), 65 deletions(-) diff --git a/src/main/java/com/cultural/heritage/controller/order/OrderController.java b/src/main/java/com/cultural/heritage/controller/order/OrderController.java index 3d02c97..928a26c 100644 --- a/src/main/java/com/cultural/heritage/controller/order/OrderController.java +++ b/src/main/java/com/cultural/heritage/controller/order/OrderController.java @@ -257,29 +257,6 @@ public class OrderController { orderVO.setOrderItemList(orderItemsTempList); } - // TODO -// for (OrderVO orderVO : orderVOS) { -// boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); -// List orderItemList = orderVO.getOrderItemList(); -// for (OrderItems orderItems : orderItemList) { -// GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); -// String goodImg = goodSnapshot.getGoodImg(); -// if (isGeneral) { -// String[] goodImgArr = goodImg.split(";"); -// for (int i = 0; i < goodImgArr.length; i++) { -// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; -// } -// String joinImg = String.join(";", goodImgArr); -// goodSnapshot.setGoodImg(joinImg); -// } else { -// goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); -// } -// orderItems.setGoodSnapshot(goodSnapshot); -// } -// orderVO.setOrderItemList(orderItemList); -// } - - Page orderVOPage = new Page<>(); orderVOPage.setRecords(orderVOS); orderVOPage.setTotal(page.getTotal()); @@ -333,28 +310,6 @@ public class OrderController { orderVO.setOrderItemList(orderItemsList); return orderVO; }).toList(); - - // TODO -// for (OrderVO orderVO : orderVOS) { -// boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); -// List orderItemList = orderVO.getOrderItemList(); -// for (OrderItems orderItems : orderItemList) { -// GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); -// String goodImg = goodSnapshot.getGoodImg(); -// if (isGeneral) { -// String[] goodImgArr = goodImg.split(";"); -// for (int i = 0; i < goodImgArr.length; i++) { -// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; -// } -// String joinImg = String.join(";", goodImgArr); -// goodSnapshot.setGoodImg(joinImg); -// } else { -// goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); -// } -// orderItems.setGoodSnapshot(goodSnapshot); -// } -// orderVO.setOrderItemList(orderItemList); -// } return ResultUtils.success(orderVOS); } @@ -402,25 +357,6 @@ public class OrderController { BeanUtils.copyProperties(order, orderVO); List orderItemsList = commonService.findByFieldEqTargetField("orderId", orderId, orderItemService); orderVO.setOrderItemList(orderItemsList); - // TODO -// boolean isGeneral = orderService.isGeneralGood(orderVO.getOrderType()); -// List orderItemList = orderVO.getOrderItemList(); -// for (OrderItems orderItems : orderItemList) { -// GoodSnapshot goodSnapshot = orderItems.getGoodSnapshot(); -// String goodImg = goodSnapshot.getGoodImg(); -// if (isGeneral) { -// String[] goodImgArr = goodImg.split(";"); -// for (int i = 0; i < goodImgArr.length; i++) { -// goodImgArr[i] = FileConstant.SERVER_HOST + goodImgArr[i]; -// } -// String joinImg = String.join(";", goodImgArr); -// goodSnapshot.setGoodImg(joinImg); -// } else { -// goodSnapshot.setGoodImg(FileConstant.SERVER_HOST + goodSnapshot.getGoodImg()); -// } -// orderItems.setGoodSnapshot(goodSnapshot); -// } -// orderVO.setOrderItemList(orderItemList); return ResultUtils.success(orderVO); } diff --git a/src/main/java/com/cultural/heritage/utils/TimeSplitterUtils.java b/src/main/java/com/cultural/heritage/utils/TimeSplitterUtils.java index dcd234d..69efd7c 100644 --- a/src/main/java/com/cultural/heritage/utils/TimeSplitterUtils.java +++ b/src/main/java/com/cultural/heritage/utils/TimeSplitterUtils.java @@ -7,7 +7,7 @@ public class TimeSplitterUtils { public static List splitTime(long totalSeconds) { List timeIntervals = new ArrayList<>(); - long oneDayInSeconds = 86400; // 1天的秒数 + long oneDayInSeconds = 864000; // 10天的秒数 // 拆分完整的天数 while (totalSeconds >= oneDayInSeconds) {