Browse Source

预计分红修改为当前用户本级分红

dos 1 month ago
parent
commit
7320a03fc8

+ 5 - 5
game-business/src/main/java/com/game/business/controller/AppAgentController.java

@@ -100,7 +100,7 @@ public class AppAgentController extends BaseController {
         //佣金
         double money = 0;
         if(null != appUserCountList && appUserCountList.size() > 0){
-            List<AppUserCount> finalAppUserCountList = appUserCountList;
+//            List<AppUserCount> finalAppUserCountList = appUserCountList;
             /*money = appUserAgentList.stream().mapToDouble(appUserAgent1 -> {
                 return finalAppUserCountList.stream().mapToDouble(e->{
                     return (e.getGameLoseAmount() - e.getGameWinAmount() - e.getGameCommission() - e.getRechargeGive()) * appUserAgent1.getDividendGuaranteeRate()/100;
@@ -117,16 +117,16 @@ public class AppAgentController extends BaseController {
                     }
                 }).sum();
             }*/
-            money = dealChildel(teamUser,money);
+//            money = dealChildel(teamUser,money);
 
             //计算当前用户分红
-            /*double winLose = appUserCountList.stream().mapToDouble(e->{
-               return e.getGameLoseAmount() - e.getGameWinAmount() - e.getGameCommission() - e.getRechargeGive();
+            double winLose = appUserCountList.stream().mapToDouble(e->{
+               return e.getGameLoseAmount() - (e.getGameWinAmount() - (e.getGameBetting() - e.getGameLoseAmount())) - e.getGameCommission() - e.getRechargeGive();
             }).sum();
 
             if(winLose > 0){
                 money +=  BigDecimal.valueOf(winLose * teamUser.getDividendGuaranteeRate() / 100).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
-            }*/
+            }
 
         }