Merge remote-tracking branch 'origin/master'
# Conflicts:
# MessagePushTravel/src/main/resources/application.yml
| | |
| | | } |
| | | Driver driver = driverService.selectById(uid); |
| | | String accessToken=null; |
| | | Object img = redisTemplate.opsForValue().get("dache:DRIVER_WX_IMG" + uid); |
| | | Object img = redisTemplate.opsForValue().get("DRIVER_WX_IMG" + uid); |
| | | // 获取调用凭证accessToken |
| | | if(ToolUtil.isEmpty(driver.getShareLink())|| ToolUtil.isEmpty(img)){ |
| | | accessToken = getAccessToken(); |
| | |
| | | |
| | | if(ToolUtil.isEmpty(img)) { |
| | | RestTemplate rest = new RestTemplate(); |
| | | String url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=" + accessToken; |
| | | // String url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=" + accessToken; |
| | | String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken; |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("path", "pages/home/home?driverId=" + uid); |
| | | param.put("page", "pages/home/home"); |
| | | param.put("width", 430); //二维码尺寸 |
| | | param.put("scene", "driverId=" + uid); //二维码尺寸 |
| | | param.put("env_version", "trial"); //二维码尺寸 |
| | | HttpRequest post = HttpUtil.createPost(url); |
| | | post.body(JSON.toJSONString(param)); |
| | | |
| | |
| | | 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).last(" and between now() startTime and endTime AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("state",1).eq("districtCode", registAreaCode).last(" and now() between startTime and endTime AND FIND_IN_SET(" + 1 + ", bizType) limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | return userInfo.getBindDriverId(); |
| | | } |
| | |
| | | |
| | | Integer carId = driver.getCarId(); |
| | | map.put("car", ""); |
| | | map.put("id", carId); |
| | | if(carId!=null){ |
| | | Car car = carMapper.selectById(carId); |
| | | if(car.getCarLicensePlate()!=null){ |
| | |
| | | if(stringObjectMap.get("useDriverId")!=null && stringObjectMap.get("useDriverId").toString().equals(uid.toString())){ |
| | | map.put("useState", 1); |
| | | }else { |
| | | map.put("useState", 0); |
| | | map.put("useState", 2); |
| | | } |
| | | } |
| | | map.put("list", list); |
| | |
| | | |
| | | double sum = orderPrivateCars.stream().mapToDouble(OrderPrivateCar::getOrderMoney).sum(); |
| | | double sum1 = orderCrossCities.stream().mapToDouble(OrderCrossCity::getOrderMoney).sum(); |
| | | double sum2 = orderTaxis.stream().mapToDouble(OrderTaxi::getOrderMoney).sum(); |
| | | double sum2 = orderTaxis.stream().filter(e->e.getOrderMoney()!=null).mapToDouble(OrderTaxi::getOrderMoney).sum(); |
| | | driverIndexVo.setTodayOrderMoney(new BigDecimal(sum +sum1+sum2)); |
| | | |
| | | |
| | |
| | | reassign.setOriginalDriverId(uid); |
| | | reassign.setOriginalCarId(driver.getCarId()); |
| | | reassign.setInsertTime(new Date()); |
| | | this.insert(reassign); |
| | | if(types==1){ |
| | | this.insert(reassign); |
| | | } |
| | | // systemNoticeService.addSystemNotice(2, "您的改派申请已成功提交,我们会尽快为你处理!", uid, 1); |
| | | |
| | | //开始支付 |
| | |
| | | public QianYunTongConfig getQianYunTongConfig() { |
| | | if("dev".equals(activeProfile)){ |
| | | this.appkey = "10001104"; |
| | | this.privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem"; |
| | | this.privateKeyPath = "C:\\Users\\Admin\\Desktop\\private_key_test.pem"; |
| | | this.userName = "xiaofei"; |
| | | this.status = "1"; |
| | | this.setApiUrl("https://test-zhongtai.stqcloud.com:10070"); |
| | |
| | | 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); |
| | |
| | | server: |
| | | port: 8007 |
| | | port: 8009 |
| | | |
| | | guns: |
| | | swagger-open: true #是否开启swagger (true/false) |
| | |
| | | }) |
| | | public ResultUtil<BaseWarpper> queryIdleDriver(Integer type, Double lon, Double lat){ |
| | | try { |
| | | if(type==2){ |
| | | type=null; |
| | | } |
| | | List<Driver> list = driverService.queryIdleDriver(type, lon, lat, 5D, null); |
| | | BaseWarpper baseWarpper = new BaseWarpper(); |
| | | baseWarpper.setNumber(list.size()); |
| | |
| | | if (null == systemPriceCity) { |
| | | return ResultUtil.error("请先配置价格规则"); |
| | | } |
| | | if(orderPrivateCar.getServerCarModelId()==null){ |
| | | orderPrivateCar.setServerCarModelId(0); |
| | | } |
| | | 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); |
| | |
| | | </choose> |
| | | |
| | | </if> |
| | | and id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | ) |
| | | <if test="8>type"> |
| | | <if test="null != type"> |
| | | and id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | ) |
| | | </if> |
| | | |
| | | <if test="null != type and 8>type"> |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | | </if> |
| | | <if test="type>7"> |
| | | <if test="null != type and type>7"> |
| | | and id in (select driverId from t_driver_orders where `type` = 1) |
| | | </if> |
| | | </select> |
| | |
| | | public QianYunTongConfig getQianYunTongConfig() { |
| | | if("dev".equals(activeProfile)){ |
| | | this.appkey = "10001104"; |
| | | this.privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem"; |
| | | this.privateKeyPath = "C:\\Users\\Admin\\Desktop\\private_key_test.pem"; |
| | | this.userName = "xiaofei"; |
| | | this.status = "1"; |
| | | this.setApiUrl("https://test-zhongtai.stqcloud.com:10070"); |
| | |
| | | @Autowired |
| | | private ITaxiCardService taxiCardService; |
| | | |
| | | @Autowired |
| | | private ITaxiCardPaymentService taxiCardPaymentService; |
| | | |
| | | |
| | | @Autowired |
| | | private IUserUserService userUserService; |
| | | |
| | |
| | | } |
| | | } |
| | | Thread.sleep(pushOrder.getPushTime() * 1000);//设置等待时间 |
| | | OrderTaxi orderTaxi1 = OrderTaxiServiceImpl.this.selectById(orderTaxi.getId()); |
| | | OrderPrivateCar orderTaxi1 = orderPrivateCarService.selectById(orderTaxi.getId()); |
| | | Integer state = orderTaxi1.getState(); |
| | | if (state != 1) { |
| | | break; |