|
@@ -637,7 +637,7 @@ public class AppUserCountTask {
|
|
double bettingAmount = curTranList.stream().filter(e->
|
|
double bettingAmount = curTranList.stream().filter(e->
|
|
e.getCurrencyType().intValue() == 4
|
|
e.getCurrencyType().intValue() == 4
|
|
).mapToDouble(FinTranRecord::getDiamondCoinChange).sum() * -1;
|
|
).mapToDouble(FinTranRecord::getDiamondCoinChange).sum() * -1;
|
|
- log.info("用户{},充值:{} 以满足流水:{}",userId,money,bettingAmount);
|
|
|
|
|
|
+ log.info("用户{},充值:{} 已满足流水:{}",userId,money,bettingAmount);
|
|
if(bettingAmount >= money * 2){
|
|
if(bettingAmount >= money * 2){
|
|
//更新为已满足提现
|
|
//更新为已满足提现
|
|
userChargeList.forEach(e->{
|
|
userChargeList.forEach(e->{
|
|
@@ -659,6 +659,9 @@ public class AppUserCountTask {
|
|
public void updateWithdrawAble(Long userId){
|
|
public void updateWithdrawAble(Long userId){
|
|
if(null != userId && userId.longValue() == -1){
|
|
if(null != userId && userId.longValue() == -1){
|
|
userId = null;
|
|
userId = null;
|
|
|
|
+ if(!taskSwitch){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//查询所有已满足提现的充值、转账
|
|
//查询所有已满足提现的充值、转账
|
|
String chargeType3 = FinTranType3.ON_LINE_CHARGE.getType() + "," + FinTranType3.CHARGE_IN.getType()+ "," + FinTranType3.CHARGE_IN_Back.getType()
|
|
String chargeType3 = FinTranType3.ON_LINE_CHARGE.getType() + "," + FinTranType3.CHARGE_IN.getType()+ "," + FinTranType3.CHARGE_IN_Back.getType()
|
|
@@ -704,6 +707,23 @@ public class AppUserCountTask {
|
|
//清除用户缓存
|
|
//清除用户缓存
|
|
redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(uid)));
|
|
redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(uid)));
|
|
}
|
|
}
|
|
|
|
+ }else if(null != userId){
|
|
|
|
+ //查询所有未满足提现的充值、转账
|
|
|
|
+ List<FinTranRecord> notchargeList = finTranRecordService.selectUserTran(FinTranType1.U_Income_Coin_Balance.getType(),chargeType3,userId,null,null,0);
|
|
|
|
+ if(null != notchargeList && notchargeList.size() > 0) {
|
|
|
|
+ log.info("用户{},有为满足提现订单,停止更新可提现余额",userId);
|
|
|
|
+ }else{
|
|
|
|
+ //查询用户这段时间流水记录
|
|
|
|
+ List<FinTranRecord> curTranList = finTranRecordService.selectUserTran(null, null, userId, null, null, null);
|
|
|
|
+ double withdrawAble = curTranList.stream().filter(e->FinTranType3.CONSUM_GAME_ANCHOR_WITHDRAW.getType()!=e.getTranType3().intValue()).mapToDouble(FinTranRecord::getDiamondCoinChange).sum();
|
|
|
|
+ AppUser updateUser = new AppUser();
|
|
|
|
+ updateUser.setUserid(userId);
|
|
|
|
+ updateUser.setWithdrawAble(withdrawAble);
|
|
|
|
+ appUserService.updateAppUser(updateUser);
|
|
|
|
+ log.info("用户{},可提现额度{}",userId,withdrawAble);
|
|
|
|
+ //清除用户缓存
|
|
|
|
+ redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(userId)));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|