无关风月
2024-06-19 153622ed0e29399d67a6de14517e96cbc15ffdad
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
package com.ruoyi.study.api.feignClient;
 
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.study.api.domain.TUser;
import com.ruoyi.study.api.dto.*;
import com.ruoyi.study.api.factory.StudyFallbackFactory;
import com.ruoyi.study.api.model.TStory;
import com.ruoyi.study.api.model.TSubject;
import com.ruoyi.study.api.vo.StudyDTO;
import com.ruoyi.study.api.vo.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
@FeignClient(contextId = "studyClient", value = ServiceNameConstants.STUDY_SERVICE, fallbackFactory = StudyFallbackFactory.class)
public interface StudyClient {
 
 
    @PostMapping("/base/user/getUserById/{id}")
    R<TUser> getUserById(@PathVariable("id") Integer id);
    @PostMapping("/base/user/vipBack/{id}")
    R vipBack(@PathVariable("id") Integer id);
 
    @PostMapping("/base/user/userList")
    R<PageInfo<AppUserVO>> couponReceive(@RequestBody AppUserQuery query);
 
    @PostMapping("/base/user/getUserInfo")
    R<UserInfoVO> getUserInfo(@RequestBody UserInfoQuery dto);
 
    @PostMapping("/base/user/freeze/{id}")
    R freeze(@PathVariable("id") Integer id);
 
    @PostMapping("/base/user/vipOrderList")
    R<PageInfo<VipOrderVO>> vipOrderList(@RequestBody AppUserQuery query);
 
    /**
     * 选择故事列表查询
     *
     * @param query
     * @return
     */
    @PostMapping("/base/study/storyList")
    R<PageInfo<TStory>> storyList(@RequestBody ChoiceStory query);
 
    /**
     * 选择题目列表查询
     *
     * @param query
     * @return
     */
    @PostMapping("/base/study/subjectList")
    R<PageInfo<TSubject>> subjectList(@RequestBody ChoiceSubject query);
 
    /**
     * 新增/修改学习类型配置
     *
     * @return
     */
    @PostMapping("/base/study/addStudySet")
    R<Object> addStudySet(@RequestBody AddStudySetDTO dto);
 
    /**
     * 通过类型、周目、day查询学习配置
     *
     * @return
     */
    @PostMapping("/base/study/getStudySet")
    R<StudyVO> getStudySet(@RequestBody StudyDTO dto);
 
    /**
     * 学习类型列表查询
     *
     * @return
     */
    @PostMapping("/base/study/getStudyList")
    R<List<StudyListVO>> getStudyList();
 
    /**
     * 添加周目
     *
     * @return
     */
    @PostMapping("/base/study/addWeek")
    R<Object> addWeek(@RequestBody AddWeekDTO dto);
 
    /**
     * 题目管理列表查询
     *
     * @param query
     * @return
     */
    @PostMapping("/base/tSubject/subjectList")
    R<PageInfo<SubjectVO>> subjectList(@RequestBody SubjectQuery query);
 
    /**
     * 题目管理添加
     *
     * @return
     */
    @PostMapping("/base/tSubject/add")
    R add(@RequestBody SubjectDTO dto);
 
    /**
     * 题目管理编辑
     *
     * @return
     */
    @PostMapping("/base/tSubject/update")
    R update(@RequestBody SubjectDTO dto);
 
    /**
     * 查看详情
     *
     * @param id
     * @return
     */
    @PostMapping("/base/tSubject/getInfo")
    R<SubjectDTO> getInfo(@RequestParam("id") Integer id);
 
    /**
     * 修改题目状态
     *
     * @param id
     * @return
     */
    @PostMapping("/base/tSubject/updateState/{id}/{state}")
    R updateState(@PathVariable("id") Integer id, @PathVariable("state") Integer state);
 
    /**
     * 故事管理列表查询
     *
     * @param query
     * @return
     */
    @PostMapping("/base/tStory/storyList")
    R<PageInfo<SubjectVO>> storyList(@RequestBody SubjectQuery query);
 
    /**
     * 故事管理添加
     *
     * @param dto
     * @return
     */
    @PostMapping("/base/tStory/add")
    R add(@RequestBody StoryDTO dto);
 
    /**
     * 故事管理编辑
     *
     * @param dto
     * @return
     */
    @PostMapping("/base/tStory/update")
    R update(@RequestBody StoryDTO dto);
 
    /**
     * 故事管理查看详情
     *
     * @return
     */
    @PostMapping("/base/tStory/getInfo")
    R<StoryDTO> getInfo1(@RequestParam("id") Integer id);
 
    /**
     * 故事管理修改状态
     *
     * @param id
     * @param state
     * @return
     */
    @PostMapping("/base/tStory/updateState/{id}/{state}")
    R updateState1(@PathVariable("id") Integer id, @PathVariable("state") Integer state);
 
    @GetMapping("/base/user/userInfo")
    @ApiOperation(value = "用户详情", tags = {"学习端-用户详情"})
    R<UserPersonalCenterVO> userInfo();
    @GetMapping("/base/user/userInfoParent")
    @ApiOperation(value = "用户详情", tags = {"家长端-用户详情"})
    R<TUser> userInfoParent();
 
    /**
     * 生成积分明细-用于远程调用
     *
     * @param integral 积分变动信息
     * @param method   变动源
     * @return 操作结果
     */
    @GetMapping("/base/study/addIntegralDetail")
    R<Boolean> addIntegralDetail(@RequestParam("integral") String integral, @RequestParam("method") String method);
    @GetMapping("/base/study/addIntegralDetailParent")
    R<Boolean> addIntegralDetailParent(@RequestParam("integral") String integral, @RequestParam("method") String method);
 
    /**
     * 用户积分变动(增加或减少)-用于远程调用
     *
     * @param integral 积分变动信息
     * @param method   变动源
     * @return 操作结果
     */
    @GetMapping("/base/study/exchangeIntegral")
    @ApiOperation(value = "用户积分变动", tags = {"用户积分变动"})
    R<Boolean> exchangeIntegral(@RequestParam("integral") Integer integral, @RequestParam("method") String method);
    @GetMapping("/base/study/exchangeIntegralParent")
    @ApiOperation(value = "用户积分变动", tags = {"用户积分变动"})
    R<Boolean> exchangeIntegralParent(@RequestParam("integral") Integer integral, @RequestParam("method") String method);
 
    /**
     * 生成积分明细-用于远程调用
     *
     * @param integral 积分变动信息
     * @param method   变动源
     * @return 操作结果
     */
    @GetMapping("/base/study/addIntegralDetail1")
    R<Boolean> addIntegralDetail1(@RequestParam("integral") String integral, @RequestParam("method") String method);
 
    /**
     * 用户积分变动(增加或减少)-用于远程调用
     *
     * @param integral 积分变动信息
     * @param method   变动源
     * @return 操作结果
     */
    @GetMapping("/base/study/exchangeIntegral1")
    @ApiOperation(value = "用户积分变动", tags = {"用户积分变动"})
    R<Boolean> exchangeIntegral1(@RequestParam("integral") Integer integral, @RequestParam("method") String method);
 
}