| | |
| | | |
| | | // 判断当天取消的次数 后台配置 redis 查询 |
| | | Object cancelOrder = redisService.getCacheObject("CANCEL_ORDER_" + uid); |
| | | // 静默处理 |
| | | boolean isSilent = false; |
| | | if (cancelOrder != null) { |
| | | Integer num = Integer.valueOf(cancelOrder.toString()); |
| | | if (num >= cancelCount) { |
| | | return 0l; |
| | | isSilent =true; |
| | | } |
| | | } |
| | | |
| | |
| | | Integer distance = 0; |
| | | Integer duration = 0; |
| | | if (distanceAndDuration.getCode() != 200) { |
| | | //静默处理 |
| | | return 0l; |
| | | throw new ServiceException("订单生成失败", I18nKeyConstant.ORDER_CREATE_FAIL); |
| | | } |
| | | distance = distanceAndDuration.getData().getDistance(); |
| | | duration = distanceAndDuration.getData().getDuration(); |
| | |
| | | throw new ServiceException("订单生成失败", I18nKeyConstant.ORDER_CREATE_FAIL); |
| | | } |
| | | Long orderId = addOrderR.getData(); |
| | | |
| | | // 静默处理 不推单 |
| | | if(isSilent){ |
| | | return orderId; |
| | | } |
| | | |
| | | // 最大距离 |
| | | Object maxPushDistanceObj = redisService.getCacheObject(CacheConstants.MAX_PUSH_DISTANCE); |
| | | Double maxPushDistance = 0.0; |