| | |
| | | <sourceOutputDir name="target/generated-sources/annotations" /> |
| | | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> |
| | | <outputRelativeToContentRoot value="true" /> |
| | | <module name="guns-core" /> |
| | | <module name="guns-rest" /> |
| | | <module name="guns-generator" /> |
| | | <module name="guns-core" /> |
| | | <module name="guns-admin" /> |
| | | </profile> |
| | | </annotationProcessing> |
| | | </component> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="Encoding"> |
| | | <file url="file://$PROJECT_DIR$/guns-admin/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/guns-core/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/guns-generator/src/main/java" charset="UTF-8" /> |
| | | <file url="file://$PROJECT_DIR$/guns-rest/src/main/java" charset="UTF-8" /> |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | package com.stylefeng.guns.modular.CharteredCar.server.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | this.updateById(orderCharteredCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, money); |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, money,null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成感谢费支付,谢谢使用!", uid, 1); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | if(payType==4){ |
| | |
| | | private AppOrderController appOrderController; |
| | | |
| | | @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 { |
| | | OrderCharteredCar orderCharteredCar = this.selectById(orderId); |
| | | PaymentRecord query = paymentRecordService.query(3, orderCharteredCar.getUserId(), 1, orderId, 6, payType, 1); |
| | | query.setState(2); |
| | |
| | | this.updateById(orderCharteredCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, query.getAmount()); |
| | | incomeService.saveData(1, 1, 6, orderCharteredCar.getId(), 6, query.getAmount(),out_trade_no); |
| | | systemNoticeService.addSystemNotice(1, "您已使用" + (payType == 1 ? "微信" : (payType==2?"支付宝":"云闪付")) + "成功完成感谢费支付,谢谢使用!", userInfo.getId(), 1); |
| | | } |
| | | |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 1); |
| | | orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 1); |
| | | orderTaxiService.payCancelOrderTaxi(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1); |
| | | orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1,out_trade_no); |
| | | break; |
| | | } |
| | | |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0); |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null); |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null,out_trade_no); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 5: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | } |
| | | |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0); |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 1,0,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null); |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1,null,out_trade_no); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | case 5: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1,out_trade_no); |
| | | break; |
| | | } |
| | | |
| | |
| | | Integer type = Integer.valueOf(split[1]); |
| | | switch (type){ |
| | | case 1: |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 2); |
| | | orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 2,out_trade_no); |
| | | break; |
| | | case 2: |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 2,0); |
| | | orderTaxiService.payOrderTaxiCallback(id, order_id, 2,0,out_trade_no); |
| | | break; |
| | | case 3: |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 2,null); |
| | | orderCrossCityService.payOrderCrossCityCallback(id, order_id, 2,null,out_trade_no); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2,out_trade_no); |
| | | break; |
| | | case 5: |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2); |
| | | orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2,out_trade_no); |
| | | break; |
| | | } |
| | | PrintWriter out = response.getWriter(); |
| | |
| | | String[] s = out_trade_no.split("_"); |
| | | switch (Integer.valueOf(s[1])){ |
| | | case 1: |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderPrivateCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 2: |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderTaxiService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 3: |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCrossCityService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 4: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 5: |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderLogisticsService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 6: |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCharteredCarService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | case 7: |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1); |
| | | orderCallService.payThankYouFeeCallback(Integer.valueOf(s[0]), order_id, 1,out_trade_no); |
| | | } |
| | | |
| | | PrintWriter out = response.getWriter(); |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | this.updateById(orderCall); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, money); |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, money,null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成感谢费支付,谢谢使用!", uid, 1); |
| | | |
| | | } |
| | |
| | | private AppOrderController appOrderController; |
| | | |
| | | @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 { |
| | | OrderCall orderCall = this.selectById(orderId); |
| | | PaymentRecord query = paymentRecordService.query(3, orderCall.getUserId(), 1, orderId, 7, payType, 1); |
| | | query.setState(2); |
| | |
| | | this.updateById(orderCall); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, query.getAmount()); |
| | | incomeService.saveData(1, 1, 6, orderCall.getId(), 7, query.getAmount(),out_trade_no); |
| | | systemNoticeService.addSystemNotice(1, "您已使用" + (payType == 1 ? "微信" : (payType==2?"支付宝":"云闪付")) + "成功完成感谢费支付,谢谢使用!", userInfo.getId(), 1); |
| | | } |
| | | } |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | @TableField("outTradeNo") |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public String getBillNo() { |
| | | return billNo; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no) throws Exception; |
| | | void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payCancelOrderCrossCity(Integer id, String order_id, Integer type) throws Exception; |
| | | void payCancelOrderCrossCity(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no) throws Exception { |
| | | public void payOrderCrossCityCallback(Integer id, String order_id, Integer type,String no,String out_trade_no) throws Exception { |
| | | OrderCrossCity orderCrossCity = this.selectById(id); |
| | | orderCrossCity.setOutTradeNo(out_trade_no); |
| | | |
| | | |
| | | PaymentRecord query = paymentRecordService.query(1, orderCrossCity.getUserId(), 1, Integer.valueOf(id), 3, type, 1); |
| | | if(null != query && query.getState() == 1){ |
| | | //添加交易明细 |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getMoney()); |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getMoney(),null); |
| | | |
| | | this.deleteTask(id);//删除定时任务 |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payCancelOrderCrossCity(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payCancelOrderCrossCity(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderCrossCity orderCrossCity = this.selectById(id); |
| | | orderCrossCity.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderCrossCity.getUserId(), 1, Integer.valueOf(id), 3, type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getAmount()); |
| | | incomeService.saveData(1, orderCrossCity.getCompanyId(), 3, orderCrossCity.getId(), 3, query.getAmount(),out_trade_no); |
| | | |
| | | this.deleteTask(orderCrossCity.getId());//删除定时任务 |
| | | |
| | |
| | | this.updateById(orderCrossCity); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, money); |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, money,null); |
| | | Driver driver = driverService.selectById(orderCrossCity.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 { |
| | | OrderCrossCity orderCrossCity = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderCrossCity.getUserId()); |
| | | PaymentRecord query = paymentRecordService.query(3, userInfo.getId(), 1, orderId, 3, payType, 1); |
| | |
| | | this.updateById(orderCrossCity); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, query.getAmount()); |
| | | incomeService.saveData(2, orderCrossCity.getDriverId(), 6, orderCrossCity.getId(), 3, query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderCrossCity.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()); |
| | |
| | | private String splitAllocation; |
| | | |
| | | |
| | | @TableField("outTradeNo") |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public String getTelXOne() { |
| | | return telXOne; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderLogisticsCallback(Integer id, String order_id, Integer type) throws Exception; |
| | | void payOrderLogisticsCallback(Integer id, String order_id, Integer type,String outTradeNo) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | |
| | | |
| | | @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()); |
| | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | @TableField("outTradeNo") |
| | | /** |
| | | * 交易流水号 |
| | | */ |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public Integer getSpellSuccess() { |
| | | return spellSuccess; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payCancelOrderPrivateCar(Integer id, String order_id, Integer type) throws Exception; |
| | | void payCancelOrderPrivateCar(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderPrivateCarCallback(Integer id, String order_id, Integer type) throws Exception; |
| | | void payOrderPrivateCarCallback(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | |
| | | /** |
| | | * 获取订单详情页(服务中的页面) |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getMoney()); |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getMoney(),null); |
| | | |
| | | this.deleteTask(id);//删除定时任务 |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payCancelOrderPrivateCar(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payCancelOrderPrivateCar(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(id); |
| | | orderPrivateCar.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderPrivateCar.getUserId(), 1, Integer.valueOf(id), 1, type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getAmount()); |
| | | incomeService.saveData(1, orderPrivateCar.getCompanyId(), 3, orderPrivateCar.getId(), 1, query.getAmount(),out_trade_no); |
| | | |
| | | this.deleteTask(orderPrivateCar.getId());//删除定时任务 |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void payOrderPrivateCarCallback(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payOrderPrivateCarCallback(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(id); |
| | | orderPrivateCar.setOutTradeNo(out_trade_no); |
| | | |
| | | PaymentRecord query = paymentRecordService.query(1, orderPrivateCar.getUserId(), 1, Integer.valueOf(id), 1, type, 1); |
| | | if(null != query && query.getState() == 1){ |
| | | //添加交易明细 |
| | |
| | | this.updateById(orderPrivateCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, money); |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, money,null); |
| | | Driver driver = driverService.selectById(orderPrivateCar.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 { |
| | | System.out.println(orderId+"_"+order_id+"_"+payType); |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderPrivateCar.getUserId()); |
| | |
| | | this.updateById(orderPrivateCar); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, query.getAmount()); |
| | | incomeService.saveData(2, orderPrivateCar.getDriverId(), 6, orderPrivateCar.getId(), 1, query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderPrivateCar.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()); |
| | |
| | | @ApiModelProperty("司机活动收入分类(1=邀请司机注册,2=邀请用户注册,3=快车累计在线,4=车租车累计在线,5=跨城累计在线,6=订单数奖励)") |
| | | private Integer activityType; |
| | | |
| | | |
| | | @TableField("reqSeqId") |
| | | private String reqSeqId; |
| | | @TableField("orgReqSeqId") |
| | | private String orgReqSeqId; |
| | | |
| | | public String getReqSeqId() { |
| | | return reqSeqId; |
| | | } |
| | | |
| | | public void setReqSeqId(String reqSeqId) { |
| | | this.reqSeqId = reqSeqId; |
| | | } |
| | | |
| | | public String getOrgReqSeqId() { |
| | | return orgReqSeqId; |
| | | } |
| | | |
| | | public void setOrgReqSeqId(String orgReqSeqId) { |
| | | this.orgReqSeqId = orgReqSeqId; |
| | | } |
| | | |
| | | public Integer getActivityType() { |
| | | return activityType; |
| | | } |
| | |
| | | * @param money |
| | | * @throws Exception |
| | | */ |
| | | void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money) throws Exception; |
| | | void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money,String orgReqSeqId) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money) throws Exception { |
| | | public void saveData(Integer userType, Integer objectId, Integer type, Integer incomeId, Integer orderType, Double money,String orgReqSeqId) throws Exception { |
| | | Income income = new Income(); |
| | | income.setUserType(userType); |
| | | income.setObjectId(objectId); |
| | |
| | | income.setMoney(new BigDecimal(money).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); |
| | | income.setInsertTime(new Date()); |
| | | income.setActivityType(2); |
| | | income.setOrgReqSeqId(orgReqSeqId); |
| | | this.insert(income); |
| | | } |
| | | |
| | |
| | | BigDecimal multiply1 = new BigDecimal(payMoney).multiply(new BigDecimal(percent / 100)); |
| | | //抽成金额小于最低金额,司机收入为0 |
| | | if(multiply1.compareTo(new BigDecimal(d)) < 0){ |
| | | saveData(1, 1, 2, orderId, orderType, d); |
| | | saveData(1, 1, 2, orderId, orderType, d,null); |
| | | //司机收入 |
| | | BigDecimal subtract = new BigDecimal(payMoney).subtract(new BigDecimal(d)); |
| | | if(subtract.compareTo(BigDecimal.ZERO) > 0){ |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue()); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null); |
| | | return subtract; |
| | | } |
| | | return new BigDecimal(0); |
| | |
| | | if(multiply1.compareTo(new BigDecimal(d)) >= 0 && multiply1.compareTo(new BigDecimal(g)) < 0){ |
| | | //司机收入 |
| | | BigDecimal subtract = new BigDecimal(payMoney).subtract(multiply1); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue()); |
| | | saveData(1, 1, 2, orderId, orderType, multiply1.doubleValue()); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null); |
| | | saveData(1, 1, 2, orderId, orderType, multiply1.doubleValue(),null); |
| | | return subtract; |
| | | } |
| | | if(multiply1.compareTo(new BigDecimal(g)) >= 0){ |
| | | //司机收入 |
| | | BigDecimal subtract = new BigDecimal(payMoney).subtract(new BigDecimal(g)); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue()); |
| | | saveData(1, 1, 2, orderId, orderType, g); |
| | | saveData(2, driverId, 2, orderId, orderType, subtract.doubleValue(),null); |
| | | saveData(1, 1, 2, orderId, orderType, g,null); |
| | | return subtract; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney()); |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney(),null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用余额成功完成出行卡支付,谢谢使用!", uid, 1); |
| | | } |
| | | if(payType==4){ |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney()); |
| | | incomeService.saveData(1, taxiCardPayment.getCompanyId(), 5, taxiCardPayment.getId(), null, taxiCardPayment.getPayMoney(),null); |
| | | systemNoticeService.addSystemNotice(1, "您已使用" + (taxiCardPayment.getPayType() == 1 ? "微信" : (taxiCardPayment.getPayType()==2?"支付宝":"云闪付")) + "成功完成出行卡支付,谢谢使用!", taxiCardPayment.getUserId(), 1); |
| | | System.out.println("wxdck okok"); |
| | | }catch (Exception e){ |
| | |
| | | for(Map<String, Object> map : query){ |
| | | if(Double.valueOf(String.valueOf(map.get("money"))).compareTo(0D) > 0){ |
| | | bigDecimal = bigDecimal.add(new BigDecimal(String.valueOf(map.get("money")))); |
| | | incomeService.saveData(2, driver.getId(), 1, Integer.valueOf(String.valueOf(map.get("id"))), null, Double.valueOf(String.valueOf(map.get("money")))); |
| | | incomeService.saveData(2, driver.getId(), 1, Integer.valueOf(String.valueOf(map.get("id"))), null, Double.valueOf(String.valueOf(map.get("money"))),null); |
| | | } |
| | | } |
| | | driver.setActivityMoney(bigDecimal.add(new BigDecimal(null == driver.getActivityMoney() ? 0 : driver.getActivityMoney())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | HttpResponse execute = post.execute(); |
| | | System.out.println(execute.body()); |
| | | JSONObject jsonObject = JSONObject.parseObject(execute.body()); |
| | | jsonObject.put("req_seq_id",req_seq_id); |
| | | return ResultUtil.success(jsonObject); |
| | | } |
| | | |
| | |
| | | @TableField("bindId") |
| | | private String bindId; |
| | | |
| | | |
| | | |
| | | private String splitAllocation; |
| | | |
| | | @TableField("outTradeNo") |
| | | private String outTradeNo; |
| | | |
| | | public String getOutTradeNo() { |
| | | return outTradeNo; |
| | | } |
| | | |
| | | public void setOutTradeNo(String outTradeNo) { |
| | | this.outTradeNo = outTradeNo; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId) throws Exception; |
| | | void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param type 1=微信,2=支付宝 |
| | | * @throws Exception |
| | | */ |
| | | void payCancelOrderTaxi(Integer id, String order_id, Integer type) throws Exception; |
| | | void payCancelOrderTaxi(Integer id, String order_id, Integer type,String out_trade_no) throws Exception; |
| | | |
| | | |
| | | |
| | |
| | | * @param order_id |
| | | * @throws Exception |
| | | */ |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType) throws Exception; |
| | | void payThankYouFeeCallback(Integer orderId, String order_id, Integer payType,String out_trade_no) throws Exception; |
| | | } |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getMoney()); |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getMoney(),null); |
| | | |
| | | this.deleteTask(id);//删除定时任务 |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId) throws Exception { |
| | | public void payOrderTaxiCallback(Integer id, String order_id, Integer type,Integer paymentId,String out_trade_no) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(id); |
| | | orderTaxi.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderTaxi.getUserId(), 1, Integer.valueOf(id), 2, type, 1); |
| | | if(null != query && query.getState() == 1){ |
| | | //添加交易明细 |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public void payCancelOrderTaxi(Integer id, String order_id, Integer type) throws Exception { |
| | | public void payCancelOrderTaxi(Integer id, String order_id, Integer type,String out_trade_no) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(id); |
| | | orderTaxi.setOutTradeNo(out_trade_no); |
| | | PaymentRecord query = paymentRecordService.query(1, orderTaxi.getUserId(), 1, Integer.valueOf(id), 2, type, 1); |
| | | if(null != query){ |
| | | //添加交易明细 |
| | |
| | | } |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getAmount()); |
| | | incomeService.saveData(1, orderTaxi.getCompanyId(), 3, orderTaxi.getId(), 2, query.getAmount(),out_trade_no); |
| | | |
| | | this.deleteTask(orderTaxi.getId());//删除定时任务 |
| | | |
| | |
| | | this.updateById(orderTaxi); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, money); |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, money,null); |
| | | Driver driver = driverService.selectById(orderTaxi.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 { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | UserInfo userInfo = userInfoService.selectById(orderTaxi.getUserId()); |
| | | PaymentRecord query = paymentRecordService.query(3, userInfo.getId(), 1, orderId, 2, payType, 1); |
| | |
| | | this.updateById(orderTaxi); |
| | | |
| | | //添加已收入明细 |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, query.getAmount()); |
| | | incomeService.saveData(2, orderTaxi.getDriverId(), 6, orderTaxi.getId(), 2, query.getAmount(),out_trade_no); |
| | | Driver driver = driverService.selectById(orderTaxi.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()); |