|
@@ -123,7 +123,7 @@ public class AppAgentController extends BaseController {
|
|
|
double winLose = 0;
|
|
|
winLose = AppUserAgent.calMoney(e, winLose);
|
|
|
if (winLose > 0) {
|
|
|
- return BigDecimal.valueOf(winLose * e.getDividendGuaranteeRate() / 100).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
+ return BigDecimal.valueOf(winLose * e.getDividendGuaranteeRate() / 100).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
} else {
|
|
|
return 0;
|
|
|
}
|
|
@@ -137,7 +137,7 @@ public class AppAgentController extends BaseController {
|
|
|
}).sum();
|
|
|
|
|
|
if(winLose > 0){
|
|
|
- money += BigDecimal.valueOf(winLose * teamUser.getDividendGuaranteeRate() / 100).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
+ money += BigDecimal.valueOf(winLose * teamUser.getDividendGuaranteeRate() / 100).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -149,33 +149,33 @@ public class AppAgentController extends BaseController {
|
|
|
money = 0;
|
|
|
}*/
|
|
|
//预计分红
|
|
|
- vo.setMyCommission(BigDecimal.valueOf(money>0?money:0).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
- vo.setLiveCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getLiveCommission()).sum()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
- vo.setGameCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getGameCommission()).sum()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setMyCommission(BigDecimal.valueOf(money>0?money:0).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setLiveCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getLiveCommission()).sum()).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setGameCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getGameCommission()).sum()).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队人数
|
|
|
vo.setTeamUser(appUserAgentList.stream().collect(Collectors.toList()).size());
|
|
|
//团队充值
|
|
|
vo.setTeamRecharge(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->{
|
|
|
return e.getRechargeAmount();
|
|
|
- }).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ }).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队充值赠送金额
|
|
|
- vo.setRechargeGive(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getRechargeGive()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setRechargeGive(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getRechargeGive()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队充值手续费
|
|
|
- vo.setRechargeCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getRechargeCommission()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setRechargeCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getRechargeCommission()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队提现手续费
|
|
|
- vo.setWithdrawalCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getWithdrawalCommission()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setWithdrawalCommission(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getWithdrawalCommission()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队投注
|
|
|
- vo.setTeamBetting(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getGameBetting()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setTeamBetting(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getGameBetting()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队直播消费
|
|
|
- vo.setTeamLive(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getLiveUseAmount()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setTeamLive(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getLiveUseAmount()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队投注赢
|
|
|
vo.setTeamWin(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(
|
|
|
e->{
|
|
|
return e.getGameWinAmount();
|
|
|
}
|
|
|
- ).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ ).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//团队投注输
|
|
|
- vo.setTeamLose(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getGameLoseAmount()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setTeamLose(BigDecimal.valueOf(appUserCountList.stream().mapToDouble(e->e.getGameLoseAmount()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//活跃人数
|
|
|
vo.setActiveUser(appUserCountList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()-> new TreeSet<>(Comparator.comparing(f->f.getUserId()))), ArrayList::new)).size());
|
|
|
//昨日新增
|
|
@@ -189,9 +189,9 @@ public class AppAgentController extends BaseController {
|
|
|
|
|
|
//直播收益
|
|
|
Long finalUserId = userId;
|
|
|
- vo.setLiveProfit(BigDecimal.valueOf(appUserCountList.stream().filter(e->e.getUserId().equals(finalUserId)).mapToDouble(e->e.getLiveProfit()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setLiveProfit(BigDecimal.valueOf(appUserCountList.stream().filter(e->e.getUserId().equals(finalUserId)).mapToDouble(e->e.getLiveProfit()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
//直播邀请奖励
|
|
|
- vo.setLiveInvite(BigDecimal.valueOf(appUserCountList.stream().filter(e->e.getUserId().equals(finalUserId)).mapToDouble(e->e.getLiveInvite()).sum()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ vo.setLiveInvite(BigDecimal.valueOf(appUserCountList.stream().filter(e->e.getUserId().equals(finalUserId)).mapToDouble(e->e.getLiveInvite()).sum()).setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
|
|
|
return HttpRet.success(MessageUtils.message("11022"),vo);
|
|
|
}
|