From 1c7d3b4538dcd2ae6c0ec1ffc4a548088bb7b00b Mon Sep 17 00:00:00 2001
From: guyue <1721849008@qq.com>
Date: 星期六, 26 七月 2025 09:09:01 +0800
Subject: [PATCH] 未支付订单查询接口

---
 UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
index 087157d..9090f85 100644
--- a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
+++ b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
@@ -20,6 +20,7 @@
 import com.stylefeng.guns.modular.system.dao.SysIntegralMapper;
 import com.stylefeng.guns.modular.system.dao.UserActivityDiscount1Mapper;
 import com.stylefeng.guns.modular.system.model.*;
+import com.stylefeng.guns.modular.system.model.vo.UnPayOrderVO;
 import com.stylefeng.guns.modular.system.service.*;
 import com.stylefeng.guns.modular.system.util.*;
 import com.stylefeng.guns.modular.system.warpper.*;
@@ -29,6 +30,7 @@
 import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService;
 import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService;
 import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -2231,4 +2233,28 @@
         driverService.updateById(driver);
         systemNoticeService.addSystemNotice(1, "您已使用" + (payType == 1 ? "微信" : (payType==2?"支付宝":"云闪付")) + "成功完成感谢费支付,谢谢使用!", userInfo.getId(), 1);
     }
+
+    @Override
+    public List<UnPayOrderVO> getUnpayTaxiOrders(Integer uid) {
+       EntityWrapper<OrderTaxi> wrapper = new EntityWrapper<>();
+       wrapper.eq("userId", uid);
+       wrapper.eq("state", 7);
+        //查出未支付订单
+       List<OrderTaxi> orderTaxiList = this.selectList(wrapper);
+       List<UnPayOrderVO> unPayOrderVOList = new ArrayList<>();
+       for (OrderTaxi orderTaxi:orderTaxiList) {
+           UnPayOrderVO unPayOrderVO = new UnPayOrderVO();
+           //添加司机信息
+           DriverInfoWarpper driverInfoWarpper = new DriverInfoWarpper();
+           Driver driver = driverService.selectById(orderTaxi.getDriverId());
+           BeanUtils.copyProperties(driver, driverInfoWarpper);
+           unPayOrderVO.setDriverInfoWarpper(driverInfoWarpper);
+           //其余信息
+           BeanUtils.copyProperties(orderTaxi, unPayOrderVO);
+           unPayOrderVOList.add(unPayOrderVO);
+
+        }
+
+        return unPayOrderVOList;
+    }
 }

--
Gitblit v1.7.1