AdministerController.java
13.7 KB
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
package com.subsidy.controller;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.administer.*;
import com.subsidy.model.*;
import com.subsidy.service.AdministerService;
import com.subsidy.dto.classDict.SocialTestDetailDTO;
import com.subsidy.vo.member.DownloadFailMembersDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
/**
* <p>
* 管理平台用户 前端控制器
* </p>
*
* @author DengMin
* @since 2021-10-11
*/
@RestController
@Api(tags = "管理平台用户")
@RequestMapping("/administer")
public class AdministerController {
@Autowired
private AdministerService administerService;
@PostMapping("/login")
@ApiOperation("登录接口(非中心端登录入口) accountName password")
public ResponseVO login(@RequestBody AdministerDO administerDO) {
return ResponseData.generateCreatedResponse(0, administerService.login(administerDO));
}
@PostMapping("appLogin")
@ApiOperation("应用端 手机号accountName timestamp sign")
@TimeRequired
public ResponseVO kunchiLogin(@RequestBody AppLoginDTO appLoginDTO, HttpServletRequest request){
return ResponseData.generateCreatedResponse(0,administerService.appLogin(appLoginDTO,request));
}
@PostMapping("/getPermissions")
@ApiOperation("权限查询")
@LoginRequired
public ResponseVO getPermissions() {
return ResponseData.generateCreatedResponse(0, administerService.getPermissions());
}
@PostMapping("/administers")
@ApiOperation("客户账户管理 { userName companyName pageNum pageSize }")
// @LoginRequired
public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO) {
return ResponseData.generateCreatedResponse(0, administerService.operators(operatorsDTO));
}
@PostMapping("addAdminister")
@ApiOperation("添加客户账户 userName 名称 accountName 账户 password 密码 telephone 联系方式 role:0:应用 1:客户 2:中心 3:企业唯一账号 remark 备注 companyIds[] serviceIds[]")
@LoginRequired
public ResponseVO addAdminister(@RequestBody AddAdministerDTO addAdministerDTO) {
return ResponseData.generateCreatedResponse(0, administerService.addAdminister(addAdministerDTO));
}
@PostMapping("deleteAdminister")
@ApiOperation("客户账户管理 删除 id ")
@LoginRequired
public ResponseVO deleteAdminister(@RequestBody AdministerDO administerDO) {
return ResponseData.generateCreatedResponse(0, administerService.deleteAdminister(administerDO));
}
@PostMapping("updateAdminister")
@ApiOperation("编辑客户账户 id userName 名称 accountName 账号 password remark telephone companyIds[] serviceIds[]")
@LoginRequired
public ResponseVO updateAdminister(@RequestBody AddAdministerDTO addAdministerDTO) {
return ResponseData.generateCreatedResponse(0, administerService.updateAdminister(addAdministerDTO));
}
@PostMapping("classSummary")
@ApiOperation("班级详情--数据概览 id 班级id ")
// @LoginRequired
public ResponseVO classSummary(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.classSummary(classDetailDTO));
}
@PostMapping("classDetail")
@ApiOperation("班级管理--班级成员 id 班级id userName pageSize pageNum")
@LoginRequired
public ResponseVO classDetail(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.classDetail(classDetailDTO));
}
@PostMapping("exportClassDetail")
@ApiOperation("班级管理--班级成员--导出 id 班级id userName")
@LoginRequired
public void exportClassDetail(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true);
administerService.exportClassDetail(classDetailDTO);
}
@PostMapping("signDetail")
@ApiOperation("班级管理--注册签到 id 班级id userName pageSize pageNum")
@LoginRequired
public ResponseVO signDetail(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.signDetail(classDetailDTO));
}
@PostMapping("exportSignDetail")
@ApiOperation("班级管理--注册签到 id 班级id userName")
@LoginRequired
public void exportSignDetail(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true);
administerService.exportSignDetail(classDetailDTO);
}
@PostMapping("exerciseTest")
@ApiOperation("##2024.3##班级管理(企业线上化培训)--测评成绩 id 班级id userName paperId pageSize pageNum")
@LoginRequired
public ResponseVO exerciseTest(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.exerciseTest(classDetailDTO));
}
@PostMapping("exportExerciseTest")
@ApiOperation("##2024.3##班级管理--测评成绩 id 班级id userName paperId")
@LoginRequired
public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true);
administerService.exportExerciseTest(classDetailDTO);
}
@PostMapping("socialExerciseTest")
@ApiOperation("##2024.3##社会化、学徒制--班级管理--测评成绩 id 班级id userName paperId pageSize pageNum")
@LoginRequired
public ResponseVO socialExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.socialExerciseTest(classDetailDTO));
}
@PostMapping("socialTestDetail")
@ApiOperation("##2024.3##社会化、学徒制--班级管理--测评概览 id 班级id memberId 学员id")
@LoginRequired
public ResponseVO socialTestDetail(@RequestBody SocialTestDetailDTO socialTestDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.socialTestDetail(socialTestDetailDTO));
}
@PostMapping("socialTestRecord")
@ApiOperation("##2024.3##社会化、学徒制--班级管理--测评记录 id 班级id memberId 学员id ")
@LoginRequired
public ResponseVO socialTestRecord(@RequestBody SocialTestDetailDTO socialTestDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.socialTestRecord(socialTestDetailDTO));
}
@PostMapping("exportSocialExerciseTest")
@ApiOperation("##2024.3##班级管理--测评成绩 id 班级id userName ")
@LoginRequired
public void exportSocialExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true);
administerService.exportSocialExerciseTest(classDetailDTO);
}
@PostMapping("getMemberPapers")
@ApiOperation("获取某个成员某个卷子的做题历史 memberId paperId")
@LoginRequired
public ResponseVO getMemberPapers(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO) {
return ResponseData.generateCreatedResponse(0, administerService.getMemberPapers(exerciseDoneResultDO));
}
@PostMapping("getPaperDetail")
@ApiOperation("获取某个卷子做题详情 doneId getMemberPapers接口返回id memberId成员id")
@LoginRequired
public ResponseVO getPaperDetail(@RequestBody ExerciseDoneHistoryDO exerciseDoneHistoryDO) {
return ResponseData.generateCreatedResponse(0, administerService.getPaperDetail(exerciseDoneHistoryDO));
}
@PostMapping("answerRecord")
@ApiOperation("班级管理--答疑 id 班级id userName")
@LoginRequired
public ResponseVO answerRecord(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.answerRecord(classDetailDTO));
}
@PostMapping("exportAnswerRecord")
@ApiOperation("班级管理--答疑 id 班级id userName")
@LoginRequired
public void exportAnswerRecord(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true);
administerService.exportAnswerRecord(classDetailDTO);
}
@PostMapping("classVodInfo")
@ApiOperation("学习记录---课件进度提醒 {courseId 课程id classId 班级id vodName视频名称}")
@LoginRequired
public ResponseVO classVodInfo(@RequestBody ClassVodInfoDTO classVodInfoDTO) {
return ResponseData.generateCreatedResponse(0, administerService.classVodInfo(classVodInfoDTO));
}
@PostMapping("classDailyInfo")
@ApiOperation("学习记录---每日学习时长 {courseId 课程id classId 班级id userName startDate endDate}")
@LoginRequired
public ResponseVO classDailyInfo(@RequestBody ClassDailyInfoDTO classDailyInfoDTO) {
return ResponseData.generateCreatedResponse(0, administerService.classDailyInfo(classDailyInfoDTO));
}
@PostMapping("exportClassDailyInfo")
@ApiParam("每日学习日志")
@LoginRequired
public void exportVodInfo(@RequestBody ClassDailyInfoDTO classDailyInfoDTO) {
administerService.exportClassDailyInfo(classDailyInfoDTO);
}
@PostMapping("classVodDailyInfo")
@ApiOperation("学习记录---每日学习时长(视频维度)")
// @LoginRequired
public ResponseVO classVodDailyInfo(@RequestBody ClassVodDailyInfoDTO classVodDailyInfoDTO) {
return ResponseData.generateCreatedResponse(0, administerService.classVodDailyInfo(classVodDailyInfoDTO));
}
@PostMapping("exportClassVodDailyInfo")
@ApiOperation("学习记录---每日学习时长(视频维度) pageSize pageNum userName classId")
@LoginRequired
public void exportClassVodDailyInfo(@RequestBody ClassVodDailyInfoDTO classVodDailyInfoDTO) {
administerService.exportClassVodDailyInfo(classVodDailyInfoDTO);
}
@PostMapping("memberStudy")
@ApiOperation("学员学习日志 pageSize pageNum classId memberId")
@LoginRequired
public ResponseVO memberStudy(@RequestBody MemberStudyLogDTO memberStudyLogDTO) {
return ResponseData.generateCreatedResponse(0, administerService.memberStudy(memberStudyLogDTO));
}
@PostMapping("memberDetectionRecord")
@ApiOperation("获取某个班级活跃度检测记录 id userName pageSize pageNum ")
@LoginRequired
public ResponseVO memberDetectionRecord(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.memberDetectionRecord(classDetailDTO));
}
@PostMapping("exportMemberDetectionRecord")
@ApiOperation("获取某个班级活跃度检测记录 id userName ")
@LoginRequired
public void exportMemberDetectionRecord(@RequestBody ClassDetailDTO classDetailDTO) {
administerService.exportMemberDetectionRecord(classDetailDTO);
}
@PostMapping("imageCheckDetail")
@ApiOperation("实名制验证详情 id 班级id userName pageSize pageNum")
@LoginRequired
public ResponseVO imageCheckDetail(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.imageCheckDetail(classDetailDTO));
}
@PostMapping("getMemberCheckDetail")
@ApiOperation("查看某个学生的验证详情 memberId 学员id classId")
@LoginRequired
public ResponseVO getMemberCheckDetail(@RequestBody ImageCheckRecordDO imageCheckRecordDO) {
return ResponseData.generateCreatedResponse(0, administerService.getMemberCheckDetail(imageCheckRecordDO));
}
@PostMapping("exportZip")
@ApiOperation("下载压缩包 id 班级id")
@CrossOrigin
// @LoginRequired
public void exportZip(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
administerService.export(classDetailDTO);
}
@PostMapping("memberStudyLog")
@ApiOperation("学员学习日志 classId memberId")
@LoginRequired
public void memberStudyLog(@RequestBody MemberStudyLogDTO memberStudyLogDTO) throws Exception {
administerService.memberStudyLog(memberStudyLogDTO);
}
@PostMapping("importMember")
@ApiOperation("导入学生 {companyId 公司id file}")
// @LoginRequired
public ResponseVO importMember(Long companyId, @RequestParam("file") MultipartFile file) throws Exception {
return ResponseData.generateCreatedResponse(0, administerService.importMember(companyId, file));
}
@PostMapping("downloadFailMembers")
@ApiOperation("下载失败的学员 importMemberVOS[] 字段是导出失败的字段")
public void downloadFailMembers(@RequestBody DownloadFailMembersDTO downloadFailMembersDTO){
administerService.downloadFailMembers(downloadFailMembersDTO);
}
@PostMapping("manageMember")
@ApiOperation("用户管理 {pageSize pageNum userName:名字 }")
@LoginRequired
public ResponseVO manageMember(@RequestBody ManageMemberDTO manageMemberDTO) {
return ResponseData.generateCreatedResponse(0, administerService.manageMember(manageMemberDTO));
}
@PostMapping("exportManageMember")
@ApiOperation("导出认证信息 {pageSize pageNum userName:名字 } ")
@LoginRequired
public void exportManageMember(@RequestBody ManageMemberDTO manageMemberDTO) {
administerService.exportManageMember(manageMemberDTO);
}
@PostMapping("selfExport")
@ApiOperation("自助导出 id导出")
public void selfExport(@RequestBody ClassDictDO classDictDO) {
administerService.selfExport(classDictDO);
}
}