This commit is contained in:
Cauchy
2023-10-19 17:54:38 +08:00
parent a4492f26e7
commit 7005fd8b4d
4 changed files with 25 additions and 15 deletions

View File

@@ -75,4 +75,12 @@ public class ExpressOrder {
* 物品信息
*/
private List<ExpressCommodity> Commodity;
/**
* 快递单号
*/
private String expressOrderSn;
/**
* 面单模板
*/
private String printTemplate;
}

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -18,6 +19,8 @@ import com.peanut.modules.book.vo.UserOrderVo;
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
import com.peanut.modules.book.vo.response.BuyOrderListResponseVo;
import com.peanut.modules.book.vo.response.ConsigneeVo;
import com.peanut.modules.book.vo.response.ExpressResponseVo;
import com.peanut.modules.book.vo.response.GoodsResponseVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,6 +56,8 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
@Autowired
private BuyOrderDao buyOrderDao;
@Autowired
private BuyOrderProductService buyOrderProductService;
protected Logger logger = LoggerFactory.getLogger(BuyOrderServiceImpl.class);
@@ -107,10 +112,6 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
return new PageUtils(page);
}
public void list1() {
}
@Override
public PageUtils getMyOrderList(Map<String, Object> params) {
@@ -296,11 +297,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
List<BuyOrderListResponseVo> result = new ArrayList<>();
for (BuyOrder buyOrder : buyOrderList) {
BuyOrderListResponseVo responseVo = new BuyOrderListResponseVo();
responseVo.setOrderSn(buyOrder.getOrderSn());
responseVo.setOrderStatus(buyOrder.getOrderStatus());
responseVo.setRemark(buyOrder.getRemark());
responseVo.setPaymentDate(buyOrder.getPaymentDate());
responseVo.setPaymentMethod(buyOrder.getPaymentMethod());
BeanUtil.copyProperties(buyOrder, responseVo);
ConsigneeVo consigneeVo = new ConsigneeVo();
consigneeVo.setConsigneeName(buyOrder.getShippingUser());
consigneeVo.setConsigneeMobile(buyOrder.getUserPhone());
@@ -309,8 +306,13 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
consigneeVo.setCounty(buyOrder.getDistrict());
consigneeVo.setAddress(buyOrder.getAddress());
responseVo.setConsignee(consigneeVo);
// responseVo.setExpressList();
// responseVo.setGoodsList();
QueryWrapper<BuyOrderProduct> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_id", buyOrder.getOrderId());
List<BuyOrderProduct> buyOrderProductList = buyOrderProductService.list(queryWrapper);
for (BuyOrderProduct buyOrderProduct : buyOrderProductList) {
buyOrderProduct.getProductId();
}
responseVo.setGoodsList();
requestVo.setIndex((requestVo.getIndex() - 1) * requestVo.getPageSize());
result.add(responseVo);
}

View File

@@ -36,10 +36,6 @@ public class BuyOrderListResponseVo {
* 商品列表
*/
private List<GoodsResponseVo> goodsList;
/**
* 快递列表
*/
private List<ExpressResponseVo> expressList;
/**
* 收货人信息
*/

View File

@@ -23,4 +23,8 @@ public class GoodsResponseVo {
* 商品价格
*/
private BigDecimal productPrice;
/**
* 快递
*/
private ExpressQueryResponseVo expressInfo;
}