zainali5120
2021-03-14 0f4df6c351d87054ded6bd54f0c6b9f6253ea56f
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
package com.xcong.excoin.modules.documentary.controller;
 
import javax.annotation.Resource;
import javax.validation.Valid;
 
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.documentary.dto.BeTraderDto;
import com.xcong.excoin.modules.documentary.dto.OutFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeOrderInfoDto;
import com.xcong.excoin.modules.documentary.dto.UpdateTradeSetInfoDto;
import com.xcong.excoin.modules.documentary.service.DocumentaryService;
import com.xcong.excoin.modules.documentary.vo.BeTraderConditionVo;
import com.xcong.excoin.modules.documentary.vo.TradeFollowInfoVo;
import com.xcong.excoin.modules.documentary.vo.TradeHistoryOrderInfoVo;
import com.xcong.excoin.modules.documentary.vo.TradeOrderInfoVo;
import com.xcong.excoin.modules.documentary.vo.TradeProfitInfoVo;
import com.xcong.excoin.modules.documentary.vo.TradeSetInfoVo;
import com.xcong.excoin.modules.documentary.vo.TradeSetLabelInfoVo;
import com.xcong.excoin.modules.documentary.vo.TraderStatusVo;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
 
@RestController
@Slf4j
@RequestMapping(value = "/api/trader")
@Api(value = "TraderController", tags = "跟单---交易员")
public class TraderController {
    
    @Resource
    DocumentaryService documentaryService;
 
    /**
     *  成为交易员---条件查询
     */
    @ApiOperation(value="成为交易员---条件查询", notes="成为交易员---条件查询")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = BeTraderConditionVo.class)})
    @GetMapping(value = "/beTraderStatusCondition")
    public Result  beTraderCondition() {
        return documentaryService.beTraderCondition();
    }
    
    /**
     *  成为交易员---状态查询
     */
    @ApiOperation(value="成为交易员---状态查询", notes="成为交易员---状态查询")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TraderStatusVo.class)})
    @GetMapping(value = "/beTraderStatus")
    public Result  beTraderStatus() {
        return documentaryService.beTraderStatus();
    }
    
    /**
     * 交易员设置--头部
     */
    @ApiOperation(value="交易员设置--头部", notes="交易员设置--头部")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TradeProfitInfoVo.class)})
    @GetMapping(value = "/getTradeProfitInfo")
    public Result  getTradeProfitInfo() {
        return documentaryService.getTradeProfitInfo();
    }
    
    /**
     * 交易员设置--当前带单
     */
    @ApiOperation(value="交易员设置--当前带单", notes="交易员设置--当前带单")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TradeOrderInfoVo.class)})
    @PostMapping(value = "/getTradeOrderInfo")
    public Result  getTradeOrderInfo(@RequestBody @Valid TradeOrderInfoDto tradeOrderInfoDto) {
        return documentaryService.getTradeOrderInfo(tradeOrderInfoDto);
    }
    
    /**
     * 交易员设置--历史带单
     */
    @ApiOperation(value="交易员设置--历史带单", notes="交易员设置--历史带单")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TradeHistoryOrderInfoVo.class)})
    @PostMapping(value = "/getTradeHistoryOrderInfo")
    public Result  getTradeHistoryOrderInfo(@RequestBody @Valid TradeOrderInfoDto tradeOrderInfoDto) {
        return documentaryService.getTradeHistoryOrderInfo(tradeOrderInfoDto);
    }
    
    /**
     * 交易员设置--我的跟随者
     */
    @ApiOperation(value="交易员设置--我的跟随者", notes="交易员设置--我的跟随者")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TradeFollowInfoVo.class)})
    @PostMapping(value = "/getTradeFollowInfo")
    public Result  getTradeFollowInfo(@RequestBody @Valid TradeFollowInfoDto tradeFollowInfoDto) {
        return documentaryService.getTradeFollowInfo(tradeFollowInfoDto);
    }
    
    /**
     * 交易员设置--踢出跟随者
     */
    @ApiOperation(value="交易员设置--踢出跟随者", notes="交易员设置--踢出跟随者")
    @PostMapping(value = "/getOutFollowInfo")
    public Result  getOutFollowInfo(@RequestBody @Valid OutFollowInfoDto outFollowInfoDto) {
        return documentaryService.getOutFollowInfo(outFollowInfoDto);
    }
    
    /**
     *  成为交易员---立即入驻
     */
    @ApiOperation(value="成为交易员---立即入驻", notes="成为交易员---立即入驻")
    @PostMapping(value = "/beTrader")
    public Result  beTrader(@RequestBody @Valid BeTraderDto beTraderDto) {
        return documentaryService.beTrader(beTraderDto);
    }
    
    /**
     * 交易员设置--进入编辑
     */
    @ApiOperation(value="交易员设置--进入编辑", notes="交易员设置--进入编辑")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TradeSetInfoVo.class)})
    @GetMapping(value = "/getTradeSetInfo")
    public Result  getTradeSetInfo() {
        return documentaryService.getTradeSetInfo();
    }
    
    /**
     * 交易员设置--进入编辑---获取标签信息
     */
    @ApiOperation(value="交易员设置--进入编辑---获取标签信息", notes="交易员设置--进入编辑---获取标签信息")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = TradeSetLabelInfoVo.class)})
    @GetMapping(value = "/getTradeSetLabelInfo")
    public Result  getTradeSetLabelInfo() {
        return documentaryService.getTradeSetLabelInfo();
    }
    
    /**
     * 交易员设置--更新设置
     */
    @ApiOperation(value="交易员设置--更新设置", notes="交易员设置--更新设置")
    @PostMapping(value = "/updateTradeSetInfo")
    public Result  updateTradeSetInfo(@RequestBody @Valid UpdateTradeSetInfoDto updateTradeSetInfoDto) {
        return documentaryService.updateTradeSetInfo(updateTradeSetInfoDto);
    }
 
}