| | |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.crossCity.server.impl.OrderCrossCityServiceImpl; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.dao.RegionMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | | 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.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | |
| | | 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.bouncycastle.crypto.tls.MACAlgorithm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | |
| | | |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Autowired |
| | | private RestTemplate internalRestTemplate; |
| | |
| | | System.out.println("取消订单:"+query); |
| | | if(null != query){ |
| | | if(payType == 1){//微信支付 |
| | | String value = redisUtil.getValue("appletOpenId"); |
| | | String value = (String) redisTemplate.opsForValue().get("appletOpenId"); |
| | | String appletsOpenId = null; |
| | | if(ToolUtil.isNotEmpty(value)){ |
| | | JSONObject jsonObject = JSON.parseObject(value); |
| | |
| | | }).start(); |
| | | |
| | | //用户付款后,删除限制司机6分钟不能接单的标识 |
| | | String vehicle = redisUtil.getValue("VEHICLE"); |
| | | String vehicle = (String) redisTemplate.opsForValue().get("VEHICLE"); |
| | | if(ToolUtil.isNotEmpty(vehicle)){ |
| | | JSONArray jsonArray = JSON.parseArray(vehicle); |
| | | for(int i = 0; i < jsonArray.size(); i++){ |
| | |
| | | break; |
| | | } |
| | | } |
| | | redisUtil.setStrValue("VEHICLE", jsonArray.toJSONString()); |
| | | redisTemplate.opsForValue().set("VEHICLE", jsonArray.toJSONString()); |
| | | } |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成出行订单支付,谢谢使用!", uid, 1); |
| | | } |
| | |
| | | }).start(); |
| | | |
| | | //用户付款后,删除限制司机6分钟不能接单的标识 |
| | | String vehicle = redisUtil.getValue("VEHICLE"); |
| | | String vehicle = (String) redisTemplate.opsForValue().get("VEHICLE"); |
| | | if(ToolUtil.isNotEmpty(vehicle)){ |
| | | JSONArray jsonArray = JSON.parseArray(vehicle); |
| | | for(int i = 0; i < jsonArray.size(); i++){ |
| | |
| | | break; |
| | | } |
| | | } |
| | | redisUtil.setStrValue("VEHICLE", jsonArray.toJSONString()); |
| | | redisTemplate.opsForValue().set("VEHICLE", jsonArray.toJSONString()); |
| | | } |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成出行订单支付,谢谢使用!", uid, 1); |
| | | |
| | |
| | | if(Integer.valueOf(String.valueOf(map.get("state"))) == 11){ |
| | | map.put("state", map.get("oldState")); |
| | | } |
| | | String driverId = redisUtil.getValue("DEVICE_" + map.get("driverId")); |
| | | String driverId = (String) redisTemplate.opsForValue().get("DEVICE_" + map.get("driverId")); |
| | | map.put("device", ToolUtil.isNotEmpty(driverId) ? 2 : 1); |
| | | map.put("orderType", 2); |
| | | return map; |
| | |
| | | return orderServerWarpper; |
| | | } |
| | | //计算预计距离和剩余时间 |
| | | String value = redisUtil.getValue("DRIVER" + String.valueOf(orderTaxi.getDriverId())); |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderTaxi.getDriverId())); |
| | | if(null == value || "".equals(value)){ |
| | | System.err.println("司机没有上传位置信息"); |
| | | |
| | |
| | | }).start(); |
| | | |
| | | //用户付款后,删除限制司机6分钟不能接单的标识 |
| | | String vehicle = redisUtil.getValue("VEHICLE"); |
| | | String vehicle = (String) redisTemplate.opsForValue().get("VEHICLE"); |
| | | if(ToolUtil.isNotEmpty(vehicle)){ |
| | | JSONArray jsonArray = JSON.parseArray(vehicle); |
| | | for(int i = 0; i < jsonArray.size(); i++){ |
| | |
| | | break; |
| | | } |
| | | } |
| | | redisUtil.setStrValue("VEHICLE", jsonArray.toJSONString()); |
| | | redisTemplate.opsForValue().set("VEHICLE", jsonArray.toJSONString()); |
| | | } |
| | | |
| | | |
| | |
| | | public void run() { |
| | | try { |
| | | orderIds.add(orderTaxi.getId());//添加记录,防止调用接口重复提醒无人接单 |
| | | String vehicle = redisUtil.getValue("VEHICLE"); |
| | | String vehicle = (String) redisTemplate.opsForValue().get("VEHICLE"); |
| | | List<Integer> integers = new ArrayList<>(); |
| | | if(ToolUtil.isNotEmpty(vehicle)){ |
| | | integers = JSON.parseArray(vehicle).toJavaList(Integer.class); |