| | |
| | | |
| | | |
| | | @Override |
| | | public void payOrderLogisticsCallback(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payOrderLogisticsCallback(Integer id, String order_id, Integer type,String outTradeNo) throws Exception { |
| | | OrderLogistics orderLogistics = this.selectById(id); |
| | | orderLogistics.setOutTradeNo(outTradeNo); |
| | | |
| | | PaymentRecord query = paymentRecordService.query(1, orderLogistics.getUserId(), 1, Integer.valueOf(id), orderLogistics.getType(), type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | this.updateById(orderLogistics); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), money); |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), money,null); |
| | | Driver driver = driverService.selectById(orderLogistics.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception { |
| | | public void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception { |
| | | OrderLogistics orderLogistics = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderLogistics.getUserId()); |
| | | PaymentRecord query = paymentRecordService.query(3, userInfo.getId(), 1, orderId, orderLogistics.getType(), payType, 1); |
| | |
| | | this.updateById(orderLogistics); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), query.getAmount()); |
| | | incomeService.saveData(2, orderLogistics.getDriverId(), 6, orderLogistics.getId(), orderLogistics.getType(), query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderLogistics.getDriverId()); |
| | | driver.setBusinessMoney(new BigDecimal(null != driver.getBusinessMoney() ? driver.getBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | driver.setLaveBusinessMoney(new BigDecimal(null != driver.getLaveBusinessMoney() ? driver.getLaveBusinessMoney() : 0).add(new BigDecimal(query.getAmount())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |