bug fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user