MemberController.java
7.82 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
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.VerifyCodeDTO;
import com.subsidy.dto.member.*;
import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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;
/**
* <p>
* 学生表 前端控制器
* </p>
*
* @author DengMin
* @since 2021-10-11
*/
@RestController
@Api(tags = "学生表")
@RequestMapping("/member")
public class MemberController {
@Autowired
private MemberService memberService;
@PostMapping("getAll")
@ApiOperation("查询某部门成员 pageNum pageSize departmentId userName status startDate endDate")
@LoginRequired
public ResponseVO getAll(@RequestBody GetAllDTO getAllDTO){
return ResponseData.generateCreatedResponse(0,memberService.getAll(getAllDTO));
}
@PostMapping("deleteMember")
@ApiOperation("删除成员 id ")
@LoginRequired
public ResponseVO deleteMember(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,memberService.deleteMember(memberDO));
}
@PostMapping("addMember")
@ApiOperation("新增成员 companyId userName accountName accountNameEn telephone gender image idCard departmentIds jobIds workNo inductionDate email")
@LoginRequired
public ResponseVO addMember(@RequestBody AddMemberDTO addMemberDTO){
return ResponseData.generateCreatedResponse(0,memberService.addMember(addMemberDTO));
}
@PostMapping("updateMember")
@ApiOperation("编辑成员 {id companyId userName accountName accountNameEn telephone gender image idCard status departmentIds jobIds}")
@LoginRequired
public ResponseVO updateMember(@RequestBody AddMemberDTO addMemberDTO){
return ResponseData.generateCreatedResponse(0,memberService.updateMember(addMemberDTO));
}
@PostMapping(value = "/login")
@ApiOperation("手机端:登录:telephone/手机号, verifyCode/验证码")
public ResponseVO login(@RequestBody VerifyCodeDTO verifyCodeDTO) {
return ResponseData.generateCreatedResponse(0, memberService.login(verifyCodeDTO));
}
@PostMapping("passwordLogin")
@ApiOperation("手机端:密码登录 { companyId accountName password}")
public ResponseVO passwordLogin(@RequestBody PasswordLoginDTO passwordLoginDTO){
return ResponseData.generateCreatedResponse(0,memberService.passwordLogin(passwordLoginDTO));
}
@PostMapping("qingxuetangLogin")
@ApiOperation("轻学堂登录 手机号mobile")
@TimeRequired
public ResponseVO qingxuetangLogin(@RequestBody QingxuetangLoginDTO qingxuetangLoginDTO){
return ResponseData.generateCreatedResponse(0,memberService.qingxuetangLogin(qingxuetangLoginDTO));
}
@PostMapping("kunchiLogin")
@ApiOperation("鲲驰登陆 authCorpName 手机号mobile nickname timestamp sign")
@TimeRequired
public ResponseVO kunchiLogin(@RequestBody QingxuetangLoginDTO qingxuetangLoginDTO){
return ResponseData.generateCreatedResponse(0,memberService.kunchiLogin(qingxuetangLoginDTO));
}
@PostMapping("checkStatus")
@ApiOperation("实名制验证状态 memberId")
@TimeRequired
public ResponseVO checkStatus(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,memberService.checkStatus(memberDO));
}
@PostMapping("updatePassword")
@ApiOperation("修改密码 {id password}")
@LoginRequired
@TimeRequired
public ResponseVO updatePassword(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,memberService.updatePassword(memberDO));
}
@PostMapping("removeCheckImage")
@ApiOperation("清除采集照片 id ")
public ResponseVO removeCheckImage(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,memberService.removeCheckImage(memberDO));
}
@PostMapping("myCourses")
@ApiOperation("手机端:我的学习--课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 ")
// @LoginRequired
@TimeRequired
public ResponseVO myCourses(@RequestBody MyCoursesDTO myCoursesDTO){
return ResponseData.generateCreatedResponse(0,memberService.myCourses(myCoursesDTO));
}
@PostMapping("contentVod")
@ApiOperation("手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id")
// @LoginRequired
@TimeRequired
public ResponseVO contentVod(@RequestBody ContentMemberDTO contentVodDTO){
return ResponseData.generateCreatedResponse(0,memberService.contentVod(contentVodDTO));
}
@PostMapping("contentFiles")
@ApiOperation("手机端:目录+课件 courseId 课程 memberId 学员id")
@LoginRequired
@TimeRequired
public ResponseVO contentFiles(@RequestBody ContentMemberDTO contentMemberDTO){
return ResponseData.generateCreatedResponse(0,memberService.contentFiles(contentMemberDTO));
}
@PostMapping("studyHistory")
@ApiOperation("学习记录 memberId 成员id pageSize pageNum")
@LoginRequired
@TimeRequired
public ResponseVO studyHistory(@RequestBody StudyHistoryDTO studyHistoryDTO){
return ResponseData.generateCreatedResponse(0,memberService.studyHistory(studyHistoryDTO));
}
@PostMapping("getCourseTest")
@ApiOperation("获取课程下的测试情况 {memberId 成员id 班级id classId courseId 课程id }")
@LoginRequired
@TimeRequired
public ResponseVO getCourseTest(@RequestBody ContentMemberDTO contentMemberDTO){
return ResponseData.generateCreatedResponse(0,memberService.getCourseTest(contentMemberDTO));
}
@PostMapping("getTestDoneDetail")
@ApiOperation("获取某个测评学生的完成情况 paperId memberId")
@LoginRequired
public ResponseVO getPaperDoneDetail(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO){
return ResponseData.generateCreatedResponse(0,memberService.getPaperDoneDetail(exerciseDoneResultDO));
}
@PostMapping("getStudyInfo")
@ApiOperation("获取学生完成课程情况 id 学员id")
@LoginRequired
@TimeRequired
public ResponseVO getStudyInfo(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,memberService.getStudyInfo(memberDO));
}
@PostMapping("checkTimes")
@ApiOperation("检测是否超过次数 memberId paperId classId")
@LoginRequired
public ResponseVO checkTimes(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO){
return ResponseData.generateCreatedResponse(0,memberService.checkTimes(exerciseDoneResultDO));
}
@PostMapping("importRedis")
@ApiOperation("导入学生账号到redis")
@LoginRequired
public void importRedis(){
memberService.importRedis();
}
@PostMapping("changeDepartments")
@ApiOperation("修改部门 desDepId[] 目的部门 memberIds[] 成员id")
@LoginRequired
public ResponseVO changeDepartments(@RequestBody ChangeDepartmentsDTO changeDepartmentsDTO){
return ResponseData.generateCreatedResponse(0,memberService.changeDepartments(changeDepartmentsDTO));
}
@PostMapping("qxy")
@ApiOperation("Q学友授权 telephone 手机号")
@TimeRequired
public ResponseVO qxy(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,memberService.qxy(memberDO));
}
}