| | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.entity.DappMineDataEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappReturnRatioEntity; |
| | | import cc.mrbird.febs.dapp.mapper.DappReturnRatioDao; |
| | | import cc.mrbird.febs.dapp.mapper.DappSystemDao; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | public class DappSystemServiceImpl implements DappSystemService { |
| | | |
| | | private final DappSystemDao dappSystemDao; |
| | | private final DappReturnRatioDao dappReturnRatioDao; |
| | | private final RedisUtils redisUtils; |
| | | |
| | | @Override |
| | |
| | | BigDecimal newPrice = (BigDecimal) redisUtils.get(AppContants.REDIS_KEY_ETH_NEW_PRICE); |
| | | Integer changeFee = (Integer) redisUtils.get(AppContants.REDIS_KEY_CHANGE_FEE); |
| | | |
| | | List<DappReturnRatioEntity> ratios = dappReturnRatioDao.selectList(null); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("newPrice", newPrice); |
| | | result.put("changeFee", changeFee); |
| | | result.put("ratio", ratios); |
| | | return result; |
| | | } |
| | | } |