mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
mall + order:订单详情
This commit is contained in:
parent
b92ed60136
commit
bc54e2fb35
@ -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")
|
||||
|
@ -19,6 +19,7 @@ public class TradeOrderPageItemRespVO extends TradeOrderBaseVO {
|
||||
*/
|
||||
private List<Item> items;
|
||||
|
||||
// TODO @xiaobai:使用 MemberUserRespVO 返回哈;DTO 不直接给前端
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
|
@ -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());
|
||||
|
@ -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()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user