|
@@ -68,7 +68,7 @@ public class AppUserCountTask {
|
|
|
* 统计用户前一天
|
|
|
* */
|
|
|
public void statistics(String dateTime){
|
|
|
- log.info("开始统计用户每日直播、游戏、佣金");
|
|
|
+ /*log.info("开始统计用户每日直播、游戏、佣金");
|
|
|
try {
|
|
|
Date curDate = DateUtil.offsetDay(DateUtils.getNowDate(), -1);
|
|
|
if (StringUtils.isNotBlank(dateTime)) {
|
|
@@ -107,11 +107,11 @@ public class AppUserCountTask {
|
|
|
//充值服务费/手续费
|
|
|
appUserCount.setRechargeCommission(appUsersChargeList.stream().filter(e -> e.getUid().equals(appUser.getUserid())).mapToDouble(e -> e.getPlatformService()).sum());
|
|
|
//充值赠送余额
|
|
|
- /*appUserCount.setRechargeGive(finTranRecordList.stream().filter(e -> {
|
|
|
+ *//*appUserCount.setRechargeGive(finTranRecordList.stream().filter(e -> {
|
|
|
return e.getUid().equals(appUser.getUserid()) &&
|
|
|
e.getTranType1().intValue() == FinTranType1.U_Income_Coin_Balance.getType() &&
|
|
|
e.getTranType3().intValue() == FinTranType3.CHARGE_IN_REWARD.getType();
|
|
|
- }).mapToDouble(e->e.getCoinChange()).sum()); */
|
|
|
+ }).mapToDouble(e->e.getCoinChange()).sum()); *//*
|
|
|
appUserCount.setRechargeGive(appUsersChargeList.stream().filter(e -> {
|
|
|
return e.getUid().equals(appUser.getUserid());
|
|
|
}).mapToDouble(e->null==e.getCoinGive()?0:e.getCoinGive().doubleValue()).sum());
|
|
@@ -180,7 +180,7 @@ public class AppUserCountTask {
|
|
|
}catch (Exception e){
|
|
|
log.info("用户每日直播、游戏、佣金统计异常:{}",e.getMessage());
|
|
|
}
|
|
|
- log.info("用户每日直播、游戏、佣金统计完成");
|
|
|
+ log.info("用户每日直播、游戏、佣金统计完成");*/
|
|
|
|
|
|
}
|
|
|
|
|
@@ -188,7 +188,7 @@ public class AppUserCountTask {
|
|
|
* 统计用户直播/充值 (增量更新 1分钟)
|
|
|
* */
|
|
|
public void statisticsLive(){
|
|
|
- log.info("开始增量更新用户每日直播、佣金");
|
|
|
+ /*log.info("开始增量更新用户每日直播、佣金");
|
|
|
try {
|
|
|
Long userId = null;
|
|
|
Date curDate = new Date();
|
|
@@ -222,11 +222,11 @@ public class AppUserCountTask {
|
|
|
//充值服务费/手续费
|
|
|
appUserCount.setRechargeCommission(appUsersChargeList.stream().filter(e -> e.getUid().equals(appUser.getUserid())).mapToDouble(e -> e.getPlatformService()).sum());
|
|
|
//充值赠送余额
|
|
|
- /*appUserCount.setRechargeGive(finTranRecordList.stream().filter(e -> {
|
|
|
+ *//*appUserCount.setRechargeGive(finTranRecordList.stream().filter(e -> {
|
|
|
return e.getUid().equals(appUser.getUserid()) &&
|
|
|
e.getTranType1().intValue() == FinTranType1.U_Income_Coin_Balance.getType() &&
|
|
|
e.getTranType3().intValue() == FinTranType3.CHARGE_IN_REWARD.getType();
|
|
|
- }).mapToDouble(e->e.getCoinChange()).sum());*/
|
|
|
+ }).mapToDouble(e->e.getCoinChange()).sum());*//*
|
|
|
appUserCount.setRechargeGive(appUsersChargeList.stream().filter(e -> {
|
|
|
return e.getUid().equals(appUser.getUserid());
|
|
|
}).mapToDouble(e->null==e.getCoinGive()?0:e.getCoinGive().doubleValue()).sum());
|
|
@@ -248,7 +248,7 @@ public class AppUserCountTask {
|
|
|
}catch (Exception e){
|
|
|
log.info("增量更新用户每日直播、佣金统计异常:{}",e.getMessage());
|
|
|
}
|
|
|
- log.info("增量更新用户每日直播、佣金统计完成");
|
|
|
+ log.info("增量更新用户每日直播、佣金统计完成");*/
|
|
|
|
|
|
}
|
|
|
|
|
@@ -258,7 +258,7 @@ public class AppUserCountTask {
|
|
|
* */
|
|
|
@DSTransactional
|
|
|
public void calculateDividends(String dateTime){
|
|
|
- try {
|
|
|
+ /*try {
|
|
|
log.info("开始每周代理分红");
|
|
|
String dateNo = dealDividendsNew(dateTime);
|
|
|
log.info("每周代理分红完成");
|
|
@@ -277,7 +277,7 @@ public class AppUserCountTask {
|
|
|
log.info("系统用户的直属下级自动发放分红完成");
|
|
|
}catch (Exception e){
|
|
|
log.info("每周分红失败:{}",e.getMessage());
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
}
|
|
|
|
|
@@ -285,7 +285,7 @@ public class AppUserCountTask {
|
|
|
* 分红(已废弃)
|
|
|
* */
|
|
|
private void dealDividends(String dateTime){
|
|
|
- Date curDate = DateUtil.offsetDay(DateUtils.getNowDate(), -1);
|
|
|
+ /*Date curDate = DateUtil.offsetDay(DateUtils.getNowDate(), -1);
|
|
|
if (StringUtils.isNotBlank(dateTime)) {
|
|
|
curDate = DateUtil.parse(dateTime, "yyyy-MM-dd");
|
|
|
} else {
|
|
@@ -303,11 +303,11 @@ public class AppUserCountTask {
|
|
|
String beginTimeStr = DateUtil.format(beginTime,"yyyy-MM-dd");
|
|
|
String endTimeStr = DateUtil.format(endTime,"yyyy-MM-dd");
|
|
|
//查询用户所有下级本周盈亏
|
|
|
- /*LambdaQueryWrapper<AppUserCount> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ *//*LambdaQueryWrapper<AppUserCount> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.ge(AppUserCount::getStrDate, beginTimeStr);
|
|
|
queryWrapper.le(AppUserCount::getStrDate, endTimeStr);
|
|
|
queryWrapper.eq(AppUserCount::getAgentUserId, appUser.getUserid());
|
|
|
- List<AppUserCount> appUserCountList = appUserCountService.list(queryWrapper);*/
|
|
|
+ List<AppUserCount> appUserCountList = appUserCountService.list(queryWrapper);*//*
|
|
|
List<AppUserCount> appUserCountList = appUserCountService.getAppUserCountNew(appUser.getUserid(),beginTimeStr,endTimeStr);
|
|
|
if (null != appUserCountList && appUserCountList.size() > 0) {
|
|
|
//游戏输钱
|
|
@@ -360,14 +360,14 @@ public class AppUserCountTask {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 分红
|
|
|
* */
|
|
|
private String dealDividendsNew(String dateTime){
|
|
|
- String resDate = "";
|
|
|
+ /*String resDate = "";
|
|
|
Date curDate = DateUtil.offsetDay(DateUtils.getNowDate(), -1);
|
|
|
if (StringUtils.isNotBlank(dateTime)) {
|
|
|
curDate = DateUtil.parse(dateTime, "yyyy-MM-dd");
|
|
@@ -392,11 +392,11 @@ public class AppUserCountTask {
|
|
|
String beginTimeStr = DateUtil.format(beginTime,"yyyy-MM-dd");
|
|
|
String endTimeStr = DateUtil.format(endTime,"yyyy-MM-dd");
|
|
|
//查询用户所有下级本周盈亏
|
|
|
- /*LambdaQueryWrapper<AppUserCount> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ *//*LambdaQueryWrapper<AppUserCount> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.ge(AppUserCount::getStrDate, beginTimeStr);
|
|
|
queryWrapper.le(AppUserCount::getStrDate, endTimeStr);
|
|
|
queryWrapper.eq(AppUserCount::getAgentUserId, appUser.getUserid());
|
|
|
- List<AppUserCount> appUserCountList = appUserCountService.list(queryWrapper);*/
|
|
|
+ List<AppUserCount> appUserCountList = appUserCountService.list(queryWrapper);*//*
|
|
|
List<AppUserCount> appUserCountList = appUserCountService.getAppUserCountNew(appUser.getUserid(),beginTimeStr,endTimeStr);
|
|
|
if (null != appUserCountList && appUserCountList.size() > 0) {
|
|
|
//游戏输钱
|
|
@@ -440,14 +440,15 @@ public class AppUserCountTask {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- return resDate;
|
|
|
+ return resDate;*/
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 更新用户下级列表
|
|
|
* */
|
|
|
public void statisticsTeam(){
|
|
|
- AppUserAgent query = new AppUserAgent();
|
|
|
+ /*AppUserAgent query = new AppUserAgent();
|
|
|
List<AppUserAgent> userAgents = appUserAgentService.selectAppUserAgentList(query);
|
|
|
userAgents.forEach(appUserAgent -> {
|
|
|
AppUserAgent updateAgent = new AppUserAgent();
|
|
@@ -455,22 +456,24 @@ public class AppUserCountTask {
|
|
|
List<String> userIds = userAgents.stream().filter(e->e.getPid().equals(appUserAgent.getUserId())).map(e->{return String.valueOf(e.getUserId());}).collect(Collectors.toList());
|
|
|
updateAgent.setSubset(String.join(",",userIds));
|
|
|
appUserAgentService.updateAppUserAgent(updateAgent);
|
|
|
- });
|
|
|
+ });*/
|
|
|
}
|
|
|
|
|
|
public void reloadDividendCache(String dateTime,String topUserId){
|
|
|
- appUserCountDividendService.reloadCache(dateTime,StringUtils.isBlank(topUserId)?null:Arrays.asList(Long.valueOf(topUserId)));
|
|
|
+// appUserCountDividendService.reloadCache(dateTime,StringUtils.isBlank(topUserId)?null:Arrays.asList(Long.valueOf(topUserId)));
|
|
|
}
|
|
|
|
|
|
//凌晨清除缓存
|
|
|
public void cleanCache(){
|
|
|
- redisCache.deleteObject(CacheConstants.USER_GAME_RECORD_COUNT.concat("*"));
|
|
|
+
|
|
|
+// redisCache.deleteObject(CacheConstants.USER_GAME_RECORD_COUNT.concat("*"));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 金额为负数则转为正数
|
|
|
* */
|
|
|
private double dealMoney(double money){
|
|
|
+
|
|
|
return money<0?money*-1:money;
|
|
|
}
|
|
|
|