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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.coin.parameter.dto.RecordsPageDto;
import com.xcong.excoin.modules.documentary.dto.CancelDocumentaryOrderSetDto;
import com.xcong.excoin.modules.documentary.dto.DocumentaryOrderSetDto;
import com.xcong.excoin.modules.documentary.dto.FollowFollowerNoticeDto;
import com.xcong.excoin.modules.documentary.dto.FollowRecordsDto;
import com.xcong.excoin.modules.documentary.dto.FollowTraderProfitInfoDto;
import com.xcong.excoin.modules.documentary.dto.HistoryOrderRecordsDto;
import com.xcong.excoin.modules.documentary.dto.MyFollowOrderDto;
import com.xcong.excoin.modules.documentary.dto.MyFollowTraderInfoDto;
import com.xcong.excoin.modules.documentary.dto.UpdateDocumentaryOrderSetDto;
import com.xcong.excoin.modules.documentary.service.DocumentaryService;
import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderInfoVo;
import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderSetInfoVo;
import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderSetStateVo;
import com.xcong.excoin.modules.documentary.vo.FollowFollowerNoticeVo;
import com.xcong.excoin.modules.documentary.vo.FollowInfoVo;
import com.xcong.excoin.modules.documentary.vo.FollowRecordsVo;
import com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo;
import com.xcong.excoin.modules.documentary.vo.HistoryOrderRecordsVo;
import com.xcong.excoin.modules.documentary.vo.MemberIsTradeVo;
import com.xcong.excoin.modules.documentary.vo.MyFollowOrderVo;
import com.xcong.excoin.modules.documentary.vo.MyFollowTraderInfoVo;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
 
@RestController
@Slf4j
@RequestMapping(value = "/api/documentary")
@Api(value = "DocumentaryController", tags = "跟单---跟随者")
public class DocumentaryController {
    
    @Resource
    DocumentaryService documentaryService;
    
    /**
     *  获取用户类型是否是交易员
     */
    @ApiOperation(value="获取用户是否是交易员", notes="获取用户是否是交易员")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberIsTradeVo.class)})
    @GetMapping(value = "/getMemberIsTrader")
    public Result  getMemberIsTrader() {
        return documentaryService.getMemberIsTradeInfo();
    }
    
    /**
     *  通知消息
     */
    @ApiOperation(value="通知消息", notes="通知消息")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowFollowerNoticeVo.class)})
    @PostMapping(value = "/getFollowFollowerNoticeList")
    public Result  getFollowFollowerNoticeList(@RequestBody @Valid FollowFollowerNoticeDto followFollowerNoticeDto) {
        return documentaryService.getFollowFollowerNoticeList(followFollowerNoticeDto);
    }
    
    /**
     *  交易员列表
     */
    @ApiOperation(value="交易员列表", notes="交易员列表")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowTraderProfitInfoVo.class)})
    @PostMapping(value = "/getFollowTraderProfitInfo")
    public Result  getFollowTraderProfitInfo(@RequestBody @Valid FollowTraderProfitInfoDto recordsPageDto) {
        return documentaryService.getFollowTraderProfitInfo(recordsPageDto);
    }
    
    /**
     *  交易员详情---头部
     */
    @ApiOperation(value="交易员详情---头部", notes="交易员详情---头部")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowTraderProfitInfoVo.class)})
    @GetMapping(value = "/getFollowTraderProfit")
    public Result  getFollowTraderProfit(@ApiParam(name = "traderId", value = "交易员ID", example = "1") @RequestParam(value = "traderId", required = false) long traderId) {
        return documentaryService.getFollowTraderProfit(traderId);
    }
    
    /**
     *  历史带单
     * @return
     */
    @ApiOperation(value="历史带单", notes="历史带单")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = HistoryOrderRecordsVo.class)})
    @PostMapping(value = "/getHistoryOrderRecords")
    public Result  getHistoryOrderRecords(@RequestBody @Valid HistoryOrderRecordsDto historyOrderRecordsDto) {
        return documentaryService.getHistoryOrderRecords(historyOrderRecordsDto);
    }
    
    /**
     *  跟随者
     * @return
     */
    @ApiOperation(value="跟随者", notes="跟随者")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowRecordsVo.class)})
    @PostMapping(value = "/getFollowRecords")
    public Result  getFollowRecords(@RequestBody @Valid FollowRecordsDto followRecordsDto) {
        return documentaryService.getFollowRecords(followRecordsDto);
    }
    
    /**
     *  我的跟单--头部
     */
    @ApiOperation(value="我的跟单--头部", notes="我的跟单--头部")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowInfoVo.class)})
    @GetMapping(value = "/getFollowInfo")
    public Result  getFollowInfo() {
        return documentaryService.getFollowInfo();
    }
    
    /**
     *  我的跟单--我的跟单--当前跟单
     * @return
     */
    @ApiOperation(value="我的跟单--我的跟单--当前跟单", notes="我的跟单--我的跟单--当前跟单")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MyFollowOrderVo.class)})
    @PostMapping(value = "/getNowMyFollowOrderRecords")
    public Result  getNowMyFollowOrderRecords(@RequestBody @Valid MyFollowOrderDto myFollowOrderDto) {
        return documentaryService.getNowMyFollowOrderRecords(myFollowOrderDto);
    }
    
    /**
     *  我的跟单--我的跟单--历史跟单
     * @return
     */
    @ApiOperation(value="我的跟单--我的跟单--历史跟单", notes="我的跟单--我的跟单--历史跟单")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MyFollowOrderVo.class)})
    @PostMapping(value = "/getHistoryMyFollowOrderRecords")
    public Result  getHistoryMyFollowOrderRecords(@RequestBody @Valid MyFollowOrderDto myFollowOrderDto) {
        return documentaryService.getHistoryMyFollowOrderRecords(myFollowOrderDto);
    }
    
    /**
     *  我的跟单--我的交易员
     */
    @ApiOperation(value="我的跟单--我的交易员", notes="我的跟单--我的交易员")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MyFollowTraderInfoVo.class)})
    @PostMapping(value = "/getMyFollowTraderInfo")
    public Result  getMyFollowTraderInfo(@RequestBody @Valid MyFollowTraderInfoDto myFollowTraderInfoDto) {
        return documentaryService.getMyFollowTraderInfo(myFollowTraderInfoDto);
    }
    
    /**
     *  跟单---跟单设置--跟单合约
     */
    @ApiOperation(value="跟单---跟单设置--跟单合约", notes="跟单---跟单设置--跟单合约")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = DocumentaryOrderInfoVo.class)})
    @GetMapping(value = "/getDocumentaryOrderInfo")
    public Result  getDocumentaryOrderInfo() {
        return documentaryService.getDocumentaryOrderInfo();
    }
    
    /**
     *  跟单---跟单设置--是否已跟单
     */
    @ApiOperation(value="跟单---跟单设置--是否已跟单", notes="跟单---跟单设置--是否已跟单")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "tradeId", value = "交易员ID", required = true, dataType = "String", paramType="query")
    })
    @GetMapping(value = "/getDocumentaryOrderSetState")
    public Result  getDocumentaryOrderSetState(String tradeId) {
        return documentaryService.getDocumentaryOrderSetState(tradeId);
    }
    
    /**
     *  跟单---跟单设置--新增跟单
     */
    @ApiOperation(value="跟单---跟单设置--新增跟单", notes="跟单---跟单设置--新增跟单")
    @PostMapping(value = "/addDocumentaryOrderSet")
    public Result  addDocumentaryOrderSet(@RequestBody @Valid DocumentaryOrderSetDto documentaryOrderSetDto) {
        return documentaryService.getDocumentaryOrderSet(documentaryOrderSetDto);
    }
    
    /**
     *  跟单---跟单设置--进入编辑
     */
    @ApiOperation(value="跟单---跟单设置--进入编辑", notes="跟单---跟单设置--进入编辑")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = DocumentaryOrderSetInfoVo.class)})
    @ApiImplicitParams({
        @ApiImplicitParam(name = "tradeId", value = "交易员ID", required = true, dataType = "String", paramType="query")
    })
    @GetMapping(value = "/getDocumentaryOrderSetInfo")
    public Result  getDocumentaryOrderSetInfo(String tradeId) {
        return documentaryService.getDocumentaryOrderSetInfo(tradeId);
    }
    
    /**
     *  跟单---跟单设置--取消跟随
     */
    @ApiOperation(value="跟单---跟单设置--取消跟随", notes="跟单---跟单设置--取消跟随")
    @PostMapping(value = "/cancelDocumentaryOrderSetInfo")
    public Result  cancelDocumentaryOrderSetInfo(@RequestBody @Valid CancelDocumentaryOrderSetDto cancelDocumentaryOrderSetDto) {
        return documentaryService.cancelDocumentaryOrderSetInfo(cancelDocumentaryOrderSetDto);
    }
    
    /**
     *  跟单---跟单设置--更新
     */
    @ApiOperation(value="跟单---跟单设置--更新", notes="跟单---跟单设置--更新")
    @PostMapping(value = "/updateDocumentaryOrderSetInfo")
    public Result  updateDocumentaryOrderSetInfo(@RequestBody @Valid UpdateDocumentaryOrderSetDto updateDocumentaryOrderSetDto) {
        return documentaryService.updateDocumentaryOrderSetInfo(updateDocumentaryOrderSetDto);
    }
    
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
}