| | |
| | | // BigDecimal totalProfit = igtOnHookPlanOrder.getProfit(); |
| | | BigDecimal planAmount = igtOnHookPlanOrder.getPlanAmount(); |
| | | // BigDecimal avaAmount = igtOnHookPlanOrder.getAvaAmount(); |
| | | //更新用户表是否正在挂机状态字段为否 |
| | | //更新用户表是否正在挂机状态字段为结算中 |
| | | DappMemberEntity dappMember = dappMemberDao.selectById(memberId); |
| | | dappMember.setIsOnHook(3); |
| | | dappMemberDao.updateById(dappMember); |
| | |
| | | long between = DateUtil.between(startTime, DateUtil.date(), DateUnit.MINUTE); |
| | | //获得总收益 |
| | | BigDecimal totalProfit = minuteProfit.multiply(new BigDecimal(between)); |
| | | if(multiply.compareTo(totalProfit) < 0){ |
| | | totalProfit = multiply; |
| | | } |
| | | |
| | | String refererIds = dappMemberEntity.getRefererIds(); |
| | | List<String> refererIdList = StrUtil.split(refererIds, ",", -1, true, true); |
| | |
| | | Date date = dappOnHookAwardNow.getAwardTime(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | String yyyyMMddHHMM = sdf.format(date); |
| | | List<DappOnHookAward> dappOnHookAwards = dappOnHookAwardDao.selectInfoByByAwardTime(yyyyMMddHHMM); |
| | | // List<DappOnHookAward> dappOnHookAwards = dappOnHookAwardDao.selectInfoByByAwardTime(yyyyMMddHHMM); |
| | | List<DappOnHookAward> dappOnHookAwards = dappOnHookAwardDao.selectByIdLimitTT(Long.parseLong(onHookAwardRedisId)); |
| | | if(CollUtil.isNotEmpty(dappOnHookAwards)){ |
| | | for(DappOnHookAward dappOnHookAward : dappOnHookAwards){ |
| | | ApiAwardInfoVo apiAwardInfoVo = new ApiAwardInfoVo(); |
| | |
| | | .multiply(new BigDecimal(0.01)).setScale(4,BigDecimal.ROUND_DOWN); |
| | | //获取收益 |
| | | //获取当前用户每分钟应该获取的收益 |
| | | //预期最大收益 |
| | | BigDecimal multiply = hangingRevenueLevel.multiply(planAmount); |
| | | DataDictionaryCustom maxHoursDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.MAX_HOURS.getType(), DataDictionaryEnum.MAX_HOURS.getCode()); |
| | | //挂机总时长(分钟) |
| | |
| | | long between = DateUtil.between(startTime, DateUtil.date(), DateUnit.MINUTE); |
| | | //获得总收益 |
| | | BigDecimal totalProfit = minuteProfit.multiply(new BigDecimal(between)).setScale(4,BigDecimal.ROUND_DOWN); |
| | | if(multiply.compareTo(totalProfit) < 0){ |
| | | totalProfit = multiply; |
| | | } |
| | | |
| | | // BigDecimal totalProfit = planAmount.multiply(hangingRevenueLevel).setScale(4,BigDecimal.ROUND_DOWN); |
| | | |
| | | String refererIds = dappMemberEntity.getRefererIds(); |