From b50c961c49851d140d77d549db34a9f6400dadd4 Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期二, 19 八月 2025 19:03:10 +0800 Subject: [PATCH] 跨城推广 --- DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java index d1075d1..91be020 100644 --- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java +++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java @@ -75,6 +75,9 @@ @Autowired private TDriverPromotionActivityService driverPromotionActivityService; + + @Resource + private IOpenCityService openCityService; @@ -146,7 +149,7 @@ return ResultUtil.error("订单已被抢了"); } OrderTaxi orderTaxi = null; - if(null != orderPrivateCar1 && orderPrivateCar1.getType() == 3 && orderPrivateCar1.getState() == 1&& orderPrivateCar1.getState() == 11){ + if(null != orderPrivateCar1 && orderPrivateCar1.getType() == 3 && (orderPrivateCar1.getState() == 1|| orderPrivateCar1.getState() == 11)){ orderPrivateCarService.deleteById(orderId); OrderTaxi orderTaxi1 = setOrderTaxi(orderPrivateCar1); this.insert(orderTaxi1); @@ -333,7 +336,7 @@ UserInfo userInfo = userInfoMapper.selectById(userId); if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){ String registAreaCode = userInfo.getRegistAreaCode(); - TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("state",1).eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); + TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("state",1).eq("districtCode", registAreaCode).le("startTime", new Date()).ge("endTime", new Date()).last("AND FIND_IN_SET(" + 2 + ", bizType) limit 1")); if(tDriverPromotionActivity!=null){ return userInfo.getBindDriverId(); } @@ -407,7 +410,7 @@ orderTaxi.setStartServiceTime(date); orderTaxi.setBoardingTime(date); - String value = (String) redisTemplate.opsForValue().get("DRIVER" + uid); + String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + uid); if (ToolUtil.isNotEmpty(value)) { String[] split = value.split(","); Map<String, String> geocode1 = gdMapGeocodingUtil.geocode(split[0], split[1]); @@ -473,7 +476,9 @@ */ @Override public Map<String, Object> queryOrderInfo(Integer orderId) throws Exception { - return orderTaxiMapper.queryOrderInfo(orderId); + OrderTaxi orderTaxi = this.selectById(orderId); + OpenCity openCity = openCityService.openCity1(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()); + return orderTaxiMapper.queryOrderInfo(orderId, openCity.getId()); } -- Gitblit v1.7.1