| | |
| | | public Map<String, BigDecimal> calPrice(PriceDto priceDto) { |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | |
| | | |
| | | String hasStart = redisUtils.getString(AppContants.SYSTEM_START_FLAG); |
| | | if (!"start".equals(hasStart)) { |
| | | HashMap<String, BigDecimal> map = new HashMap<>(); |
| | |
| | | map.put("y", y); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public int boxSurprise() { |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | |
| | | DappIdoAssetsEntity idoAssets = dappIdoAssetsDao.selectByMemberId(member.getId()); |
| | | if (idoAssets.getBoxCnt() < 1) { |
| | | throw new FebsException("盲盒数量不足"); |
| | | } |
| | | |
| | | idoAssets.setBoxCnt(idoAssets.getBoxCnt() - 1); |
| | | dappIdoAssetsDao.updateById(idoAssets); |
| | | |
| | | // TODO 线上转账 |
| | | |
| | | return 1; |
| | | } |
| | | } |