This commit is contained in:
wangjinlei
2023-11-20 16:18:07 +08:00
parent d9d6ee68da
commit 5402c28b31
4 changed files with 17 additions and 10 deletions

View File

@@ -384,6 +384,13 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
public Page<BuyOrder> getUserOrderList(UserOrderDto userOrderDto) {
LambdaQueryWrapper<BuyOrder> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BuyOrder::getUserId,userOrderDto.getUserId());
wrapper.eq(BuyOrder::getOrderType,"order");
if(userOrderDto.getOrderStatus()==null){
Integer[] sts = {0,1,2,3};
wrapper.in(BuyOrder::getOrderStatus,sts);
}else{
wrapper.eq(BuyOrder::getOrderStatus,userOrderDto.getOrderStatus());
}
wrapper.eq(userOrderDto.getOrderStatus()!=null,BuyOrder::getOrderStatus,userOrderDto.getOrderStatus());
wrapper.orderByDesc(BuyOrder::getCreateTime);
Page<BuyOrder> buyOrderPage = this.getBaseMapper().selectPage(new Page<>(userOrderDto.getPage(), userOrderDto.getLimit()), wrapper);