| | |
| | | int i = (int) parentRecommend; |
| | | |
| | | // 如果超过10个,则新增一个盲盒,并重置推荐人数 |
| | | if (++i == 3) { |
| | | if (++i == 10) { |
| | | box = 1; |
| | | redisUtils.hset(AppContants.IDO_MEMBER_RECOMMEND_CNT, parent.getAddress(), 1); |
| | | redisUtils.hset(AppContants.IDO_MEMBER_RECOMMEND_CNT, parent.getAddress(), 0); |
| | | } else { |
| | | redisUtils.hset(AppContants.IDO_MEMBER_RECOMMEND_CNT, parent.getAddress(), i); |
| | | } |
| | |
| | | parentIdoAssets.setBoxCnt(parentIdoAssets.getBoxCnt() + box); |
| | | parentIdoAssets.setCoinAmount(parentIdoAssets.getCoinAmount().add(returnCoin)); |
| | | dappIdoAssetsDao.updateById(parentIdoAssets); |
| | | |
| | | DappFundFlowEntity returnFundFlow = new DappFundFlowEntity(parent.getId(), returnCoin, 4, 2, BigDecimal.ZERO); |
| | | dappFundFlowDao.insert(returnFundFlow); |
| | | } |
| | | } |