| | |
| | | package cc.mrbird.febs.dapp.service.impl; |
| | | |
| | | 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.mapper.DappSystemDao; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | public class DappSystemServiceImpl implements DappSystemService { |
| | | |
| | | private final DappSystemDao dappSystemDao; |
| | | private final RedisUtils redisUtils; |
| | | |
| | | @Override |
| | | public Map<String, Object> findTotalInComeAndList() { |
| | |
| | | result.put("userIncome", incomeList); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> globalSetting() { |
| | | BigDecimal newPrice = (BigDecimal) redisUtils.get(AppContants.REDIS_KEY_ETH_NEW_PRICE); |
| | | Integer changeFee = (Integer) redisUtils.get(AppContants.REDIS_KEY_CHANGE_FEE); |
| | | |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("newPrice", newPrice); |
| | | result.put("changeFee", changeFee); |
| | | return result; |
| | | } |
| | | } |