mall + order:订单详情

This commit is contained in:
YunaiV 2023-06-23 21:34:30 +08:00
parent b92ed60136
commit bc54e2fb35
4 changed files with 5 additions and 16 deletions

View File

@ -56,9 +56,8 @@ public class TradeOrderController {
return success(PageResult.empty());
}
//查询用户信息 mod by 矿泉水 20230614 begin
Map<Long, MemberUserRespDTO> userRespVOMap = memberUserApi.getUserMap(convertSet(pageResult.getList(),TradeOrderDO::getUserId));;
// end
// 查询用户信息
Map<Long, MemberUserRespDTO> userMap = memberUserApi.getUserMap(convertSet(pageResult.getList(), TradeOrderDO::getUserId));;
// 查询订单项
List<TradeOrderItemDO> orderItems = tradeOrderService.getOrderItemListByOrderId(
convertSet(pageResult.getList(), TradeOrderDO::getId));
@ -66,7 +65,7 @@ public class TradeOrderController {
List<ProductPropertyValueDetailRespDTO> 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")

View File

@ -19,6 +19,7 @@ public class TradeOrderPageItemRespVO extends TradeOrderBaseVO {
*/
private List<Item> items;
// TODO @xiaobai使用 MemberUserRespVO 返回哈DTO 不直接给前端
/**
* 用户信息
*/

View File

@ -119,15 +119,6 @@ public interface TradeOrderConvert {
}
// TODO 芋艿可简化
/**
*
* @param pageResult
* @param orderItems
* @param propertyValueDetails
* @param memberUserRespDTOMap 新增参数会员DTO
* @return
*/
default PageResult<TradeOrderPageItemRespVO> convertPage(PageResult<TradeOrderDO> pageResult, List<TradeOrderItemDO> orderItems,
List<ProductPropertyValueDetailRespDTO> propertyValueDetails,
Map<Long,MemberUserRespDTO> 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());

View File

@ -33,7 +33,7 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
.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()));
}