From f72ae151cc12b219cb5f39eea3ec0ea089a6ef2a Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 27 八月 2025 23:53:05 +0800 Subject: [PATCH] 修改bug --- UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java | 71 +++++++++++++++++++---------------- 1 files changed, 38 insertions(+), 33 deletions(-) diff --git a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java index 6b27477..fee9b60 100644 --- a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java +++ b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java @@ -1471,24 +1471,27 @@ case 1: OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); orderPrivateCar.setState(9); + orderPrivateCar.setPayTime(new Date()); orderPrivateCarService.updateById(orderPrivateCar); - Driver driver1 = null; - Company company = null; - //中台修改订单状态 - ModifyTravelItineraryRequest request = new ModifyTravelItineraryRequest(); - request.setOrderId(orderPrivateCar.getTravelId()); - request.setStatus(orderPrivateCar.getState()); - if (null != orderPrivateCar.getDriverId()) { - driver1 = driverService.selectById(orderPrivateCar.getDriverId()); - company = companyService.selectById(driver1.getCompanyId()); - request.setDriverId(driver1.getEmpId().toString()); - request.setSupplierShopId(company.getEnterCode()); + if(ToolUtil.isNotEmpty(orderPrivateCar.getTravelId())){ + Driver driver1 = null; + Company company = null; + //中台修改订单状态 + ModifyTravelItineraryRequest request = new ModifyTravelItineraryRequest(); + request.setOrderId(orderPrivateCar.getTravelId()); + request.setStatus(orderPrivateCar.getState()); + if (null != orderPrivateCar.getDriverId()) { + driver1 = driverService.selectById(orderPrivateCar.getDriverId()); + company = companyService.selectById(driver1.getCompanyId()); + request.setDriverId(driver1.getEmpId().toString()); + request.setSupplierShopId(company.getEnterCode()); + } + if (2 == orderPrivateCar.getPromotion()) { + Driver driver2 = driverService.selectById(orderPrivateCar.getPromotionDriverId()); + request.setPromoterId(driver2.getEmpId().toString()); + } + OrderUtil.modifyTravelItinerary(request); } - if (2 == orderPrivateCar.getPromotion()) { - Driver driver2 = driverService.selectById(orderPrivateCar.getPromotionDriverId()); - request.setPromoterId(driver2.getEmpId().toString()); - } - OrderUtil.modifyTravelItinerary(request); new Thread(new Runnable() { @Override public void run() { @@ -1502,24 +1505,27 @@ case 2: OrderTaxi orderTaxi = orderTaxiService.selectById(orderId); orderTaxi.setState(9); + orderTaxi.setPayTime(new Date()); orderTaxiService.updateById(orderTaxi); - Driver driver = null; - Company company1 = null; - //中台修改订单状态 - ModifyTravelItineraryRequest request2 = new ModifyTravelItineraryRequest(); - request2.setOrderId(orderTaxi.getTravelId()); - request2.setStatus(orderTaxi.getState()); - if (null != orderTaxi.getDriverId()) { - driver = driverService.selectById(orderTaxi.getDriverId()); - company1 = companyService.selectById(driver.getCompanyId()); - request2.setDriverId(driver.getEmpId().toString()); - request2.setSupplierShopId(company1.getEnterCode()); + if(ToolUtil.isNotEmpty(orderTaxi.getTravelId())){ + Driver driver = null; + Company company1 = null; + //中台修改订单状态 + ModifyTravelItineraryRequest request2 = new ModifyTravelItineraryRequest(); + request2.setOrderId(orderTaxi.getTravelId()); + request2.setStatus(orderTaxi.getState()); + if (null != orderTaxi.getDriverId()) { + driver = driverService.selectById(orderTaxi.getDriverId()); + company1 = companyService.selectById(driver.getCompanyId()); + request2.setDriverId(driver.getEmpId().toString()); + request2.setSupplierShopId(company1.getEnterCode()); + } + if (2 == orderTaxi.getPromotion()) { + Driver driver2 = driverService.selectById(orderTaxi.getPromotionDriverId()); + request2.setPromoterId(driver2.getEmpId().toString()); + } + OrderUtil.modifyTravelItinerary(request2); } - if (2 == orderTaxi.getPromotion()) { - Driver driver2 = driverService.selectById(orderTaxi.getPromotionDriverId()); - request2.setPromoterId(driver2.getEmpId().toString()); - } - OrderUtil.modifyTravelItinerary(request2); break; case 3: OrderCrossCity orderCrossCity = orderCrossCityService.selectById(orderId); @@ -2173,7 +2179,6 @@ if (orderNo.contains("PR")) { orderNo = orderNo.substring(2); orderPrivateCarService.payOrderPrivateCarCallback(Integer.valueOf(orderNo), payId, 1); - orderPrivateCarService.promotion(Integer.valueOf(orderNo)); } //出租车 if (orderNo.contains("TA")) { -- Gitblit v1.7.1