order list

This commit is contained in:
Cauchy
2023-10-19 17:22:35 +08:00
parent a59e04e406
commit a4492f26e7
14 changed files with 345 additions and 58 deletions

View File

@@ -0,0 +1,16 @@
package com.peanut.modules.book.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.modules.book.dao.BuyOrderProductDao;
import com.peanut.modules.book.entity.BuyOrderProduct;
import com.peanut.modules.book.service.BuyOrderProductService;
import org.springframework.stereotype.Service;
/**
* @Description: 订单-商品 Service 实现类
* @Author: Cauchy
* @CreateTime: 2023/10/19
*/
@Service
public class BuyOrderProductServiceImpl extends ServiceImpl<BuyOrderProductDao, BuyOrderProduct> implements BuyOrderProductService {
}

View File

@@ -15,6 +15,9 @@ import com.peanut.modules.book.service.*;
import com.peanut.modules.book.entity.ExpressCommodity;
import com.peanut.modules.book.vo.ExpressOrderResponseVo;
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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -48,6 +51,9 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
@Autowired
ShopProductService shopProductService;
@Autowired
private BuyOrderDao buyOrderDao;
protected Logger logger = LoggerFactory.getLogger(BuyOrderServiceImpl.class);
@@ -86,8 +92,6 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
}
List<BuyOrder> records = page.getRecords();
for (BuyOrder record : records) {
Integer userId = record.getUserId();
@@ -103,7 +107,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
return new PageUtils(page);
}
public void list1(){
public void list1() {
}
@@ -286,6 +290,33 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
return rntPage;
}
@Override
public List<BuyOrderListResponseVo> orderList(BuyOrderListRequestVo requestVo) {
List<BuyOrder> buyOrderList = buyOrderDao.orderList(requestVo);
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());
ConsigneeVo consigneeVo = new ConsigneeVo();
consigneeVo.setConsigneeName(buyOrder.getShippingUser());
consigneeVo.setConsigneeMobile(buyOrder.getUserPhone());
consigneeVo.setProvince(buyOrder.getProvince());
consigneeVo.setCity(buyOrder.getCity());
consigneeVo.setCounty(buyOrder.getDistrict());
consigneeVo.setAddress(buyOrder.getAddress());
responseVo.setConsignee(consigneeVo);
// responseVo.setExpressList();
// responseVo.setGoodsList();
requestVo.setIndex((requestVo.getIndex() - 1) * requestVo.getPageSize());
result.add(responseVo);
}
return result;
}
@Override
public void delivery(String expressCompanyCode, List<Integer> buyOrderDetailId) {
QueryWrapper<BuyOrderDetail> queryWrapper = new QueryWrapper<>();