package com.xcong.excoin.modules.fish.controller;
|
|
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.*;
|
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;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponses;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
@Slf4j
|
@Api(value = "MemberCannonController", tags = "炮台接口类")
|
@RestController
|
@RequestMapping(value = "/api/account")
|
public class MemberCannonController {
|
|
@Resource
|
private MemberCannonService memberCannonService;
|
|
/**
|
* 获取账户金币,代币,USDT可用余额
|
*/
|
@ApiOperation(value="获取账户金币,代币,USDT可用余额", notes="获取账户金币,代币,USDT可用余额")
|
@ApiResponses({@ApiResponse( code = 200, message = "success", response = AccountAvaBanlaceVo.class)})
|
@GetMapping(value="/getAccountAvaBanlace")
|
public Result getAccountAvaBanlace() {
|
return memberCannonService.getAccountAvaBanlace();
|
}
|
|
/**
|
* 获取金币账户
|
*/
|
@ApiOperation(value="获取金币账户", notes="获取金币账户")
|
@ApiResponses({@ApiResponse( code = 200, message = "success", response = GoldAccountVo.class)})
|
@GetMapping(value="/getGoldAccount")
|
public Result getGoldAccount() {
|
return memberCannonService.getGoldAccount();
|
}
|
|
/**
|
* 代币金币互转
|
*/
|
@ApiOperation(value = "代币金币互转")
|
@PostMapping(value = "/coinGoldExchange")
|
public Result coinGoldExchange(@RequestBody CoinGoldExchangeDto coinGoldExchangeDto) {
|
return memberCannonService.coinGoldExchange(coinGoldExchangeDto);
|
}
|
|
/**
|
* USDT购买金币
|
*/
|
// @ApiOperation(value = "USDT购买金币")
|
// @PostMapping(value = "/goldExchange")
|
// public Result goldExchange(@RequestBody GoldExchangeDto goldExchangeDto) {
|
// return memberCannonService.goldExchange(goldExchangeDto);
|
// }
|
|
/**
|
* 获取大炮列表
|
*/
|
@ApiOperation(value = "获取大炮列表")
|
@ApiResponses({@ApiResponse( code = 200, message = "success", response = CannonSettingVo.class)})
|
@PostMapping(value = "/getCannons")
|
public Result getCannons(@RequestBody GetCannonsDto getCannonsDto) {
|
return memberCannonService.getCannons(getCannonsDto);
|
}
|
|
/**
|
*兑换大炮
|
*/
|
@ApiOperation(value = "兑换大炮")
|
@PostMapping(value = "/cannonExchange")
|
public Result cannonExchange(@RequestBody CannonExchangeDto cannonExchangeDto) {
|
return memberCannonService.cannonExchange(cannonExchangeDto);
|
}
|
|
/**
|
* 获取用户拥有的炮台
|
*/
|
@ApiOperation(value="获取用户拥有的炮台", notes="获取用户拥有的炮台")
|
@ApiResponses({@ApiResponse( code = 200, message = "success", response = OwnCannonVo.class)})
|
@GetMapping(value="/getOwnCannon")
|
public Result getOwnCannon() {
|
return memberCannonService.getOwnCannon();
|
}
|
|
/**
|
* 捕鱼
|
*/
|
@ApiOperation(value = "捕鱼")
|
@PostMapping(value = "/fishing")
|
public Result fishing(@RequestBody FishingDto fishingDto) {
|
return memberCannonService.fishing(fishingDto);
|
}
|
|
}
|