use of com.paascloud.provider.model.vo.OrderVo in project paascloud-master by paascloud.
the class OmcOrderServiceImpl method assembleOrderVoList.
private List<OrderVo> assembleOrderVoList(List<OmcOrder> orderList, Long userId) {
List<OrderVo> orderVoList = Lists.newArrayList();
for (OmcOrder order : orderList) {
List<OmcOrderDetail> orderItemList;
if (userId == null) {
orderItemList = omcOrderDetailService.getListByOrderNo(order.getOrderNo());
} else {
orderItemList = omcOrderDetailService.getListByOrderNoUserId(order.getOrderNo(), userId);
}
OrderVo orderVo = assembleOrderVo(order, orderItemList);
orderVoList.add(orderVo);
}
return orderVoList;
}
use of com.paascloud.provider.model.vo.OrderVo in project paascloud-master by paascloud.
the class OmcOrderServiceImpl method assembleOrderVo.
private OrderVo assembleOrderVo(OmcOrder order, List<OmcOrderDetail> orderItemList) {
OrderVo orderVo = new OrderVo();
orderVo.setOrderNo(order.getOrderNo());
orderVo.setPayment(order.getPayment());
orderVo.setPaymentType(order.getPaymentType());
orderVo.setPaymentTypeDesc(Objects.requireNonNull(GlobalConstant.PaymentTypeEnum.codeOf(order.getPaymentType())).getValue());
orderVo.setPostage(order.getPostage());
orderVo.setStatus(order.getStatus());
orderVo.setStatusDesc(OmcApiConstant.OrderStatusEnum.codeOf(order.getStatus()).getValue());
orderVo.setShippingId(order.getShippingId());
OmcShipping shipping = omcShippingMapper.selectByPrimaryKey(order.getShippingId());
if (shipping != null) {
orderVo.setReceiverName(shipping.getReceiverName());
orderVo.setShippingVo(assembleShippingVo(shipping));
}
orderVo.setPaymentTime(order.getPaymentTime());
orderVo.setSendTime(order.getSendTime());
orderVo.setEndTime(order.getEndTime());
orderVo.setCreateTime(order.getCreatedTime());
orderVo.setCloseTime(order.getCloseTime());
orderVo.setCreator(order.getCreator());
orderVo.setImageHost("");
List<OrderItemVo> orderItemVoList = Lists.newArrayList();
for (OmcOrderDetail orderItem : orderItemList) {
OrderItemVo orderItemVo = assembleOrderItemVo(orderItem);
orderItemVoList.add(orderItemVo);
}
orderVo.setOrderItemVoList(orderItemVoList);
return orderVo;
}
use of com.paascloud.provider.model.vo.OrderVo in project paascloud-master by paascloud.
the class OmcOrderController method createOrderDoc.
/**
* 创建订单.
*
* @param shippingId the shipping id
*
* @return the wrapper
*/
@PostMapping("createOrderDoc/{shippingId}")
@ApiOperation(httpMethod = "POST", value = "创建订单")
public Wrapper createOrderDoc(@PathVariable Long shippingId) {
logger.info("createOrderDoc - 创建订单. shippingId={}", shippingId);
LoginAuthDto loginAuthDto = getLoginAuthDto();
logger.info("操作人信息. loginAuthDto={}", loginAuthDto);
OrderVo orderDoc = omcOrderService.createOrderDoc(loginAuthDto, shippingId);
return WrapMapper.ok(orderDoc);
}
use of com.paascloud.provider.model.vo.OrderVo in project paascloud-master by paascloud.
the class OmcOrderController method queryUserOrderDetail.
@PostMapping("queryUserOrderDetail/{orderNo}")
@ApiOperation(httpMethod = "POST", value = "查询订单详情")
public Wrapper queryUserOrderDetail(@PathVariable String orderNo) {
logger.info("queryUserOrderDetail - 查询订单明细. orderNo={}", orderNo);
OrderVo orderVo = omcOrderService.getOrderDetail(orderNo);
return WrapMapper.ok(orderVo);
}
use of com.paascloud.provider.model.vo.OrderVo in project paascloud-master by paascloud.
the class OmcOrderController method queryUserOrderDetailList.
/**
* 查询订单详情.
*
* @param orderNo the order no
*
* @return the wrapper
*/
@PostMapping("queryUserOrderDetailList/{orderNo}")
@ApiOperation(httpMethod = "POST", value = "查询订单详情")
public Wrapper queryUserOrderDetailList(@PathVariable String orderNo) {
logger.info("queryUserOrderDetailList - 查询用户订单明细. orderNo={}", orderNo);
Long userId = getLoginAuthDto().getUserId();
logger.info("操作人信息. userId={}", userId);
OrderVo orderVo = omcOrderService.getOrderDetail(userId, orderNo);
return WrapMapper.ok(orderVo);
}
Aggregations