This commit is contained in:
wangjinlei
2023-11-03 17:03:42 +08:00
parent b683c29ad5
commit 5b71036241
10 changed files with 76 additions and 2 deletions

View File

@@ -55,6 +55,8 @@ public interface BuyOrderService extends IService<BuyOrder> {
Page<BuyOrder> getUserOrderList(UserOrderDto userOrderDto);
List<BuyOrder> getUserOrderStatusNum(Integer userId);
BuyOrderResponseVo orderDetail(String orderSn);
Map<String, Object> decomposeShipment(BuyOrderListRequestVo requestVo);

View File

@@ -398,7 +398,12 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
b.setProductList(buyOrderProducts);
b.setTimestamp(b.getCreateTime().getTime()/1000);
//获取包裹信息
// getOrderByOS()
List<Integer> collect = buyOrderProductService.list(new LambdaQueryWrapper<BuyOrderProduct>().eq(BuyOrderProduct::getOrderId, b.getOrderId()).gt(BuyOrderProduct::getExpressOrderId, 0))
.stream().map(BuyOrderProduct::getExpressOrderId).collect(Collectors.toList());
if(collect.size()>0){
List<ExpressOrder> expressOrders = expressOrderDao.selectList(new LambdaQueryWrapper<ExpressOrder>().in(ExpressOrder::getId, collect));
b.setExpressList(expressOrders);
}
}
return buyOrderPage;
@@ -522,6 +527,22 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
return setBuyOrderInfo(buyOrder);
}
@Override
public List<BuyOrder> getUserOrderStatusNum(Integer userId) {
List<BuyOrder> buyOrders = this.getBaseMapper().orderStatusNum(userId);
return buyOrders;
// LambdaQueryWrapper<BuyOrder> wrapper = new LambdaQueryWrapper<>();
// List<Integer> status = new ArrayList<>();
// status.add(0);
// status.add(1);
// status.add(2);
// status.add(3);
// wrapper.s
// wrapper.in(BuyOrder::getOrderStatus,status);
// wrapper.groupBy(BuyOrder::getOrderStatus);
// List<BuyOrder> list = list(wrapper);
}
/**
* 组装快递鸟专用我方订单号,应对同一订单号,他们生成的快递订单号是一个

View File

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.modules.book.dao.PointCategoryDao;
import com.peanut.modules.book.dao.PointDao;
import com.peanut.modules.book.entity.PointCategoryEntity;
@@ -39,6 +40,10 @@ public class PointServiceImpl extends ServiceImpl<PointDao, PointEntity> impleme
Page<PointEntity> pointEntityPage = getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
for (PointEntity p : pointEntityPage.getRecords()){
p.setImageList(JSON.parseArray(p.getImages(),String.class));
PointCategoryEntity c_category = pointCategoryDao.selectById(p.getPointCategoryId());
System.out.println(c_category);
PointCategoryEntity f_category = pointCategoryDao.selectById(c_category.getPid());
p.setCategoryString(f_category.getTitle()+" > "+c_category.getTitle());
}
return pointEntityPage;
}