puzhibing
2023-07-20 8692f6f0807a1e70f3a1988834b0e5d6a8080753
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;
@@ -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 + ")");
        }
    }
}