| | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | |
| | | @Autowired |
| | | private ITransactionDetailsService transactionDetailsService; |
| | | |
| | | |
| | | @Value("${filePath}") |
| | | private String filePath; |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryOrderList(Integer state, Integer driverId) throws Exception { |
| | | return orderPrivateCarMapper.queryOrderList(state, driverId); |
| | | public List<Map<String, Object>> queryOrderList(Integer state, Integer driverId, Integer language) throws Exception { |
| | | return orderPrivateCarMapper.queryOrderList(state, driverId, language); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> queryMyAllOrder(Integer state, Integer uid) throws Exception { |
| | | return orderPrivateCarMapper.queryMyAllOrder(state, uid); |
| | | public List<Map<String, Object>> queryMyAllOrder(Integer state, Integer uid, Integer language) throws Exception { |
| | | return orderPrivateCarMapper.queryMyAllOrder(state, uid, language); |
| | | } |
| | | |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryPushOrder(Integer orderId) throws Exception { |
| | | return orderPrivateCarMapper.queryPushOrder(orderId); |
| | | public Map<String, Object> queryPushOrder(Integer orderId, Integer language) throws Exception { |
| | | return orderPrivateCarMapper.queryPushOrder(orderId, language); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | }).start(); |
| | | |
| | | systemNoticeService.addSystemNotice(2, "您已成功抢得专车订单,请及时联系客户!", orderPrivateCar.getDriverId()); |
| | | systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getLastName().substring(0, 1) + "师傅,请保持电话畅通!", orderPrivateCar.getUserId()); |
| | | systemNoticeService.addSystemNotice(2, language == 1 ? "您已成功抢得打车订单,请及时联系客户!" : |
| | | language == 2 ? "You have successfully grabbed a taxi order, please contact the customer in time!" |
| | | : "Vous avez saisi avec succès une commande de taxi, veuillez contacter le client à temps!", orderPrivateCar.getDriverId()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您的订单已指派给" + driver.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language == 2 ? "Your order has been assigned to " + driver.getFirstName() + " master, please keep the phone open!" |
| | | : "Votre commande a été attribuée à " + driver.getFirstName() + " master, veuillez garder le téléphone ouvert!", orderPrivateCar.getUserId()); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | public List<OrderPrivateCar> getSmsOrderList() { |
| | | return this.baseMapper.getSmsOrderList(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void payOrderPrivateCarCallback(Integer id, String order_id, Integer language) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(id); |
| | | PaymentRecord query = paymentRecordService.query(1, orderPrivateCar.getDriverId(), 2, id, 1, null, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(orderPrivateCar.getDriverId(), language == 1 ? "现金收款代付" : language == 2 ? "Cash collection on behalf of payment" : "Paiement en espèces", query.getAmount(), 2, 1, 2, 1, id); |
| | | orderPrivateCar.setDriverPay(2); |
| | | this.updateById(orderPrivateCar); |
| | | |
| | | query.setState(2); |
| | | query.setCode(order_id); |
| | | paymentRecordService.updateById(query); |
| | | }else{ |
| | | System.err.println("预支付数据异常(orderId = " + id + ")"); |
| | | } |
| | | } |
| | | } |