From bc54e2fb35ee9817974c8983ecf5dcca2ecec604 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 23 Jun 2023 21:34:30 +0800 Subject: [PATCH] =?UTF-8?q?mall=20+=20order=EF=BC=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/order/TradeOrderController.java | 7 +++---- .../admin/order/vo/TradeOrderPageItemRespVO.java | 1 + .../module/trade/convert/order/TradeOrderConvert.java | 11 ----------- .../trade/dal/mysql/order/TradeOrderMapper.java | 2 +- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/TradeOrderController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/TradeOrderController.java index 741f187f3..6dc8f2b7b 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/TradeOrderController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/TradeOrderController.java @@ -56,9 +56,8 @@ public class TradeOrderController { return success(PageResult.empty()); } - //查询用户信息 mod by 矿泉水 20230614 begin - Map userRespVOMap = memberUserApi.getUserMap(convertSet(pageResult.getList(),TradeOrderDO::getUserId));; - // end + // 查询用户信息 + Map userMap = memberUserApi.getUserMap(convertSet(pageResult.getList(), TradeOrderDO::getUserId));; // 查询订单项 List orderItems = tradeOrderService.getOrderItemListByOrderId( convertSet(pageResult.getList(), TradeOrderDO::getId)); @@ -66,7 +65,7 @@ public class TradeOrderController { List propertyValueDetails = productPropertyValueApi .getPropertyValueDetailList(TradeOrderConvert.INSTANCE.convertPropertyValueIds(orderItems)); // 最终组合 - return success(TradeOrderConvert.INSTANCE.convertPage(pageResult, orderItems, propertyValueDetails, userRespVOMap)); + return success(TradeOrderConvert.INSTANCE.convertPage(pageResult, orderItems, propertyValueDetails, userMap)); } @GetMapping("/get-detail") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/vo/TradeOrderPageItemRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/vo/TradeOrderPageItemRespVO.java index 5891801a7..b0def5a83 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/vo/TradeOrderPageItemRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/vo/TradeOrderPageItemRespVO.java @@ -19,6 +19,7 @@ public class TradeOrderPageItemRespVO extends TradeOrderBaseVO { */ private List items; + // TODO @xiaobai:使用 MemberUserRespVO 返回哈;DTO 不直接给前端 /** * 用户信息 */ diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java index 9ca84b761..f4c0d3736 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java @@ -119,15 +119,6 @@ public interface TradeOrderConvert { } // TODO 芋艿:可简化 - - /** - * - * @param pageResult - * @param orderItems - * @param propertyValueDetails - * @param memberUserRespDTOMap 新增参数会员DTO - * @return - */ default PageResult convertPage(PageResult pageResult, List orderItems, List propertyValueDetails, Map memberUserRespDTOMap) { @@ -158,10 +149,8 @@ public interface TradeOrderConvert { } // 处理收货地址 orderVO.setReceiverAreaName(AreaUtils.format(order.getReceiverAreaId())); - // 增加用户昵称 orderVO.setUser(memberUserRespDTOMap.get(orderVO.getUserId())); - return orderVO; }); return new PageResult<>(orderVOs, pageResult.getTotal()); diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java index 04e7d9d2c..dadb762f9 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/order/TradeOrderMapper.java @@ -33,7 +33,7 @@ public interface TradeOrderMapper extends BaseMapperX { .eqIfPresent(TradeOrderDO::getType, reqVO.getType()) .eqIfPresent(TradeOrderDO::getStatus, reqVO.getStatus()) .eqIfPresent(TradeOrderDO::getPayChannelCode, reqVO.getPayChannelCode()) - .eqIfPresent(TradeOrderDO::getTerminal,reqVO.getTerminal()) //add by 矿泉水 20230615 + .eqIfPresent(TradeOrderDO::getTerminal,reqVO.getTerminal()) .betweenIfPresent(TradeOrderDO::getCreateTime, reqVO.getCreateTime())); }