xiaoyong931011
2021-12-07 bf144316f5bbd9bd442123ab8d8e5be4f9e42602
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
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.entity.CannonWinRecord;
import com.xcong.excoin.modules.fish.service.MemberCannonService;
import com.xcong.excoin.modules.fish.vo.*;
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;
import javax.validation.Valid;
 
@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="/getAccountAva")
    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 @Valid 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 @Valid GetCannonsDto getCannonsDto) {
        return memberCannonService.getCannons(getCannonsDto);
    }
 
    /**
     *兑换大炮
     */
    @ApiOperation(value = "兑换大炮")
    @PostMapping(value = "/cannonExchange")
    public Result cannonExchange(@RequestBody @Valid 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 @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);
    }
 
 
 
}