From e745bb667504424801f140b7f8e4ac2c4e57e806 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 20 May 2023 11:22:43 +0800 Subject: [PATCH] =?UTF-8?q?mall=EF=BC=9A=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/trade/enums/order/TradeOrderTypeEnum.java | 7 +++++-- .../controller/app/order/AppTradeOrderController.java | 3 +++ .../app/order/vo/AppTradeOrderPageItemRespVO.java | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java index c8001b490..34e47a12e 100644 --- a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderTypeEnum.java @@ -17,8 +17,11 @@ public enum TradeOrderTypeEnum implements IntArrayValuable { NORMAL(0, "普通订单"), SECKILL(1, "秒杀订单"), - TEAM(2, "拼团订单"), - BARGAIN(3, "砍价订单"); + // TODO 芋艿:如下三个字段,名字需要改下,等后面表设计完成后。 + KANJIA(2, "砍价订单"), + PINTUAN(3, "拼团订单"), + YUSHOU(4, "预售订单"), + ; public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TradeOrderTypeEnum::getType).toArray(); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java index 714851c69..defab3c50 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.java @@ -180,8 +180,11 @@ public class AppTradeOrderController { orderCount.put("allCount", tradeOrderService.getOrderCount(getLoginUserId(), null, null)); // 待付款(未支付) orderCount.put("unpaidCount", tradeOrderService.getOrderCount(getLoginUserId(), TradeOrderStatusEnum.UNPAID.getStatus(), null)); + // 待发货 orderCount.put("undeliveredCount", tradeOrderService.getOrderCount(getLoginUserId(), TradeOrderStatusEnum.UNDELIVERED.getStatus(), null)); + // 待收货 orderCount.put("deliveredCount", tradeOrderService.getOrderCount(getLoginUserId(), TradeOrderStatusEnum.DELIVERED.getStatus(), null)); + // 待评价 orderCount.put("uncommentedCount", tradeOrderService.getOrderCount(getLoginUserId(), TradeOrderStatusEnum.COMPLETED.getStatus(), false)); return success(orderCount); } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderPageItemRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderPageItemRespVO.java index 45a87082a..7e87280de 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderPageItemRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeOrderPageItemRespVO.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.trade.controller.app.order.vo.item.AppTradeOrderI import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.Date; import java.util.List; @Schema(description = "用户 App - 订单交易的分页项 Response VO") @@ -16,6 +17,9 @@ public class AppTradeOrderPageItemRespVO { @Schema(description = "订单流水号", required = true, example = "1146347329394184195") private String no; + @Schema(description = "订单类型", required = true, example = "0") + private Integer type; + @Schema(description = "订单状态", required = true, example = "1") private Integer status; @@ -25,6 +29,9 @@ public class AppTradeOrderPageItemRespVO { @Schema(description = "是否评价", required = true, example = "true") private Boolean commentStatus; + @Schema(description = "创建时间", required = true) + private Date createTime; + // ========== 价格 + 支付基本信息 ========== @Schema(description = "应付金额,单位:分", required = true, example = "1000")