| | |
| | | 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.entity.AppVersion; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappMessageEntity; |
| | | import cc.mrbird.febs.dapp.entity.IgtOnHookPlanOrder; |
| | | import cc.mrbird.febs.dapp.mapper.DappMemberDao; |
| | | import cc.mrbird.febs.dapp.mapper.DappMessageDao; |
| | | 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.ui.Model; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | 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") |
| | |
| | | @RequiredArgsConstructor |
| | | public class ViewController { |
| | | |
| | | private final RedisUtils redisUtils; |
| | | |
| | | private final DappMemberService dappMemberService; |
| | | private final DappMemberDao dappMemberDao; |
| | | private final DappMessageDao dappMessageDao; |
| | | |
| | | @GetMapping(value = "admin") |
| | | @RequiresPermissions("admin:view") |
| | | public String user() { |
| | | return FebsUtil.view("dapp/user"); |
| | | } |
| | | |
| | | @GetMapping(value = "admin/add") |
| | | @RequiresPermissions("admin:add") |
| | | public String addUser() { |
| | | return FebsUtil.view("dapp/userAdd"); |
| | | } |
| | | |
| | | @GetMapping(value = "admin/update") |
| | | @RequiresPermissions("admin:update") |
| | | public String updateUser() { |
| | | return FebsUtil.view("dapp/userUpdate"); |
| | | } |
| | | |
| | | @GetMapping(value = "admin/simulate") |
| | | @RequiresPermissions("admin:simulate") |
| | | public String simulate() { |
| | | return FebsUtil.view("dapp/simulate-data"); |
| | | } |
| | | |
| | | @GetMapping(value = "admin/simulateResult/{batch}") |
| | | public String simulateResult(@PathVariable("batch") String batch, Model model) { |
| | | String url = "https://birdworld.vip/index.html?isDev=true&batchNo=" + batch; |
| | | model.addAttribute("url", url); |
| | | return FebsUtil.view("dapp/simulate-result"); |
| | | } |
| | | |
| | | /** |
| | | * igt会员列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("member") |
| | | @RequiresPermissions("member:view") |
| | | public String member() { |
| | |
| | | public String moneyChange() { |
| | | return FebsUtil.view("dapp/money-change-flow"); |
| | | } |
| | | |
| | | @GetMapping("transfer") |
| | | @RequiresPermissions("transfer:view") |
| | | public String transfer() { |
| | | return FebsUtil.view("dapp/member-transter"); |
| | | } |
| | | |
| | | @GetMapping(value = "ratio") |
| | | @RequiresPermissions("ratio:view") |
| | | public String returnRatio() { |
| | | return FebsUtil.view("dapp/return-ratio"); |
| | | } |
| | | |
| | | |
| | | @GetMapping(value = "agentReturn") |
| | | @RequiresPermissions("agentReturn:view") |
| | | public String agentReturn() { |
| | | 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"); |
| | | } |
| | | |
| | | /** |
| | | * 会员等级设置 |
| | | * @return |
| | | */ |
| | | @GetMapping("memberLevelSet") |
| | | @RequiresPermissions("memberLevelSet:view") |
| | | public String memberLevelSet() { |
| | | return FebsUtil.view("dapp/member-level-set"); |
| | | } |
| | | |
| | | /** |
| | | * 挂机方案设置 |
| | | * @return |
| | | */ |
| | | @GetMapping("onHookPlanSet") |
| | | @RequiresPermissions("onHookPlanSet:view") |
| | | public String onHookPlanSet() { |
| | | return FebsUtil.view("dapp/on-hook-plan-set"); |
| | | } |
| | | |
| | | /** |
| | | * App版本-列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("appVersionList") |
| | | @RequiresPermissions("appVersionList:view") |
| | | public String appVersionList() { |
| | | return FebsUtil.view("dapp/appVersionList"); |
| | | } |
| | | |
| | | /** |
| | | * App版本-新增 |
| | | * @return |
| | | */ |
| | | @GetMapping("appVersionAdd") |
| | | @RequiresPermissions("appVersionAdd:add") |
| | | public String appVersionAdd() { |
| | | return FebsUtil.view("dapp/appVersionAdd"); |
| | | } |
| | | |
| | | /** |
| | | * App版本-详情 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("appVerSionUpdate/{id}") |
| | | @RequiresPermissions("appVerSionUpdate:update") |
| | | public String appVerSionUpdate(@PathVariable long id, Model model) { |
| | | AppVersion data = dappMemberService.getAppVersionInfoById(id); |
| | | model.addAttribute("appVersion", data); |
| | | return FebsUtil.view("dapp/appVerSionUpdate"); |
| | | } |
| | | |
| | | /** |
| | | * 充值-列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("chargeList") |
| | | @RequiresPermissions("chargeList:view") |
| | | public String chargeList() { |
| | | return FebsUtil.view("dapp/member-charge"); |
| | | } |
| | | |
| | | /** |
| | | * 会员列表-拨付 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("payUsdt/{id}") |
| | | @RequiresPermissions("payUsdt:update") |
| | | public String payUsdt(@PathVariable long id, Model model) { |
| | | DappMemberEntity data = dappMemberDao.selectById(id); |
| | | model.addAttribute("dappMember", data); |
| | | return FebsUtil.view("dapp/payUsdt"); |
| | | } |
| | | |
| | | /** |
| | | * 会员列表-设置会员等级 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("identitySet/{id}") |
| | | @RequiresPermissions("identitySet:update") |
| | | public String identitySet(@PathVariable long id, Model model) { |
| | | DappMemberEntity data = dappMemberDao.selectById(id); |
| | | model.addAttribute("dappMember", data); |
| | | return FebsUtil.view("dapp/identitySet"); |
| | | } |
| | | |
| | | /** |
| | | * 客服消息-列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("messageList") |
| | | @RequiresPermissions("messageList:view") |
| | | public String messageList() { |
| | | return FebsUtil.view("dapp/message-list"); |
| | | } |
| | | |
| | | /** |
| | | * 客服消息-列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("sendBackMessage") |
| | | @RequiresPermissions("user:sendBack") |
| | | public String sendBackMessage() { |
| | | return FebsUtil.view("dapp/send-Back-Message"); |
| | | } |
| | | |
| | | /** |
| | | * 客服消息-回复 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("sendBackMessage/{id}") |
| | | @RequiresPermissions("user:sendBack") |
| | | public String sendBackMessage(@PathVariable long id, Model model) { |
| | | DappMessageEntity data = dappMessageDao.selectById(id); |
| | | model.addAttribute("dappMessage", data); |
| | | return FebsUtil.view("dapp/send-Back-Message"); |
| | | } |
| | | |
| | | |
| | | public static long showMessageInfoFlow; |
| | | /** |
| | | * 客服消息-记录 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("/showMessage/{id}") |
| | | @RequiresPermissions("showMessage:update") |
| | | public String amountFlow(@PathVariable long id, Model model) { |
| | | showMessageInfoFlow = id; |
| | | DappMessageEntity data = dappMessageDao.selectById(id); |
| | | model.addAttribute("dappMessage", data); |
| | | return FebsUtil.view("dapp/show-message-list"); |
| | | } |
| | | |
| | | /** |
| | | * 每日资产总览-列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("moneyTotal") |
| | | @RequiresPermissions("moneyTotal:view") |
| | | public String moneyTotal() { |
| | | return FebsUtil.view("dapp/money-total"); |
| | | } |
| | | |
| | | /** |
| | | * 每日资产总览-充值详情 |
| | | * @param createTime |
| | | * @param model |
| | | * @return |
| | | */ |
| | | public static String createTimeStr; |
| | | @GetMapping("/amountFlow/{createTime}") |
| | | @RequiresPermissions("amountFlow:update") |
| | | public String amountFlow(@PathVariable String createTime, Model model) { |
| | | createTimeStr = createTime; |
| | | return FebsUtil.view("dapp/money-total-flow"); |
| | | } |
| | | |
| | | /** |
| | | * 每日资产总览-提现详情 |
| | | * @param createTime |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("/amountOutFlow/{createTime}") |
| | | @RequiresPermissions("amountOutFlow:update") |
| | | public String amountOutFlow(@PathVariable String createTime, Model model) { |
| | | createTimeStr = createTime; |
| | | return FebsUtil.view("dapp/money-total-flow-out"); |
| | | } |
| | | |
| | | public static long idMemberTeamInfo; |
| | | /** |
| | | * 用户列表-团队详情 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("/teamInfo/{id}") |
| | | @RequiresPermissions("teamInfo:update") |
| | | public String teamInfo(@PathVariable long id, Model model) { |
| | | idMemberTeamInfo = id; |
| | | DappMemberEntity data = dappMemberDao.selectById(id); |
| | | model.addAttribute("teamInfo", data); |
| | | return FebsUtil.view("dapp/teamInfo"); |
| | | } |
| | | |
| | | /** |
| | | * 一键操作 |
| | | * @return |
| | | */ |
| | | @GetMapping("reloadSystem") |
| | | @RequiresPermissions("reloadSystem:update") |
| | | public String reloadSystem() { |
| | | return FebsUtil.view("dapp/system-reload"); |
| | | } |
| | | |
| | | } |