| | |
| | | |
| | | @Autowired |
| | | private IOrderService orderService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | |
| | | @Autowired |
| | | private WeChatUtil weChatUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderPrivateCarService orderPrivateCarService; |
| | | |
| | | |
| | | @Autowired |
| | | private GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | |
| | | @Autowired |
| | | private IComplaintService complaintService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderEvaluateService orderEvaluateService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderCrossCityService orderCrossCityService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Resource |
| | | private ISystemPriceCityService systemPriceCityService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取正在进行中的订单 |
| | |
| | | } |
| | | |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | if(orderPrivateCar.getState()>1){ |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | | System.out.println("参数:"+orderPrivateCar.getCompanyId()+"|"+orderPrivateCar.getServerCarModelId()); |
| | | System.out.println("query1:"+query1); |
| | | if(orderPrivateCar.getState()>1) { |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()); |
| | | String provinceCode = geocode.get("provinceCode"); |
| | | String cityCode = geocode.get("cityCode"); |
| | | String districtCode = geocode.get("districtCode"); |
| | | //获取匹配的城市价格配置 |
| | | SystemPriceCity systemPriceCity = systemPriceCityService.queryOne(provinceCode, cityCode, districtCode); |
| | | if (null == systemPriceCity) { |
| | | return ResultUtil.error("请先配置价格规则"); |
| | | } |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId(), systemPriceCity.getId()); |
| | | System.out.println("参数:" + orderPrivateCar.getCompanyId() + "|" + orderPrivateCar.getServerCarModelId()); |
| | | System.out.println("query1:" + query1); |
| | | //开始根据不同的方式计算金额 |
| | | if(query1!=null){ |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString());//等待费 |
| | | JSONObject contentPutOne = JSON.parseObject(query1.get("contentPutOne").toString());//一人拼成 |
| | | JSONObject contentNotOne = JSON.parseObject(query1.get("contentNotOne").toString());//一人未拼成 |
| | | JSONObject contentPutTwo = JSON.parseObject(query1.get("contentPutTwo").toString());//2人拼成 |
| | | JSONObject contentNotTwo = JSON.parseObject(query1.get("contentNotTwo").toString());//2人未拼成 |
| | | JSONObject contentPutThree = JSON.parseObject(query1.get("contentPutThree").toString());//3人拼成 |
| | | if (query1 != null) { |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString());//等待费 |
| | | JSONObject contentPutOne = JSON.parseObject(query1.get("contentPutOne").toString());//一人拼成 |
| | | JSONObject contentNotOne = JSON.parseObject(query1.get("contentNotOne").toString());//一人未拼成 |
| | | JSONObject contentPutTwo = JSON.parseObject(query1.get("contentPutTwo").toString());//2人拼成 |
| | | JSONObject contentNotTwo = JSON.parseObject(query1.get("contentNotTwo").toString());//2人未拼成 |
| | | JSONObject contentPutThree = JSON.parseObject(query1.get("contentPutThree").toString());//3人拼成 |
| | | JSONObject contentNotThree = JSON.parseObject(query1.get("contentNotThree").toString());//3人未拼成 |
| | | JSONObject contentExclusive = JSON.parseObject(query1.get("contentExclusive").toString());//独享 |
| | | JSONObject contentPrice = JSON.parseObject(query1.get("contentPrice").toString());//一口价 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 推广订单支付成功回调 |
| | | * |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | private void promotion(Integer orderType,Integer orderId){ |
| | | switch (orderType){ |
| | | case 1: |
| | | orderPrivateCarService.promotion(orderId); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.promotion(orderId); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.promotion(orderId); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/get/unPayOrder") |
| | | @ApiOperation(value = "获取未支付订单", tags = {"用户端-首页"}, notes = "") |