| | |
| | | private SystemPriceMapper systemPriceMapper; |
| | | |
| | | @Autowired |
| | | private ISystemPriceCityService systemPriceCityService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private IOpenCityService openCityService; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取司机端首页订单列表 |
| | | * |
| | |
| | | |
| | | private Integer isPromotion(Integer userId){ |
| | | UserInfo userInfo = userInfoMapper.selectById(userId); |
| | | if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){ |
| | | 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).last(" and between now() startTime and endTime AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | return userInfo.getBindDriverId(); |
| | | } |
| | |
| | | if(order!=null){ |
| | | orders.addAll(order); |
| | | } |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderPrivateCar.getDriverId())); |
| | | String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + String.valueOf(orderPrivateCar.getDriverId())); |
| | | order = this.baseMapper.queryOrderInfo(orderId,5,value.split(",")[0],value.split(",")[1]); |
| | | if(order!=null){ |
| | | orders.addAll(order); |
| | |
| | | if(order!=null){ |
| | | orders.addAll(order); |
| | | } |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderPrivateCar.getDriverId())); |
| | | String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + String.valueOf(orderPrivateCar.getDriverId())); |
| | | order = this.baseMapper.queryOrderInfo(orderPrivateCar.getPid(),5,value.split(",")[0],value.split(",")[1]); |
| | | if(order!=null){ |
| | | orders.addAll(order); |
| | |
| | | orders.addAll(order); |
| | | } |
| | | OrderPrivateCar orderPrivateCar = this.baseMapper.selectById(orderId); |
| | | String value = redisUtil.getValue("DRIVER" + String.valueOf(orderPrivateCar.getDriverId())); |
| | | String value = redisUtil.getValue("dache:DRIVER" + String.valueOf(orderPrivateCar.getDriverId())); |
| | | order = this.baseMapper.queryOrderInfo(orderId,5,value.split(",")[0],value.split(",")[1]); |
| | | if(order!=null){ |
| | | orders.addAll(order); |
| | |
| | | * @throws Exception |
| | | */ |
| | | public OrderPrivateCar setMoney(OrderPrivateCar orderPrivateCar, Double parkingFee, Double crossingFee) throws Exception { |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()); |
| | | SystemPriceCity systemPriceCity = systemPriceCityService.queryOne(geocode.get("provinceCode"), geocode.get("cityCode"), geocode.get("districtCode")); |
| | | Map<String, Object> query1 = systemPriceMapper.query(systemPriceCity.getId(), 1, orderPrivateCar.getServerCarModelId()); |
| | | //开始根据不同的方式计算金额 |
| | | double amount = 0; |
| | | JSONObject jsonObject = JSON.parseObject(String.valueOf(query1.get("content"))); |