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) {