From c7d127ae867c00f01a7eb4977836565bcae6ee9f Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期三, 11 十二月 2024 11:29:56 +0800 Subject: [PATCH] 1.财务报表-部分统计字段新增 2.合伙人报表-部分统计字段新增 --- src/main/java/com/mzl/flower/service/payment/OrderService.java | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/mzl/flower/service/payment/OrderService.java b/src/main/java/com/mzl/flower/service/payment/OrderService.java index 497b07c..69a4c85 100644 --- a/src/main/java/com/mzl/flower/service/payment/OrderService.java +++ b/src/main/java/com/mzl/flower/service/payment/OrderService.java @@ -495,6 +495,19 @@ usePointGoods(order.getId(), goodsRecordIdList);//使用积分商品兑换券 order.create(userId); + // 根据当前的时间判断,如果时间大于当天的下午17:00 ,那么日期则为下一天的日期,否则为当天日期 + if(null!=order.getCreateTime()){ + LocalDateTime createDateTime = order.getCreateTime(); + LocalDate createDate = createDateTime.toLocalDate(); + LocalDateTime today1700 = createDateTime.with(LocalTime.of(17, 0)); + // 比较时间是否大于当天的 17:00 + if (createDateTime.isAfter(today1700)) { + // 如果大于 17:00,设置为下一天的日期 + createDate = createDate.plusDays(1); + } + order.setCreateDateSta(createDate); + } +// order.setCreateDate(); order.setRemarks(dto.getRemarks()); order.setSpecialNeeds(dto.getSpecialNeeds()); order.setStatusBackend(Constants.ORDER_STATUS_BACKEND.PENDING.name()); @@ -1798,4 +1811,11 @@ exportOrderDetail(response, dto); } + public void refreshDate() { + List<Order> allOrderList= orderMapper.selectAllDateList(); + + allOrderList.forEach(order -> { + orderMapper.updatePaymentCreateDate(order); + }); + } } -- Gitblit v1.9.3