| | |
| | | import cc.mrbird.febs.dapp.chain.ChainService; |
| | | import cc.mrbird.febs.dapp.dto.PriceSettingDto; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappStorage; |
| | | import cc.mrbird.febs.dapp.entity.DappTransferRecordEntity; |
| | | import cc.mrbird.febs.dapp.entity.DbMemberNode; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | return new FebsResponse().success().data(dataTable); |
| | | } |
| | | |
| | | |
| | | @GetMapping("changeIdentityYes/{type}/{id}") |
| | | public FebsResponse changeIdentityYes(@PathVariable("type") Integer type, @PathVariable("id") Long id) { |
| | | dappMemberService.changeIdentity(type, id, 1); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @GetMapping("changeIdentityNo/{type}/{id}") |
| | | public FebsResponse changeIdentityNo(@PathVariable("type") Integer type, @PathVariable("id") Long id) { |
| | | dappMemberService.changeIdentity(type, id, 2); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getBalanceByAddress/{chain}/{address}") |
| | | public FebsResponse getBalanceByAddress(@PathVariable("chain") String chain, @PathVariable("address") String address) { |
| | | BigDecimal balance = ChainService.getInstance(chain).balanceOf(address); |
| | |
| | | return new FebsResponse().success().data(balance); |
| | | } |
| | | |
| | | @PostMapping(value = "/accountStatus/{id}") |
| | | @GetMapping(value = "/accountStatus/{id}") |
| | | public FebsResponse accountStatus(@PathVariable("id") Long id) { |
| | | dappMemberService.accountStatus(id); |
| | | return new FebsResponse().success(); |
| | |
| | | return new FebsResponse().success().data(getDataTable(dappMemberService.selectTransferInPage(transfer, request))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/memberNodeList") |
| | | public FebsResponse memberNodeList(DbMemberNode dbMemberNode, QueryRequest request) { |
| | | return new FebsResponse().success().data(getDataTable(dappMemberService.memberNodeList(dbMemberNode, request))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/storageList") |
| | | public FebsResponse storageList(DappStorage dappStorage, QueryRequest request) { |
| | | return new FebsResponse().success().data(getDataTable(dappMemberService.storageList(dappStorage, request))); |
| | | } |
| | | |
| | | @PostMapping(value = "/setNewestPrice") |
| | | public FebsResponse setNewestPrice(PriceSettingDto priceSettingDto) { |
| | | dappMemberService.setNewestPrice(priceSettingDto); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @PostMapping(value = "/setSystemFee") |
| | | public FebsResponse setSystemFee(AdminSystemFeeVo adminSystemFeeVo) { |
| | | dappMemberService.setSystemFee(adminSystemFeeVo); |
| | | return new FebsResponse().success(); |
| | | } |
| | | } |