|
@@ -634,8 +634,10 @@ public class AppUserCountTask {
|
|
|
List<FinTranRecord> curTranList = finTranRecordService.selectUserTran(null,type3s,userId,beginDate,endDate,0);
|
|
|
|
|
|
AppUser appUser = appUserService.getUserAsset(userId);
|
|
|
+
|
|
|
+ int count = appGameBettingService.selectBettingCount(userId,beginDate,endDate);
|
|
|
|
|
|
- if(null != appUser && appUser.getDiamondCoin().doubleValue() < 1){
|
|
|
+ if(null != appUser && appUser.getDiamondCoin().doubleValue() < 1 && count < 1){
|
|
|
|
|
|
|
|
|
FinTranRecord updateTran = new FinTranRecord();
|
|
@@ -643,28 +645,20 @@ public class AppUserCountTask {
|
|
|
updateTran.setWithdrawFlag(2);
|
|
|
finTranRecordService.updateFinTranRecord(updateTran);
|
|
|
log.info("用户{},流水单号:{} 因金额已使用完,该笔订单流水条件已作废",userId,tranRecord.getId());
|
|
|
-
|
|
|
|
|
|
- if(null != userChargeList && userChargeList.size() > 0){
|
|
|
- userChargeList.forEach(e->{
|
|
|
- FinTranRecord updateTran2 = new FinTranRecord();
|
|
|
- updateTran2.setId(e.getId());
|
|
|
- updateTran2.setWithdrawFlag(2);
|
|
|
- finTranRecordService.updateFinTranRecord(updateTran2);
|
|
|
- log.info("用户{},流水单号:{} 因金额已使用完,该笔订单流水条件已作废",userId,e.getId());
|
|
|
- });
|
|
|
- userChargeList.clear();
|
|
|
- }
|
|
|
+ dealRechare(userChargeList,userId);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
double amount = finTranRecordService.sumUserRechareTran(userId,beginDate,endDate);
|
|
|
- if(amount < 1){
|
|
|
+ if(amount < 1 && count < 1){
|
|
|
FinTranRecord updateTran = new FinTranRecord();
|
|
|
updateTran.setId(tranRecord.getId());
|
|
|
updateTran.setWithdrawFlag(2);
|
|
|
finTranRecordService.updateFinTranRecord(updateTran);
|
|
|
log.info("用户{},流水单号:{} 因充值金额已使用完,该笔订单流水条件已作废",userId,tranRecord.getId());
|
|
|
+
|
|
|
+ dealRechare(userChargeList,userId);
|
|
|
}else{
|
|
|
|
|
|
userChargeList.add(tranRecord);
|
|
@@ -796,4 +790,17 @@ public class AppUserCountTask {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void dealRechare(List<FinTranRecord> userChargeList,Long userId){
|
|
|
+ if(null != userChargeList && userChargeList.size() > 0) {
|
|
|
+ userChargeList.forEach(e -> {
|
|
|
+ FinTranRecord updateTran2 = new FinTranRecord();
|
|
|
+ updateTran2.setId(e.getId());
|
|
|
+ updateTran2.setWithdrawFlag(2);
|
|
|
+ finTranRecordService.updateFinTranRecord(updateTran2);
|
|
|
+ log.info("用户{},流水单号:{} 因金额已使用完,该笔订单流水条件已作废", userId, e.getId());
|
|
|
+ });
|
|
|
+ userChargeList.clear();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|