|
@@ -14,12 +14,14 @@ import com.game.common.core.redis.RedisCache;
|
|
import com.game.common.entity.KeyValue;
|
|
import com.game.common.entity.KeyValue;
|
|
import com.game.common.utils.DateUtils;
|
|
import com.game.common.utils.DateUtils;
|
|
import com.game.common.utils.StringUtils;
|
|
import com.game.common.utils.StringUtils;
|
|
|
|
+import org.redisson.api.RLock;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
import java.util.function.Function;
|
|
import java.util.function.Function;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -95,7 +97,7 @@ public class AppUserCountServiceImpl extends ServiceImpl<AppUserCountMapper, App
|
|
}*/
|
|
}*/
|
|
if (!appUserCount.isUpdate()) {
|
|
if (!appUserCount.isUpdate()) {
|
|
//非全量更新
|
|
//非全量更新
|
|
- if (appUserCount.getRechargeAmount() != null) {
|
|
|
|
|
|
+ /*if (appUserCount.getRechargeAmount() != null) {
|
|
appUserCount.setRechargeAmount(userCount.getRechargeAmount() + appUserCount.getRechargeAmount());
|
|
appUserCount.setRechargeAmount(userCount.getRechargeAmount() + appUserCount.getRechargeAmount());
|
|
}
|
|
}
|
|
if (appUserCount.getRechargeCommission() != null) {
|
|
if (appUserCount.getRechargeCommission() != null) {
|
|
@@ -104,7 +106,7 @@ public class AppUserCountServiceImpl extends ServiceImpl<AppUserCountMapper, App
|
|
if (appUserCount.getRechargeGive() != null) {
|
|
if (appUserCount.getRechargeGive() != null) {
|
|
appUserCount.setRechargeGive(userCount.getRechargeGive() + appUserCount.getRechargeGive());
|
|
appUserCount.setRechargeGive(userCount.getRechargeGive() + appUserCount.getRechargeGive());
|
|
}
|
|
}
|
|
- if (appUserCount.getWithdrawalCommission() != null) {
|
|
|
|
|
|
+ if (appUserCount.getWithdrawalAmount() != null) {
|
|
appUserCount.setWithdrawalAmount(userCount.getWithdrawalAmount() + appUserCount.getWithdrawalAmount());
|
|
appUserCount.setWithdrawalAmount(userCount.getWithdrawalAmount() + appUserCount.getWithdrawalAmount());
|
|
}
|
|
}
|
|
if (appUserCount.getWithdrawalCommission() != null) {
|
|
if (appUserCount.getWithdrawalCommission() != null) {
|
|
@@ -136,9 +138,13 @@ public class AppUserCountServiceImpl extends ServiceImpl<AppUserCountMapper, App
|
|
}
|
|
}
|
|
if (appUserCount.getLiveProfit() != null) {
|
|
if (appUserCount.getLiveProfit() != null) {
|
|
appUserCount.setLiveProfit(userCount.getLiveProfit() + appUserCount.getLiveProfit());
|
|
appUserCount.setLiveProfit(userCount.getLiveProfit() + appUserCount.getLiveProfit());
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
+ //增量更新
|
|
|
|
+ appUserCountMapper.updateCount(appUserCount);//增量累加
|
|
|
|
+ }else{
|
|
|
|
+ res = appUserCountMapper.updateById(appUserCount);
|
|
}
|
|
}
|
|
- res = appUserCountMapper.updateById(appUserCount);
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|