| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.enumerates.DataDicEnum; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.entity.DappCoinPrice; |
| | | import cc.mrbird.febs.dapp.entity.PlatformBanner; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.dapp.service.IAdminBannerService; |
| | | import cc.mrbird.febs.dapp.vo.CoinSetVo; |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | private final IAdminBannerService iAdminBannerService; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | private final RedisUtils redisUtils; |
| | | private final ChainProducer chainProducer; |
| | | |
| | | /** |
| | | * 价格---列表 |
| | |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @PostMapping(value = "/hdSubmit") |
| | | @ControllerEndpoint(operation = "滑点释放", exceptionMessage = "操作失败") |
| | | public FebsResponse hdSubmit() { |
| | | log.info("滑点奖励"); |
| | | BigDecimal usdtAmount = new BigDecimal( |
| | | redisUtils.getString(DataDicEnum.GFA_HUA_DIAN_WALLET_USDT_AMOUNT.getValue()) |
| | | ).setScale(2,BigDecimal.ROUND_DOWN); |
| | | BigDecimal coinAmount = new BigDecimal( |
| | | redisUtils.getString(DataDicEnum.GFA_HUA_DIAN_WALLET_COIN_AMOUNT.getValue()) |
| | | ).setScale(2,BigDecimal.ROUND_DOWN); |
| | | if(BigDecimal.ZERO.compareTo(usdtAmount) > 0){ |
| | | return new FebsResponse().fail().message("请设置钱包USDT"); |
| | | } |
| | | if(BigDecimal.ZERO.compareTo(coinAmount) > 0){ |
| | | return new FebsResponse().fail().message("请设置钱包代币"); |
| | | } |
| | | chainProducer.sendDitribProfit(1L); |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | | |
| | | @PostMapping(value = "/cashOutSetting") |
| | | @ControllerEndpoint(operation = "轮播图---新增", exceptionMessage = "新增失败") |
| | | public FebsResponse cashOutSetting(CoinSetVo coinSetVo) { |