puzhibing
2023-08-04 d61812d87aa8ffc54eca9a8bfae078a1349e45d4
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -79,6 +79,12 @@
    @Autowired
    private IIncomeService incomeService;
    @Autowired
    private IPaymentRecordService paymentRecordService;
    @Autowired
    private ITransactionDetailsService transactionDetailsService;
    @Value("${filePath}")
    private String filePath;
@@ -95,8 +101,8 @@
     * @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);
    }
    /**
@@ -107,8 +113,8 @@
     * @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);
    }
@@ -119,8 +125,8 @@
     * @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);
    }
@@ -215,7 +221,7 @@
            }
        }).start();
        systemNoticeService.addSystemNotice(2, "您已成功抢得专车订单,请及时联系客户!", orderPrivateCar.getDriverId());
        systemNoticeService.addSystemNotice(2, "您已成功抢得打车订单,请及时联系客户!", orderPrivateCar.getDriverId());
        systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getLastName().substring(0, 1) + "师傅,请保持电话畅通!", orderPrivateCar.getUserId());
        return ResultUtil.success();
    }
@@ -723,4 +729,23 @@
    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 + ")");
        }
    }
}