| 
					
				 | 
			
			
				@@ -83,10 +83,10 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             defaultBank.setBankCard(ValueUtil.fuzzyBankCard(defaultBank.getBankCard())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             withdrawalInfoRes.setUserBankCard(defaultBank); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //获取平台提现手续费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //获取平台结算手续费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal withdrawalServiceFee = getWithdrawalServiceFee(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         withdrawalInfoRes.setWithdrawalServiceFee(withdrawalServiceFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //获取用户可用于提现余额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //获取用户可用于结算余额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         withdrawalInfoRes.setAmountWithdrawal(getAmountUsable(userId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return HttpResponseResult.succeed(withdrawalInfoRes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -97,26 +97,26 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal withdrawalServiceFee = getWithdrawalServiceFee(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //校验金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (withdrawalReq.getAmountWithdrawal().floatValue() <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return HttpResponseResult.failed("提现金额过小"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return HttpResponseResult.failed("结算金额过小"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //获取用户提现金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //获取用户结算金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal amountWithdrawal = getAmountUsable(user.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //比较大小 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (amountWithdrawal.compareTo(withdrawalReq.getAmountWithdrawal()) < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return HttpResponseResult.failed("账户余额不足"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //获取提现银行卡 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //获取结算银行卡 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         UserBankCardVo bankCardVo = bankCardDao.getBankByUserIdAndCardId(user.getId(), withdrawalReq.getBankCardId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (null == bankCardVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return HttpResponseResult.failed("未找到用户绑卡信息"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //插入用户提现表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //插入用户结算表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         UserWithdrawal userWithdrawal = insertUserWithdrawal(user.getId(), withdrawalReq, bankCardVo, withdrawalServiceFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //插入账户变更 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         UserAccountRecordDto accountRecordDto = new UserAccountRecordDto( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 user.getId(), withdrawalReq.getAmountWithdrawal(), InOrOutEnum.OUT, AccountBizTypeEnum.WITHDRAWAL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                userWithdrawal.getId(), "老师提现", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                userWithdrawal.getId(), "老师结算", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         accountRecordDto.setFrozenType(FrozenTypeEnum.FROZEN); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         accountRecordDto.setSaveRecord(false); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -129,7 +129,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return HttpResponseResult.succeed(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            throw new BizException("提现失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BizException("结算失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,15 +155,15 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             detail.setActualAmount(actualAmount.divide(new BigDecimal("100"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             detail.setTransferTime(callback.getEndTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //提现成功,账户解冻,入账户明细 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //结算成功,账户解冻,入账户明细 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             UserAccountRecordDto accountRecordDto = new UserAccountRecordDto( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     detail.getUserId(), detail.getAmount(), InOrOutEnum.OUT, AccountBizTypeEnum.WITHDRAWAL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    detail.getId(), "老师提现", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detail.getId(), "老师结算", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             accountRecordDto.setFrozenType(FrozenTypeEnum.FROZEN_DEDUCT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             accountRecordDto.setSaveRecord(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             userAccountService.accountChange(accountRecordDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //发生提现成功通知 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //发生结算成功通知 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             successSend(detail.getUserId(), detail.getPhone()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else if ("2".equals(callback.getStatus())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //交易失败 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -171,10 +171,10 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             detail.setErrorCode(callback.getErrorCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             detail.setErrorMsg(callback.getErrorMsg()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            //提现失败,账户解冻 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //结算失败,账户解冻 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             UserAccountRecordDto accountRecordDto = new UserAccountRecordDto( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     detail.getUserId(), detail.getAmount(), InOrOutEnum.OUT, AccountBizTypeEnum.WITHDRAWAL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    detail.getId(), "老师提现", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    detail.getId(), "老师结算", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             accountRecordDto.setFrozenType(FrozenTypeEnum.FROZEN_BACK); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             accountRecordDto.setSaveRecord(false); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -198,7 +198,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.TEACHER_WITHDRAW_SUCCESS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     receivers, null, 0, null, ClientEnum.TEACHER.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            log.error("老师提现极光消息推送异常,userId={}", userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            log.error("老师结算极光消息推送异常,userId={}", userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -270,7 +270,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //审核通过,账户解冻,入账户明细 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 UserAccountRecordDto accountRecordDto = new UserAccountRecordDto( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         old.getUserId(), old.getAmount(), InOrOutEnum.OUT, AccountBizTypeEnum.WITHDRAWAL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        userWithdrawal.getId(), "老师提现", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        userWithdrawal.getId(), "老师结算", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 accountRecordDto.setFrozenType(FrozenTypeEnum.FROZEN_DEDUCT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 accountRecordDto.setSaveRecord(true); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -281,7 +281,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //审核不通过,账户解冻 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 UserAccountRecordDto accountRecordDto = new UserAccountRecordDto( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         old.getUserId(), old.getAmount(), InOrOutEnum.OUT, AccountBizTypeEnum.WITHDRAWAL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        userWithdrawal.getId(), "老师提现", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        userWithdrawal.getId(), "老师结算", null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 accountRecordDto.setFrozenType(FrozenTypeEnum.FROZEN_BACK); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 accountRecordDto.setSaveRecord(false); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -292,7 +292,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /*** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 入提现表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 入结算表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @author liweifan 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param: userId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param: withdrawalReq 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -316,7 +316,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /*** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 获取平台提现服务费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 获取平台结算服务费 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @author liweifan 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param: userId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @updateTime 2022/4/7 14:59 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -336,7 +336,7 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /*** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 获取用户可提现金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 获取用户可结算金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @author liweifan 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param: userId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param: withdrawalServiceFee 
			 |