| | |
| | | @Autowired |
| | | private IOrderPositionService orderPositionService; |
| | | |
| | | @Autowired |
| | | private ICompanyFundFlowService companyFundFlowService; |
| | | |
| | | @Value("${callbackPath}") |
| | | private String callbackPath;//支付回调网关地址 |
| | | |
| | |
| | | accountChangeDetailService.insert(accountChangeDetail); |
| | | |
| | | //补贴中分账 |
| | | Double balance = revenueService.queryCompanyBalance();//平台账户余额 |
| | | |
| | | Double discountedPrice = order.getDiscountedPrice(); |
| | | List<RechargeRecord> rechargeRecords = rechargeRecordService.selectList(new EntityWrapper<RechargeRecord>().eq("type", 4).eq("payStatus", 2).gt("surplusDividedAmount", 0).orderBy("createTime")); |
| | | for (RechargeRecord rechargeRecord : rechargeRecords) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | CompanyFundFlow companyFundFlow = new CompanyFundFlow(); |
| | | companyFundFlow.setType(5); |
| | | companyFundFlow.setObjectType(1); |
| | | companyFundFlow.setBalance(new BigDecimal(balance)); |
| | | companyFundFlow.setMoney(new BigDecimal(order.getDiscountedPrice())); |
| | | companyFundFlow.setCreateTime(new Date()); |
| | | companyFundFlowService.insert(companyFundFlow); |
| | | } |
| | | } |
| | | this.updateById(order); |
| | |
| | | } |
| | | //处理代理商抽佣 |
| | | if(num3 > 0){ |
| | | Double balance = revenueService.queryAgentBalance(driver.getAgentId()); |
| | | Revenue revenue = new Revenue(); |
| | | revenue.setType(1); |
| | | revenue.setUserType(3); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | CompanyFundFlow companyFundFlow = new CompanyFundFlow(); |
| | | companyFundFlow.setType(3); |
| | | companyFundFlow.setObjectType(2); |
| | | companyFundFlow.setObjectId(driver.getAgentId()); |
| | | companyFundFlow.setBalance(new BigDecimal(balance)); |
| | | companyFundFlow.setMoney(new BigDecimal(num3)); |
| | | companyFundFlow.setCreateTime(new Date()); |
| | | companyFundFlowService.insert(companyFundFlow); |
| | | } |
| | | } |
| | | } |