xiaoyong931011
2021-12-08 f5e6133809c553cfd9fb28ee61019927c547c374
src/main/java/com/xcong/excoin/modules/fish/controller/MemberCannonController.java
@@ -4,10 +4,9 @@
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.*;
import com.xcong.excoin.modules.fish.entity.CannonWinRecord;
import com.xcong.excoin.modules.fish.service.MemberCannonService;
import com.xcong.excoin.modules.fish.vo.CannonSettingVo;
import com.xcong.excoin.modules.fish.vo.GoldAccountVo;
import com.xcong.excoin.modules.fish.vo.OwnCannonVo;
import com.xcong.excoin.modules.fish.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
@@ -16,6 +15,7 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
@Slf4j
@Api(value = "MemberCannonController", tags = "炮台接口类")
@@ -25,6 +25,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();
    }
    /**
     * 获取金币账户
@@ -41,7 +51,7 @@
     */
    @ApiOperation(value = "代币金币互转")
    @PostMapping(value = "/coinGoldExchange")
    public Result coinGoldExchange(@RequestBody CoinGoldExchangeDto coinGoldExchangeDto) {
    public Result coinGoldExchange(@RequestBody @Valid CoinGoldExchangeDto coinGoldExchangeDto) {
        return memberCannonService.coinGoldExchange(coinGoldExchangeDto);
    }
@@ -60,7 +70,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);
    }
@@ -69,7 +79,7 @@
     */
    @ApiOperation(value = "兑换大炮")
    @PostMapping(value = "/cannonExchange")
    public Result cannonExchange(@RequestBody CannonExchangeDto cannonExchangeDto) {
    public Result cannonExchange(@RequestBody @Valid CannonExchangeDto cannonExchangeDto) {
        return memberCannonService.cannonExchange(cannonExchangeDto);
    }
@@ -88,8 +98,50 @@
     */
    @ApiOperation(value = "捕鱼")
    @PostMapping(value = "/fishing")
    public Result fishing(@RequestBody FishingDto fishingDto) {
    public Result fishing(@RequestBody @Valid FishingDto fishingDto) {
        return memberCannonService.fishing(fishingDto);
    }
    /**
     * 获取奖品列表
     */
    @ApiOperation(value="获取奖品列表", notes="获取奖品列表")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = AwardsVo.class)})
    @GetMapping(value="/getAwards")
    public Result getAwards() {
        return memberCannonService.getAwards();
    }
    /**
     *点击抽奖
     */
    @ApiOperation(value = "点击抽奖")
    @PostMapping(value = "/lotteryDraw")
    public Result lotteryDraw(@RequestBody @Valid LotteryDrawDto lotteryDrawDto) {
        return memberCannonService.lotteryDraw(lotteryDrawDto);
    }
    /**
     * 查看中奖记录
     */
    @ApiOperation(value = "查看中奖记录")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = CannonWinRecordVo.class)})
    @PostMapping(value = "/getOwnAwards")
    public Result getOwnAwards(@RequestBody @Valid CannonWinRecordDto cannonWinRecordDto) {
            return memberCannonService.getOwnAwards(cannonWinRecordDto);
    }
    /**
     * 查看最新的十条中奖记录
     */
    @ApiOperation(value = "查看最新的十条中奖记录")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = CannonWinRecordVo.class)})
    @GetMapping(value = "/getListAwards")
    public Result getListAwards() {
        return memberCannonService.getListAwards();
    }
}