From 54ef34c7d62acb35ed7b4928e58c8e9db3c90107 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Thu, 25 Nov 2021 10:20:32 +0800 Subject: [PATCH] 20211125 fish --- src/main/java/com/xcong/excoin/modules/fish/controller/MemberCannonController.java | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/fish/controller/MemberCannonController.java b/src/main/java/com/xcong/excoin/modules/fish/controller/MemberCannonController.java index 4feb965..63fcbd0 100644 --- a/src/main/java/com/xcong/excoin/modules/fish/controller/MemberCannonController.java +++ b/src/main/java/com/xcong/excoin/modules/fish/controller/MemberCannonController.java @@ -3,11 +3,9 @@ import com.xcong.excoin.common.response.Result; import com.xcong.excoin.modules.coin.parameter.vo.MemberWalletAgentInfoVo; import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinDealVo; -import com.xcong.excoin.modules.fish.dto.CannonExchangeDto; -import com.xcong.excoin.modules.fish.dto.CoinGoldExchangeDto; -import com.xcong.excoin.modules.fish.dto.GetCannonsDto; -import com.xcong.excoin.modules.fish.dto.GoldExchangeDto; +import com.xcong.excoin.modules.fish.dto.*; import com.xcong.excoin.modules.fish.service.MemberCannonService; +import com.xcong.excoin.modules.fish.vo.AccountAvaBanlaceVo; import com.xcong.excoin.modules.fish.vo.CannonSettingVo; import com.xcong.excoin.modules.fish.vo.GoldAccountVo; import com.xcong.excoin.modules.fish.vo.OwnCannonVo; @@ -19,6 +17,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.validation.Valid; @Slf4j @Api(value = "MemberCannonController", tags = "炮台接口类") @@ -28,6 +27,16 @@ @Resource private MemberCannonService memberCannonService; + + /** + * 获取账户金币,代币,USDT可用余额 + */ + @ApiOperation(value="获取账户金币,代币,USDT可用余额", notes="获取账户金币,代币,USDT可用余额") + @ApiResponses({@ApiResponse( code = 200, message = "success", response = AccountAvaBanlaceVo.class)}) + @GetMapping(value="/getAccountAva") + public Result getAccountAvaBanlace() { + return memberCannonService.getAccountAvaBanlace(); + } /** * 获取金币账户 @@ -44,7 +53,7 @@ */ @ApiOperation(value = "代币金币互转") @PostMapping(value = "/coinGoldExchange") - public Result coinGoldExchange(@RequestBody CoinGoldExchangeDto coinGoldExchangeDto) { + public Result coinGoldExchange(@RequestBody @Valid CoinGoldExchangeDto coinGoldExchangeDto) { return memberCannonService.coinGoldExchange(coinGoldExchangeDto); } @@ -63,7 +72,7 @@ @ApiOperation(value = "获取大炮列表") @ApiResponses({@ApiResponse( code = 200, message = "success", response = CannonSettingVo.class)}) @PostMapping(value = "/getCannons") - public Result getCannons(@RequestBody GetCannonsDto getCannonsDto) { + public Result getCannons(@RequestBody @Valid GetCannonsDto getCannonsDto) { return memberCannonService.getCannons(getCannonsDto); } @@ -72,7 +81,7 @@ */ @ApiOperation(value = "兑换大炮") @PostMapping(value = "/cannonExchange") - public Result cannonExchange(@RequestBody CannonExchangeDto cannonExchangeDto) { + public Result cannonExchange(@RequestBody @Valid CannonExchangeDto cannonExchangeDto) { return memberCannonService.cannonExchange(cannonExchangeDto); } @@ -86,5 +95,13 @@ return memberCannonService.getOwnCannon(); } + /** + * 捕鱼 + */ + @ApiOperation(value = "捕鱼") + @PostMapping(value = "/fishing") + public Result fishing(@RequestBody @Valid FishingDto fishingDto) { + return memberCannonService.fishing(fishingDto); + } } -- Gitblit v1.9.1