| | |
| | | resultUtil = payMoneyUtil.weixinpay("完成订单",orderId +"", code,orderMoney+"","/base/wxPayOrderTaxi","JSAPI",userInfo.getAppletsOpenId()); |
| | | if(resultUtil.getCode()==200){ |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderId, 1, 1, orderMoney, null, 1, code);//添加预支付数据 |
| | | long millis = System.currentTimeMillis(); |
| | | new Thread(()->{ |
| | | long time = millis; |
| | | try { |
| | | Thread.sleep(5000); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | //订单创建后15分钟 |
| | | while ((System.currentTimeMillis() - time) <= 900000) { |
| | | int num = 1; |
| | | int wait = 0; |
| | | while (num <= 13) { |
| | | int min = 5000; |
| | | wait += (min * num); |
| | | OrderPrivateCar orderPrivateCar1 = OrderPrivateCarServiceImpl.this.selectById(orderId); |
| | | if(orderPrivateCar1.getState() != 7){ |
| | | break; |
| | |
| | | if ("NOTPAY".equals(s) || "USERPAYING".equals(s)) { |
| | | } |
| | | } |
| | | Thread.sleep(5000); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | try { |
| | | Thread.sleep(wait); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | num++; |
| | | } |
| | | } |
| | | |
| | | OrderPrivateCar orderPrivateCar1 = OrderPrivateCarServiceImpl.this.selectById(orderId); |
| | | if(7 == orderPrivateCar1.getState()){ |
| | | //关闭订单,不允许支付 |