From f84b396b80e16c221e5360ebb40ef1edf0b95410 Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Sat, 22 Mar 2025 15:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/order/ClothesRentOrderController.java | 4 ++-- .../cultural/heritage/model/entity/ClothesRentOrder.java | 8 ++++++++ .../model/vo/clothesRentOrder/ClothesRentOrderVO.java | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cultural/heritage/controller/order/ClothesRentOrderController.java b/src/main/java/com/cultural/heritage/controller/order/ClothesRentOrderController.java index 93c75e5..1620f0e 100644 --- a/src/main/java/com/cultural/heritage/controller/order/ClothesRentOrderController.java +++ b/src/main/java/com/cultural/heritage/controller/order/ClothesRentOrderController.java @@ -1,6 +1,7 @@ package com.cultural.heritage.controller.order; +import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -264,6 +265,7 @@ public class ClothesRentOrderController { UpdateWrapper updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("id", id); updateWrapper.set("orderStatus", orderStatus); + if (orderStatus.equals(OrderStatusConstant.PENDING_DELIVERY)) updateWrapper.set("pickupTime", DateUtil.now()); boolean result = clothesRentOrderService.update(updateWrapper); ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR, "订单状态不存在或订单状态更新失败"); @@ -275,6 +277,4 @@ public class ClothesRentOrderController { return ResultUtils.success(true); } - - } diff --git a/src/main/java/com/cultural/heritage/model/entity/ClothesRentOrder.java b/src/main/java/com/cultural/heritage/model/entity/ClothesRentOrder.java index b9c585f..aee64ed 100644 --- a/src/main/java/com/cultural/heritage/model/entity/ClothesRentOrder.java +++ b/src/main/java/com/cultural/heritage/model/entity/ClothesRentOrder.java @@ -65,6 +65,13 @@ public class ClothesRentOrder implements Serializable { */ private BigDecimal totalAmount; + + /** + * 取货时间 + */ + private String pickupTime; + + /** * 创建时间 */ @@ -80,6 +87,7 @@ public class ClothesRentOrder implements Serializable { */ private Integer isDelete; + @Serial private static final long serialVersionUID = 1L; } diff --git a/src/main/java/com/cultural/heritage/model/vo/clothesRentOrder/ClothesRentOrderVO.java b/src/main/java/com/cultural/heritage/model/vo/clothesRentOrder/ClothesRentOrderVO.java index c079e32..7da2595 100644 --- a/src/main/java/com/cultural/heritage/model/vo/clothesRentOrder/ClothesRentOrderVO.java +++ b/src/main/java/com/cultural/heritage/model/vo/clothesRentOrder/ClothesRentOrderVO.java @@ -59,6 +59,13 @@ public class ClothesRentOrderVO implements Serializable { */ private BigDecimal totalAmount; + + /** + * 取货时间 + */ + private String pickupTime; + + /** * 订单创建时间 */