|
@@ -197,23 +197,25 @@ public class UserWithdrawalServiceImpl extends ServiceImpl<UserWithdrawalDao, Us
|
|
|
public HttpResponseResult<Boolean> batchAuth(AuthOperaReq authOperaReq, SysUser sysUser) {
|
|
|
List<Long> ids = Arrays.asList(StringUtil.toLongArray(StringPool.COMMA, authOperaReq.getId()));
|
|
|
|
|
|
- List<UserWithdrawal> userWithdrawals = baseMapper.selectList(Wrappers.<UserWithdrawal>lambdaQuery()
|
|
|
- .in(UserWithdrawal::getId, ids)
|
|
|
- .eq(UserWithdrawal::getAuthStatus, AuthStatusEnum.DOING));
|
|
|
-
|
|
|
//先判断三方余额是否充足
|
|
|
- //总提现金额
|
|
|
- BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
- for (UserWithdrawal withdrawal : userWithdrawals) {
|
|
|
- if (null != withdrawal.getActualAmount()
|
|
|
- && BigDecimal.ZERO.compareTo(withdrawal.getActualAmount()) <= 0) {
|
|
|
- totalAmount = totalAmount.add(withdrawal.getActualAmount());
|
|
|
+ if(authOperaReq.getPass()){
|
|
|
+ List<UserWithdrawal> userWithdrawals = baseMapper.selectList(Wrappers.<UserWithdrawal>lambdaQuery()
|
|
|
+ .in(UserWithdrawal::getId, ids)
|
|
|
+ .eq(UserWithdrawal::getAuthStatus, AuthStatusEnum.DOING));
|
|
|
+ //总提现金额
|
|
|
+ BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
+ for (UserWithdrawal withdrawal : userWithdrawals) {
|
|
|
+ if (null != withdrawal.getActualAmount()
|
|
|
+ && BigDecimal.ZERO.compareTo(withdrawal.getActualAmount()) <= 0) {
|
|
|
+ totalAmount = totalAmount.add(withdrawal.getActualAmount());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ BigDecimal useDecimal = withdrawSdk.balanceQuery();
|
|
|
+ if (useDecimal.compareTo(totalAmount) < 0) {
|
|
|
+ return HttpResponseResult.failed("账户余额不足");
|
|
|
}
|
|
|
}
|
|
|
- BigDecimal useDecimal = withdrawSdk.balanceQuery();
|
|
|
- if (useDecimal.compareTo(totalAmount) < 0) {
|
|
|
- return HttpResponseResult.failed("账户余额不足");
|
|
|
- }
|
|
|
+
|
|
|
int successNum = 0;
|
|
|
String msg = "执行完成!";
|
|
|
for (Long id : ids) {
|