| | |
| | | BigDecimal everyAmount = daDanTotal.divide(new BigDecimal(count)); |
| | | |
| | | if(everyAmount.compareTo(BigDecimal.ZERO) > 0){ |
| | | List<DappStorage> dappStorageOne = dappStorageMapper.selectSumByAmountDesc(new Date(),0,1); |
| | | List<DappStorage> dappStorageOne = dappStorageMapper.selectSumByAmountDescFiveToFive(DateUtil.offsetHour(new Date(),-24),0,1); |
| | | if(CollUtil.isNotEmpty(dappStorageOne)){ |
| | | BigDecimal multiply = everyAmount.multiply(new BigDecimal(oneCount)); |
| | | dappSystemService.updateBalanceInsertFlow( |
| | |
| | | |
| | | realAmount = realAmount.add(multiply); |
| | | } |
| | | List<DappStorage> dappStorageTwo = dappStorageMapper.selectSumByAmountDesc(new Date(),1,1); |
| | | List<DappStorage> dappStorageTwo = dappStorageMapper.selectSumByAmountDescFiveToFive(DateUtil.offsetHour(new Date(),-24),1,1); |
| | | if(CollUtil.isNotEmpty(dappStorageTwo)){ |
| | | BigDecimal multiply = everyAmount.multiply(new BigDecimal(twoCount)); |
| | | dappSystemService.updateBalanceInsertFlow( |
| | |
| | | |
| | | realAmount = realAmount.add(multiply); |
| | | } |
| | | List<DappStorage> dappStorageThree = dappStorageMapper.selectSumByAmountDesc(new Date(),2,1); |
| | | List<DappStorage> dappStorageThree = dappStorageMapper.selectSumByAmountDescFiveToFive(DateUtil.offsetHour(new Date(),-24),2,1); |
| | | if(CollUtil.isNotEmpty(dappStorageThree)){ |
| | | BigDecimal multiply = everyAmount.multiply(new BigDecimal(threeCount)); |
| | | dappSystemService.updateBalanceInsertFlow( |
| | |
| | | |
| | | realAmount = realAmount.add(multiply); |
| | | } |
| | | List<DappStorage> dappStorageFour = dappStorageMapper.selectSumByAmountDesc(new Date(),3,1); |
| | | List<DappStorage> dappStorageFour = dappStorageMapper.selectSumByAmountDescFiveToFive(DateUtil.offsetHour(new Date(),-24),3,1); |
| | | if(CollUtil.isNotEmpty(dappStorageFour)){ |
| | | BigDecimal multiply = everyAmount.multiply(new BigDecimal(fourCount)); |
| | | dappSystemService.updateBalanceInsertFlow( |
| | |
| | | */ |
| | | HashMap<Long, BigDecimal> map = new HashMap<>(); |
| | | |
| | | List<DappMemberEntity> dappMemberEntityList = dappMemberDao.selectListByDate(new Date()); |
| | | DateTime startTime = DateUtil.offsetHour(new Date(), -24); |
| | | List<DappMemberEntity> dappMemberEntityList = dappMemberDao.selectListByDateFiveToFiver(startTime); |
| | | |
| | | if(CollUtil.isNotEmpty(dappMemberEntityList)){ |
| | | for(DappMemberEntity member : dappMemberEntityList){ |
| | | if(StrUtil.isEmpty(member.getRefererId())){ |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | DateTime dateTime = DateUtil.offsetHour(new Date(), -24); |
| | | System.out.println(dateTime); |
| | | DateTime nowTime = DateUtil.parseTime(DateUtil.formatTime(new Date())); |
| | | DateTime perkTime = DateUtil.parseTime("17:00:00"); |
| | | |
| | | String startTimeStr = null; |
| | | if(DateUtil.compare(nowTime,perkTime) >= 0){ |
| | | startTimeStr = DateUtil.formatDate(DateUtil.offsetDay(new Date(), 0)) + " 17:00:00"; |
| | | }else{ |
| | | startTimeStr = DateUtil.formatDate(DateUtil.offsetDay(new Date(), -1)) + " 17:00:00"; |
| | | } |
| | | |
| | | DateTime startTime = DateUtil.parseDateTime(startTimeStr); |
| | | |
| | | |
| | | |
| | | // 创建一个HashMap示例 |