xiaoyong931011
2022-10-21 094ac833c36fba81421d7472ebd0f58bacf9e1a9
src/main/java/cc/mrbird/febs/dapp/enumerate/MemberOnHookPlanEnum.java
@@ -25,7 +25,7 @@
                //最大挂机次数,五分钟开奖一次,一个小时固定次数12次
                int maxTimes = new Double(hours * 12).intValue();
                //预期最大收益
                BigDecimal profitTotal = AppContants.ONHOOK_BASIC_AMOUNT.multiply(hangingRevenue).setScale(2, BigDecimal.ROUND_DOWN);
                BigDecimal profitTotal = AppContants.ONHOOK_BASIC_AMOUNT.multiply(hangingRevenue).setScale(4, BigDecimal.ROUND_DOWN);
                BigDecimal profitTotalNow = BigDecimal.ZERO;
                for(int i=1;i<=maxTimes;){
@@ -42,8 +42,8 @@
                                JSONObject jsonObject = JSONUtil.parseObj(planMapValue);
                                jsonObject.set("isGoal","2");
                                BigDecimal amount = new BigDecimal(jsonObject.get("amount").toString());
                                BigDecimal profit = amount.multiply(hangingRevenue).setScale(2, BigDecimal.ROUND_DOWN);
                                profitTotalNow = profitTotalNow.add(profit).setScale(2, BigDecimal.ROUND_DOWN);
                                BigDecimal profit = amount.multiply(hangingRevenue).setScale(4, BigDecimal.ROUND_DOWN);
                                profitTotalNow = profitTotalNow.add(profit).setScale(4, BigDecimal.ROUND_DOWN);
                                jsonObject.set("profit",profit);
                                linkedList.add(JSONUtil.toJsonStr(jsonObject));
                                maxTimes --;
@@ -62,8 +62,8 @@
                                        jsonObject.set("isGoal","1");
                                    }
                                    BigDecimal amount = new BigDecimal(jsonObject.get("amount").toString());
                                    BigDecimal profit = amount.multiply(hangingRevenue).setScale(2, BigDecimal.ROUND_DOWN);
                                    profitTotalNow = profitTotalNow.add(profit).setScale(2, BigDecimal.ROUND_DOWN);
                                    BigDecimal profit = amount.multiply(hangingRevenue).setScale(4, BigDecimal.ROUND_DOWN);
                                    profitTotalNow = profitTotalNow.add(profit).setScale(4, BigDecimal.ROUND_DOWN);
                                    jsonObject.set("profit",profit);
                                    linkedList.add(JSONUtil.toJsonStr(jsonObject));
                                    maxTimes --;
@@ -91,7 +91,7 @@
                            JSONObject jsonObject = JSONUtil.parseObj(planMapValue);
                            jsonObject.set("isGoal","1");
                            BigDecimal amount = new BigDecimal(jsonObject.get("amount").toString());
                            BigDecimal profit = amount.multiply(hangingRevenue).setScale(2, BigDecimal.ROUND_DOWN);
                            BigDecimal profit = amount.multiply(hangingRevenue).setScale(4, BigDecimal.ROUND_DOWN);
                            jsonObject.set("profit",profit);
                            linkedList.add(JSONUtil.toJsonStr(jsonObject));
                        }