| | |
| | | package cc.mrbird.febs.dapp.controller; |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.entity.FebsConstant; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @author |
| | | * @date 2022-03-21 |
| | | **/ |
| | | @Controller("dappView") |
| | | @RequestMapping(FebsConstant.VIEW_PREFIX + "dappView") |
| | | @RequiredArgsConstructor |
| | | public class ViewController { |
| | | |
| | | private final RedisUtils redisUtils; |
| | | |
| | | @GetMapping(value = "admin") |
| | | @RequiresPermissions("admin:view") |
| | |
| | | |
| | | @GetMapping(value = "admin/simulateResult/{batch}") |
| | | public String simulateResult(@PathVariable("batch") String batch, Model model) { |
| | | String url = "http://120.27.238.55:8000/dapp/index.html?isDev=true&batchNo=" + batch; |
| | | String url = "https://birdworld.vip/index.html?isDev=true&batchNo=" + batch; |
| | | model.addAttribute("url", url); |
| | | return FebsUtil.view("dapp/simulate-result"); |
| | | } |
| | |
| | | return FebsUtil.view("dapp/agent-return"); |
| | | } |
| | | |
| | | |
| | | @GetMapping(value ="priceSetting") |
| | | @RequiresPermissions("price:setting:view") |
| | | public String priceSetting(Model model) { |
| | | BigDecimal price = (BigDecimal) redisUtils.get(AppContants.REDIS_KEY_ETH_NEW_PRICE); |
| | | model.addAttribute("newestPrice", price); |
| | | return FebsUtil.view("dapp/newest-price-setting"); |
| | | } |
| | | } |