Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7697e95a
authored
Dec 03, 2021
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测评升级
1 parent
03ff6ba5
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
814 additions
and
208 deletions
src/main/java/com/subsidy/controller/AdministerController.java
src/main/java/com/subsidy/controller/AnsweringQuestionController.java
src/main/java/com/subsidy/controller/CategoryController.java
src/main/java/com/subsidy/controller/ClassDictController.java
src/main/java/com/subsidy/controller/ClassHourDictController.java
src/main/java/com/subsidy/controller/CompanyDictController.java
src/main/java/com/subsidy/controller/CourseContentController.java
src/main/java/com/subsidy/controller/CourseDictController.java
src/main/java/com/subsidy/controller/DepartmentDictController.java
src/main/java/com/subsidy/controller/ExerciseDictController.java
src/main/java/com/subsidy/controller/ExerciseDoneHistoryController.java
src/main/java/com/subsidy/controller/FileDictController.java
src/main/java/com/subsidy/controller/MemberController.java
src/main/java/com/subsidy/controller/PaperDictController.java
src/main/java/com/subsidy/controller/SignInRecordController.java
src/main/java/com/subsidy/controller/SmsVerifyCodeController.java
src/main/java/com/subsidy/controller/VodDictController.java
src/main/java/com/subsidy/controller/VodPlayHistoryController.java
src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java
src/main/java/com/subsidy/dto/exercise/GetPaperExerciseDTO.java
src/main/java/com/subsidy/dto/member/GetAllDTO.java
src/main/java/com/subsidy/dto/member/PasswordLoginDTO.java
src/main/java/com/subsidy/mapper/CompanyDictMapper.java
src/main/java/com/subsidy/mapper/ExerciseDictMapper.java
src/main/java/com/subsidy/mapper/ExerciseDoneHistoryMapper.java
src/main/java/com/subsidy/mapper/MemberMapper.java
src/main/java/com/subsidy/mapper/PaperDictMapper.java
src/main/java/com/subsidy/model/ExerciseDictDO.java
src/main/java/com/subsidy/model/ExerciseDoneHistoryDO.java
src/main/java/com/subsidy/model/ExerciseDoneResultDO.java
src/main/java/com/subsidy/model/MemberDO.java
src/main/java/com/subsidy/model/PaperDictDO.java
src/main/java/com/subsidy/service/CompanyDictService.java
src/main/java/com/subsidy/service/ExerciseDictService.java
src/main/java/com/subsidy/service/ExerciseDoneHistoryService.java
src/main/java/com/subsidy/service/MemberService.java
src/main/java/com/subsidy/service/PaperDictService.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java
src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java
src/main/java/com/subsidy/service/impl/ExerciseDoneHistoryServiceImpl.java
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
src/main/java/com/subsidy/service/impl/PaperDictServiceImpl.java
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
src/main/java/com/subsidy/vo/administer/UserRoleVO.java
src/main/java/com/subsidy/vo/company/GetAllCompanyVO.java
src/main/java/com/subsidy/vo/exercise/GetPaperExerciseVO.java
src/main/java/com/subsidy/vo/member/GetAllVO.java
src/main/java/com/subsidy/vo/paper/QueryPapersVO.java
src/main/resources/application-dev.properties
src/main/resources/application.properties
src/main/resources/code.properties
src/main/resources/mapper/ClassMemberMappingMapper.xml
src/main/resources/mapper/CompanyDictMapper.xml
src/main/resources/mapper/ExerciseDictMapper.xml
src/main/resources/mapper/ExerciseDoneHistoryMapper.xml
src/main/resources/mapper/MemberMapper.xml
src/main/resources/mapper/PaperDictMapper.xml
src/main/resources/mybatis-plus.properties
src/main/java/com/subsidy/controller/AdministerController.java
View file @
7697e95
...
@@ -52,60 +52,60 @@ public class AdministerController {
...
@@ -52,60 +52,60 @@ public class AdministerController {
}
}
@PostMapping
(
"/login"
)
@PostMapping
(
"/login"
)
@ApiOperation
(
"登录接口 accountName password"
)
@ApiOperation
(
"
**
登录接口 accountName password"
)
public
ResponseVO
login
(
@RequestBody
AdministerDO
administerDO
){
public
ResponseVO
login
(
@RequestBody
AdministerDO
administerDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
login
(
administerDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
login
(
administerDO
));
}
}
@PostMapping
(
"/getPermissions"
)
@PostMapping
(
"/getPermissions"
)
@ApiOperation
(
"权限查询"
)
@ApiOperation
(
"
**
权限查询"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getPermissions
()
{
public
ResponseVO
getPermissions
()
{
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getPermissions
());
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
getPermissions
());
}
}
@PostMapping
(
"/administers"
)
@PostMapping
(
"/administers"
)
@ApiOperation
(
"查询所有运营者 { userName pageNum pageSize }"
)
@ApiOperation
(
"
**
查询所有运营者 { userName pageNum pageSize }"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
operators
(
operatorsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
operators
(
operatorsDTO
));
}
}
@PostMapping
(
"addAdminister"
)
@PostMapping
(
"addAdminister"
)
@ApiOperation
(
"添加运营者 id userName 名称 accountName 账号 "
)
@ApiOperation
(
"
**
添加运营者 id userName 名称 accountName 账号 "
)
public
ResponseVO
addAdminister
(
@RequestBody
AdministerDO
administerDO
){
public
ResponseVO
addAdminister
(
@RequestBody
AdministerDO
administerDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
addAdminister
(
administerDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
addAdminister
(
administerDO
));
}
}
@PostMapping
(
"deleteAdminister"
)
@PostMapping
(
"deleteAdminister"
)
@ApiOperation
(
"添加运营者 id "
)
@ApiOperation
(
"
**
添加运营者 id "
)
public
ResponseVO
deleteAdminister
(
@RequestBody
AdministerDO
administerDO
){
public
ResponseVO
deleteAdminister
(
@RequestBody
AdministerDO
administerDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
deleteAdminister
(
administerDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
deleteAdminister
(
administerDO
));
}
}
@PostMapping
(
"updateAdminister"
)
@PostMapping
(
"updateAdminister"
)
@ApiOperation
(
"编辑运营者 id userName 名称 accountName 账号 password"
)
@ApiOperation
(
"
**
编辑运营者 id userName 名称 accountName 账号 password"
)
public
ResponseVO
updateAdminister
(
@RequestBody
AdministerDO
administerDO
){
public
ResponseVO
updateAdminister
(
@RequestBody
AdministerDO
administerDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
updateAdminister
(
administerDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
updateAdminister
(
administerDO
));
}
}
@PostMapping
(
"classSummary"
)
@PostMapping
(
"classSummary"
)
@ApiOperation
(
"课程汇总 id 班级id "
)
@ApiOperation
(
"
**
课程汇总 id 班级id "
)
//
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
classSummary
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
classSummary
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classSummary
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classSummary
(
classDetailDTO
));
}
}
@PostMapping
(
"classDetail"
)
@PostMapping
(
"classDetail"
)
@ApiOperation
(
"班级管理--班级成员 id 班级id userName"
)
@ApiOperation
(
"
**
班级管理--班级成员 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
classDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
classDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classDetail
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classDetail
(
classDetailDTO
));
}
}
@PostMapping
(
"exportClassDetail"
)
@PostMapping
(
"exportClassDetail"
)
@ApiOperation
(
"班级管理--班级成员--导出 id 班级id userName"
)
@ApiOperation
(
"
**
班级管理--班级成员--导出 id 班级id userName"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public
void
exportClassDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportClassDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
...
@@ -113,14 +113,14 @@ public class AdministerController {
...
@@ -113,14 +113,14 @@ public class AdministerController {
}
}
@PostMapping
(
"signDetail"
)
@PostMapping
(
"signDetail"
)
@ApiOperation
(
"班级管理--注册签到 id 班级id userName"
)
@ApiOperation
(
"
**
班级管理--注册签到 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
signDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
signDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
signDetail
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
signDetail
(
classDetailDTO
));
}
}
@PostMapping
(
"exportSignDetail"
)
@PostMapping
(
"exportSignDetail"
)
@ApiOperation
(
"班级管理--注册签到 id 班级id userName"
)
@ApiOperation
(
"
**
班级管理--注册签到 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportSignDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportSignDetail
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
...
@@ -128,14 +128,14 @@ public class AdministerController {
...
@@ -128,14 +128,14 @@ public class AdministerController {
}
}
@PostMapping
(
"exerciseTest"
)
@PostMapping
(
"exerciseTest"
)
@ApiOperation
(
"
班级管理--测评成绩 id 班级id userName
"
)
@ApiOperation
(
"
** 班级管理--测评成绩 id 班级id userName paperId
"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
exerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
exerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
exerciseTest
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
exerciseTest
(
classDetailDTO
));
}
}
@PostMapping
(
"exportExerciseTest"
)
@PostMapping
(
"exportExerciseTest"
)
@ApiOperation
(
"
班级管理--测评成绩 id 班级id userName
"
)
@ApiOperation
(
"
** 班级管理--测评成绩 id 班级id userName paperId
"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
...
@@ -143,14 +143,14 @@ public class AdministerController {
...
@@ -143,14 +143,14 @@ public class AdministerController {
}
}
@PostMapping
(
"answerRecord"
)
@PostMapping
(
"answerRecord"
)
@ApiOperation
(
"班级管理--答疑 id 班级id userName"
)
@ApiOperation
(
"
**
班级管理--答疑 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
answerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
public
ResponseVO
answerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
answerRecord
(
classDetailDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
answerRecord
(
classDetailDTO
));
}
}
@PostMapping
(
"exportAnswerRecord"
)
@PostMapping
(
"exportAnswerRecord"
)
@ApiOperation
(
"班级管理--答疑 id 班级id userName"
)
@ApiOperation
(
"
**
班级管理--答疑 id 班级id userName"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportAnswerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportAnswerRecord
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
...
@@ -158,7 +158,7 @@ public class AdministerController {
...
@@ -158,7 +158,7 @@ public class AdministerController {
}
}
@PostMapping
(
"exportZip"
)
@PostMapping
(
"exportZip"
)
@ApiOperation
(
"下载压缩包 id 班级id"
)
@ApiOperation
(
"
**
下载压缩包 id 班级id"
)
@CrossOrigin
@CrossOrigin
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
void
exportZip
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportZip
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
...
@@ -166,7 +166,7 @@ public class AdministerController {
...
@@ -166,7 +166,7 @@ public class AdministerController {
}
}
@PostMapping
(
"importMember"
)
@PostMapping
(
"importMember"
)
@ApiOperation
(
"导入学生 {companyId 公司id file}"
)
@ApiOperation
(
"
**
导入学生 {companyId 公司id file}"
)
public
ResponseVO
importMember
(
Long
companyId
,
@RequestParam
(
"file"
)
MultipartFile
file
){
public
ResponseVO
importMember
(
Long
companyId
,
@RequestParam
(
"file"
)
MultipartFile
file
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
importMember
(
companyId
,
file
));
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
importMember
(
companyId
,
file
));
}
}
...
...
src/main/java/com/subsidy/controller/AnsweringQuestionController.java
View file @
7697e95
...
@@ -29,25 +29,25 @@ public class AnsweringQuestionController {
...
@@ -29,25 +29,25 @@ public class AnsweringQuestionController {
private
AnsweringQuestionService
answeringQuestionService
;
private
AnsweringQuestionService
answeringQuestionService
;
@PostMapping
(
"getCourseQuestion"
)
@PostMapping
(
"getCourseQuestion"
)
@ApiOperation
(
"获取某个课程的答疑 {classId pageSize pageNum memberId}"
)
@ApiOperation
(
"
**
获取某个课程的答疑 {classId pageSize pageNum memberId}"
)
public
ResponseVO
getCourseQuestion
(
@RequestBody
GetCourseQuestionDTO
getCourseQuestionDTO
){
public
ResponseVO
getCourseQuestion
(
@RequestBody
GetCourseQuestionDTO
getCourseQuestionDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
getCourseQuestion
(
getCourseQuestionDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
getCourseQuestion
(
getCourseQuestionDTO
));
}
}
@PostMapping
(
"addQuestion"
)
@PostMapping
(
"addQuestion"
)
@ApiOperation
(
"新增答疑 {classId askId title}"
)
@ApiOperation
(
"
**
新增答疑 {classId askId title}"
)
public
ResponseVO
addQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
public
ResponseVO
addQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
addQuestion
(
answeringQuestionDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
addQuestion
(
answeringQuestionDO
));
}
}
@PostMapping
(
"deleteQuestion"
)
@PostMapping
(
"deleteQuestion"
)
@ApiOperation
(
"删除答疑 {id}"
)
@ApiOperation
(
"
**
删除答疑 {id}"
)
public
ResponseVO
deleteQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
public
ResponseVO
deleteQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
deleteQuestion
(
answeringQuestionDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
deleteQuestion
(
answeringQuestionDO
));
}
}
@PostMapping
(
"updateQuestion"
)
@PostMapping
(
"updateQuestion"
)
@ApiOperation
(
"编辑答疑 {id answerId answer}"
)
@ApiOperation
(
"
**
编辑答疑 {id answerId answer}"
)
public
ResponseVO
updateQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
public
ResponseVO
updateQuestion
(
@RequestBody
AnsweringQuestionDO
answeringQuestionDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
updateQuestion
(
answeringQuestionDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
answeringQuestionService
.
updateQuestion
(
answeringQuestionDO
));
}
}
...
...
src/main/java/com/subsidy/controller/CategoryController.java
View file @
7697e95
...
@@ -54,7 +54,7 @@ public class CategoryController {
...
@@ -54,7 +54,7 @@ public class CategoryController {
}
}
@PostMapping
(
"deleteCategory"
)
@PostMapping
(
"deleteCategory"
)
@ApiOperation
(
"删除类目 id"
)
@ApiOperation
(
"删除类目
**
id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteCategory
(
@RequestBody
CategoryDO
categoryDO
){
public
ResponseVO
deleteCategory
(
@RequestBody
CategoryDO
categoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
deleteCategory
(
categoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
deleteCategory
(
categoryDO
));
...
...
src/main/java/com/subsidy/controller/ClassDictController.java
View file @
7697e95
...
@@ -46,7 +46,7 @@ public class ClassDictController {
...
@@ -46,7 +46,7 @@ public class ClassDictController {
}
}
@PostMapping
(
"deleteClasses"
)
@PostMapping
(
"deleteClasses"
)
@ApiOperation
(
"删除课程 id"
)
@ApiOperation
(
"
**
删除课程 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteClasses
(
@RequestBody
ClassDictDO
classDictDO
){
public
ResponseVO
deleteClasses
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
deleteClasses
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
deleteClasses
(
classDictDO
));
...
@@ -67,14 +67,14 @@ public class ClassDictController {
...
@@ -67,14 +67,14 @@ public class ClassDictController {
}
}
@PostMapping
(
"classDetail"
)
@PostMapping
(
"classDetail"
)
@ApiOperation
(
"获取一个班级详情 id"
)
@ApiOperation
(
"
**
获取一个班级详情 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
classDetail
(
@RequestBody
ClassDictDO
classDictDO
){
public
ResponseVO
classDetail
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
classDetail
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
classDetail
(
classDictDO
));
}
}
@PostMapping
(
"removeMember"
)
@PostMapping
(
"removeMember"
)
@ApiOperation
(
"移除班级 classId 班级id memberId人员id"
)
@ApiOperation
(
"
**
移除班级 classId 班级id memberId人员id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
removeMember
(
@RequestBody
ClassMemberMappingDO
classMemberMappingDO
){
public
ResponseVO
removeMember
(
@RequestBody
ClassMemberMappingDO
classMemberMappingDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
removeMember
(
classMemberMappingDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
removeMember
(
classMemberMappingDO
));
...
@@ -88,7 +88,7 @@ public class ClassDictController {
...
@@ -88,7 +88,7 @@ public class ClassDictController {
}
}
@PostMapping
(
"addMemberToClass"
)
@PostMapping
(
"addMemberToClass"
)
@ApiOperation
(
"将某个成员加入到某个班级里 classId memberIds []"
)
@ApiOperation
(
"
**
将某个成员加入到某个班级里 classId memberIds []"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addMemberToClass
(
@RequestBody
AddMemberToClassDTO
addMemberToClassDTO
){
public
ResponseVO
addMemberToClass
(
@RequestBody
AddMemberToClassDTO
addMemberToClassDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addMemberToClass
(
addMemberToClassDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addMemberToClass
(
addMemberToClassDTO
));
...
@@ -96,7 +96,7 @@ public class ClassDictController {
...
@@ -96,7 +96,7 @@ public class ClassDictController {
@PostMapping
(
"batchSms"
)
@PostMapping
(
"batchSms"
)
@ApiOperation
(
"批量发送班级短信 {id 班级id}"
)
@ApiOperation
(
"
**
批量发送班级短信 {id 班级id}"
)
public
ResponseVO
batchSms
(
@RequestBody
ClassDictDO
classDictDO
){
public
ResponseVO
batchSms
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
batchSms
(
classDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
batchSms
(
classDictDO
));
}
}
...
...
src/main/java/com/subsidy/controller/ClassHourDictController.java
View file @
7697e95
...
@@ -31,21 +31,21 @@ public class ClassHourDictController {
...
@@ -31,21 +31,21 @@ public class ClassHourDictController {
private
ClassHourDictService
classHourDictService
;
private
ClassHourDictService
classHourDictService
;
@PostMapping
(
"getSetting"
)
@PostMapping
(
"getSetting"
)
@ApiOperation
(
"查看当天设置的最大学习时长 companyId"
)
@ApiOperation
(
"
**
查看当天设置的最大学习时长 companyId"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getSetting
(
@RequestBody
ClassHourDictDO
classHourDictDO
){
public
ResponseVO
getSetting
(
@RequestBody
ClassHourDictDO
classHourDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
getSetting
(
classHourDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
getSetting
(
classHourDictDO
));
}
}
@PostMapping
(
"updateSetting"
)
@PostMapping
(
"updateSetting"
)
@ApiOperation
(
"修改当天设置时长 id 主键 classHour status"
)
@ApiOperation
(
"
**
修改当天设置时长 id 主键 classHour status"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateSetting
(
@RequestBody
ClassHourDictDO
classHourDictDO
){
public
ResponseVO
updateSetting
(
@RequestBody
ClassHourDictDO
classHourDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
updateSetting
(
classHourDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
updateSetting
(
classHourDictDO
));
}
}
@PostMapping
(
"pollingGet"
)
@PostMapping
(
"pollingGet"
)
@ApiOperation
(
"轮询查询当前这个人当天有没有超过最长时长 memberId playLength"
)
@ApiOperation
(
"
**
轮询查询当前这个人当天有没有超过最长时长 memberId playLength"
)
public
ResponseVO
pollingGet
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
public
ResponseVO
pollingGet
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
pollingGet
(
vodPlayHistoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
classHourDictService
.
pollingGet
(
vodPlayHistoryDO
));
}
}
...
...
src/main/java/com/subsidy/controller/CompanyDictController.java
View file @
7697e95
...
@@ -6,6 +6,7 @@ import com.subsidy.common.ResponseVO;
...
@@ -6,6 +6,7 @@ import com.subsidy.common.ResponseVO;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.administer.OperatorsDTO
;
import
com.subsidy.dto.administer.OperatorsDTO
;
import
com.subsidy.dto.company.AddCompanyDTO
;
import
com.subsidy.dto.company.AddCompanyDTO
;
import
com.subsidy.mapper.CompanyDictMapper
;
import
com.subsidy.model.AdministerDO
;
import
com.subsidy.model.AdministerDO
;
import
com.subsidy.model.CompanyDictDO
;
import
com.subsidy.model.CompanyDictDO
;
import
com.subsidy.service.CompanyDictService
;
import
com.subsidy.service.CompanyDictService
;
...
@@ -36,31 +37,37 @@ public class CompanyDictController {
...
@@ -36,31 +37,37 @@ public class CompanyDictController {
private
CompanyDictService
companyDictService
;
private
CompanyDictService
companyDictService
;
@PostMapping
(
"/administers"
)
@PostMapping
(
"/administers"
)
@ApiOperation
(
"查询所有企业 {id companyName pageNum pageSize }"
)
@ApiOperation
(
"
**
查询所有企业 {id companyName pageNum pageSize }"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
operators
(
operatorsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
operators
(
operatorsDTO
));
}
}
@PostMapping
(
"addCompany"
)
@PostMapping
(
"addCompany"
)
@ApiOperation
(
"添加企业 {accountName:账号 companyName:企业名称 shortName 简称 banner:标语 field:领域 role 1:超级管理员 2:普通成员}"
)
@ApiOperation
(
"
**
添加企业 {accountName:账号 companyName:企业名称 shortName 简称 banner:标语 field:领域 role 1:超级管理员 2:普通成员}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addOperator
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
public
ResponseVO
addOperator
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
addOperator
(
addCompanyDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
addOperator
(
addCompanyDTO
));
}
}
@PostMapping
(
"deleteCompany"
)
@PostMapping
(
"deleteCompany"
)
@ApiOperation
(
"删除企业 id"
)
@ApiOperation
(
"
**
删除企业 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteAdminister
(
@RequestBody
CompanyDictDO
companyDictDO
){
public
ResponseVO
deleteAdminister
(
@RequestBody
CompanyDictDO
companyDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
deleteAdminister
(
companyDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
deleteAdminister
(
companyDictDO
));
}
}
@PostMapping
(
"updateCompany"
)
@PostMapping
(
"updateCompany"
)
@ApiOperation
(
"修改企业 id accountName:账号 companyName:企业名称 shortName 简称 banner:标语 field:领域 role 1:超级管理员 2:普通成员"
)
@ApiOperation
(
"
**
修改企业 id accountName:账号 companyName:企业名称 shortName 简称 banner:标语 field:领域 role 1:超级管理员 2:普通成员"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateAdminister
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
public
ResponseVO
updateAdminister
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
updateAdminister
(
addCompanyDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
updateAdminister
(
addCompanyDTO
));
}
}
@PostMapping
(
"getAllCompany"
)
@ApiOperation
(
"获取全部企业 {companyName}"
)
public
ResponseVO
getAllCompany
(
@RequestBody
CompanyDictDO
companyDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
getAllCompany
(
companyDictDO
));
}
}
}
src/main/java/com/subsidy/controller/CourseContentController.java
View file @
7697e95
...
@@ -34,28 +34,28 @@ public class CourseContentController {
...
@@ -34,28 +34,28 @@ public class CourseContentController {
private
CourseContentService
courseContentService
;
private
CourseContentService
courseContentService
;
@PostMapping
(
"getContents"
)
@PostMapping
(
"getContents"
)
@ApiOperation
(
"获取课程目录 {courseId}"
)
@ApiOperation
(
"
**
获取课程目录 {courseId}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getContents
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
getContents
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
getContents
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
getContents
(
courseContentDO
));
}
}
@PostMapping
(
"deleteContent"
)
@PostMapping
(
"deleteContent"
)
@ApiOperation
(
"删除一个目录 {id} "
)
@ApiOperation
(
"
**
删除一个目录 {id} "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteContent
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
deleteContent
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
deleteContent
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
deleteContent
(
courseContentDO
));
}
}
@PostMapping
(
"addContent"
)
@PostMapping
(
"addContent"
)
@ApiOperation
(
"添加一个目录 {courseId content}"
)
@ApiOperation
(
"
**
添加一个目录 {courseId content}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addContent
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
addContent
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
addContent
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
addContent
(
courseContentDO
));
}
}
@PostMapping
(
"updateContent"
)
@PostMapping
(
"updateContent"
)
@ApiOperation
(
"更新一个目录 {id courseId content}"
)
@ApiOperation
(
"
**
更新一个目录 {id courseId content}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateContent
(
@RequestBody
CourseContentDO
courseContentDO
){
public
ResponseVO
updateContent
(
@RequestBody
CourseContentDO
courseContentDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
updateContent
(
courseContentDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseContentService
.
updateContent
(
courseContentDO
));
...
...
src/main/java/com/subsidy/controller/CourseDictController.java
View file @
7697e95
...
@@ -38,14 +38,14 @@ public class CourseDictController {
...
@@ -38,14 +38,14 @@ public class CourseDictController {
}
}
@PostMapping
(
"deleteCourse"
)
@PostMapping
(
"deleteCourse"
)
@ApiOperation
(
"删除课程 id"
)
@ApiOperation
(
"
**
删除课程 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteCourse
(
@RequestBody
CourseDictDO
courseDictDO
){
public
ResponseVO
deleteCourse
(
@RequestBody
CourseDictDO
courseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
deleteCourse
(
courseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
deleteCourse
(
courseDictDO
));
}
}
@PostMapping
(
"queryCourses"
)
@PostMapping
(
"queryCourses"
)
@ApiOperation
(
"平台运营者--查询课程 pageSize pageNum administerId companyId courseName categoryId courseType courseSource"
)
@ApiOperation
(
"
**
平台运营者--查询课程 pageSize pageNum administerId companyId courseName categoryId courseType courseSource"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public
ResponseVO
queryCourses
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
public
ResponseVO
queryCourses
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCourses
(
queryCoursesDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCourses
(
queryCoursesDTO
));
...
...
src/main/java/com/subsidy/controller/DepartmentDictController.java
View file @
7697e95
...
@@ -33,7 +33,7 @@ public class DepartmentDictController {
...
@@ -33,7 +33,7 @@ public class DepartmentDictController {
private
DepartmentDictService
departmentDictService
;
private
DepartmentDictService
departmentDictService
;
@PostMapping
(
"getDepartments"
)
@PostMapping
(
"getDepartments"
)
@ApiOperation
(
"获取所有部门 companyId 企业id"
)
@ApiOperation
(
"
**
获取所有部门 companyId 企业id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getDepartments
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
public
ResponseVO
getDepartments
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getDepartments
(
departmentDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getDepartments
(
departmentDictDO
));
...
@@ -47,7 +47,7 @@ public class DepartmentDictController {
...
@@ -47,7 +47,7 @@ public class DepartmentDictController {
}
}
@PostMapping
(
"deleteDepartment"
)
@PostMapping
(
"deleteDepartment"
)
@ApiOperation
(
"删除部门 id"
)
@ApiOperation
(
"
**
删除部门 id"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
public
ResponseVO
deleteDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
deleteDepartment
(
departmentDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
deleteDepartment
(
departmentDictDO
));
...
...
src/main/java/com/subsidy/controller/ExerciseDictController.java
View file @
7697e95
...
@@ -5,7 +5,9 @@ import com.subsidy.common.ResponseData;
...
@@ -5,7 +5,9 @@ import com.subsidy.common.ResponseData;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.exercise.GetAllExercisesDTO
;
import
com.subsidy.dto.exercise.GetAllExercisesDTO
;
import
com.subsidy.dto.exercise.GetPaperExerciseDTO
;
import
com.subsidy.dto.exercise.SubmitDTO
;
import
com.subsidy.dto.exercise.SubmitDTO
;
import
com.subsidy.mapper.ExerciseDictMapper
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.ExerciseDictDO
;
import
com.subsidy.model.ExerciseDictDO
;
import
com.subsidy.service.ExerciseDictService
;
import
com.subsidy.service.ExerciseDictService
;
...
@@ -33,14 +35,14 @@ public class ExerciseDictController {
...
@@ -33,14 +35,14 @@ public class ExerciseDictController {
private
ExerciseDictService
exerciseDictService
;
private
ExerciseDictService
exerciseDictService
;
@PostMapping
(
"getAllExercises"
)
@PostMapping
(
"getAllExercises"
)
@ApiOperation
(
"查询所有题目 {courseId 课程id exerciseType 题目类型 difficulty 难度 title 题目 pageSize pageNum}"
)
@ApiOperation
(
"
【弃用】
查询所有题目 {courseId 课程id exerciseType 题目类型 difficulty 难度 title 题目 pageSize pageNum}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getAllExercises
(
@RequestBody
GetAllExercisesDTO
getAllExercisesDTO
){
public
ResponseVO
getAllExercises
(
@RequestBody
GetAllExercisesDTO
getAllExercisesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
getAllExercises
(
getAllExercisesDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
getAllExercises
(
getAllExercisesDTO
));
}
}
@PostMapping
(
"addExercise"
)
@PostMapping
(
"addExercise"
)
@ApiOperation
(
"添加题目 {courseId 课程id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案 }"
)
@ApiOperation
(
"添加题目 {
paperId 试卷id
courseId 课程id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案 }"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
public
ResponseVO
addExercise
(
@RequestBody
ExerciseDictDO
exerciseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
addExercise
(
exerciseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
addExercise
(
exerciseDictDO
));
...
@@ -61,16 +63,21 @@ public class ExerciseDictController {
...
@@ -61,16 +63,21 @@ public class ExerciseDictController {
}
}
@PostMapping
(
"getCourseExercises"
)
@PostMapping
(
"getCourseExercises"
)
@ApiOperation
(
"获取课程的习题 id 课程id"
)
@ApiOperation
(
"
【废弃】
获取课程的习题 id 课程id"
)
public
ResponseVO
getCourseExercises
(
@RequestBody
CourseDictDO
courseDictDO
){
public
ResponseVO
getCourseExercises
(
@RequestBody
CourseDictDO
courseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
getCourseExercises
(
courseDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
getCourseExercises
(
courseDictDO
));
}
}
@PostMapping
(
"submit"
)
@PostMapping
(
"submit"
)
@ApiOperation
(
"提交答案 {memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ]} "
)
@ApiOperation
(
"
**
提交答案 {memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ]} "
)
public
ResponseVO
submit
(
@RequestBody
SubmitDTO
submitDTO
){
public
ResponseVO
submit
(
@RequestBody
SubmitDTO
submitDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
submit
(
submitDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
submit
(
submitDTO
));
}
}
@PostMapping
(
"getPaperExercise"
)
@ApiOperation
(
"获取某个卷子的所有题目 paperId 卷子id exerciseType 类型 difficulty难度 title题目名称"
)
public
ResponseVO
getPaperExercise
(
@RequestBody
GetPaperExerciseDTO
getPaperExerciseDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
exerciseDictService
.
getPaperExercise
(
getPaperExerciseDTO
));
}
}
}
src/main/java/com/subsidy/controller/ExerciseDoneHistoryController.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 做题历史记录表 前端控制器
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@RestController
@Api
(
tags
=
"做题历史记录表"
)
@RequestMapping
(
"/exercise-done-history-do"
)
public
class
ExerciseDoneHistoryController
{
}
src/main/java/com/subsidy/controller/FileDictController.java
View file @
7697e95
...
@@ -34,28 +34,28 @@ public class FileDictController {
...
@@ -34,28 +34,28 @@ public class FileDictController {
private
FileDictService
fileDictService
;
private
FileDictService
fileDictService
;
@PostMapping
(
"getContendFiles"
)
@PostMapping
(
"getContendFiles"
)
@ApiOperation
(
"获取目录下的视频 {contentId fileName}"
)
@ApiOperation
(
"
**
获取目录下的视频 {contentId fileName}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getContendFiles
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
getContendFiles
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
getContendFiles
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
getContendFiles
(
fileDictDO
));
}
}
@PostMapping
(
"deleteFile"
)
@PostMapping
(
"deleteFile"
)
@ApiOperation
(
"删除视频 id "
)
@ApiOperation
(
"
**
删除视频 id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteFile
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
deleteFile
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
deleteFile
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
deleteFile
(
fileDictDO
));
}
}
@PostMapping
(
"addFile"
)
@PostMapping
(
"addFile"
)
@ApiOperation
(
"新增视频 contentId fileName fileSize fileType fileUrl"
)
@ApiOperation
(
"
**
新增视频 contentId fileName fileSize fileType fileUrl"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addFile
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
addFile
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
addFile
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
addFile
(
fileDictDO
));
}
}
@PostMapping
(
"updateFile"
)
@PostMapping
(
"updateFile"
)
@ApiOperation
(
"新增视频 id contentId fileName fileSize fileType fileUrl"
)
@ApiOperation
(
"
**
新增视频 id contentId fileName fileSize fileType fileUrl"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateFile
(
@RequestBody
FileDictDO
fileDictDO
){
public
ResponseVO
updateFile
(
@RequestBody
FileDictDO
fileDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
updateFile
(
fileDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
fileDictService
.
updateFile
(
fileDictDO
));
...
...
src/main/java/com/subsidy/controller/MemberController.java
View file @
7697e95
...
@@ -5,10 +5,7 @@ import com.subsidy.common.ResponseData;
...
@@ -5,10 +5,7 @@ import com.subsidy.common.ResponseData;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.administer.VerifyCodeDTO
;
import
com.subsidy.dto.administer.VerifyCodeDTO
;
import
com.subsidy.dto.member.AddMemberDTO
;
import
com.subsidy.dto.member.*
;
import
com.subsidy.dto.member.ContentMemberDTO
;
import
com.subsidy.dto.member.GetAllDTO
;
import
com.subsidy.dto.member.StudyHistoryDTO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.service.MemberService
;
import
com.subsidy.service.MemberService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.ConstantUtils
;
...
@@ -46,22 +43,22 @@ public class MemberController {
...
@@ -46,22 +43,22 @@ public class MemberController {
}
}
@PostMapping
(
"deleteMember"
)
@PostMapping
(
"deleteMember"
)
@ApiOperation
(
"删除成员 id "
)
@ApiOperation
(
"
**
删除成员 id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteMember
(
@RequestBody
MemberDO
memberDO
){
public
ResponseVO
deleteMember
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
deleteMember
(
memberDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
deleteMember
(
memberDO
));
}
}
@PostMapping
(
"addMember"
)
@PostMapping
(
"addMember"
)
@ApiOperation
(
"
新增成员
departmentId userName accountName telephone gender image idCard"
)
@ApiOperation
(
"
** 新增成员 companyId
departmentId userName accountName telephone gender image idCard"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
public
ResponseVO
addMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
addMember
(
addMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
addMember
(
addMemberDTO
));
}
}
@PostMapping
(
"updateMember"
)
@PostMapping
(
"updateMember"
)
@ApiOperation
(
"
编辑成员 {i
d departmentId userName accountName telephone gender image idCard status}"
)
@ApiOperation
(
"
** 编辑成员 {id companyI
d departmentId userName accountName telephone gender image idCard status}"
)
//
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
public
ResponseVO
updateMember
(
@RequestBody
AddMemberDTO
addMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updateMember
(
addMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updateMember
(
addMemberDTO
));
}
}
...
@@ -73,49 +70,49 @@ public class MemberController {
...
@@ -73,49 +70,49 @@ public class MemberController {
}
}
@PostMapping
(
"passwordLogin"
)
@PostMapping
(
"passwordLogin"
)
@ApiOperation
(
"手机端:密码登录 {accountName password}"
)
@ApiOperation
(
"手机端:密码登录 {
companyId
accountName password}"
)
public
ResponseVO
passwordLogin
(
@RequestBody
MemberDO
memberD
O
){
public
ResponseVO
passwordLogin
(
@RequestBody
PasswordLoginDTO
passwordLoginDT
O
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
passwordLogin
(
memberD
O
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
passwordLogin
(
passwordLoginDT
O
));
}
}
@PostMapping
(
"updatePassword"
)
@PostMapping
(
"updatePassword"
)
@ApiOperation
(
"修改密码 {id password}"
)
@ApiOperation
(
"
**
修改密码 {id password}"
)
public
ResponseVO
updatePassword
(
@RequestBody
MemberDO
memberDO
){
public
ResponseVO
updatePassword
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updatePassword
(
memberDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
updatePassword
(
memberDO
));
}
}
@PostMapping
(
"studyPage"
)
@PostMapping
(
"studyPage"
)
@ApiOperation
(
"手机端:学习主页 id 学员id"
)
@ApiOperation
(
"
**
手机端:学习主页 id 学员id"
)
public
ResponseVO
studyPage
(
@RequestBody
MemberDO
memberDO
){
public
ResponseVO
studyPage
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
studyPage
(
memberDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
studyPage
(
memberDO
));
}
}
@PostMapping
(
"contentVod"
)
@PostMapping
(
"contentVod"
)
@ApiOperation
(
"手机端:目录+视频 courseId 课程 memberId 学员id"
)
@ApiOperation
(
"
**
手机端:目录+视频 courseId 课程 memberId 学员id"
)
public
ResponseVO
contentVod
(
@RequestBody
ContentMemberDTO
contentVodDTO
){
public
ResponseVO
contentVod
(
@RequestBody
ContentMemberDTO
contentVodDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentVod
(
contentVodDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentVod
(
contentVodDTO
));
}
}
@PostMapping
(
"contentFiles"
)
@PostMapping
(
"contentFiles"
)
@ApiOperation
(
"手机端:目录+课件 courseId 课程 memberId 学员id"
)
@ApiOperation
(
"
**
手机端:目录+课件 courseId 课程 memberId 学员id"
)
public
ResponseVO
contentFiles
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
public
ResponseVO
contentFiles
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentFiles
(
contentMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentFiles
(
contentMemberDTO
));
}
}
@PostMapping
(
"studyHistory"
)
@PostMapping
(
"studyHistory"
)
@ApiOperation
(
"学习记录 id 成员id pageSize pageNum"
)
@ApiOperation
(
"
**
学习记录 id 成员id pageSize pageNum"
)
public
ResponseVO
studyHistory
(
@RequestBody
StudyHistoryDTO
studyHistoryDTO
){
public
ResponseVO
studyHistory
(
@RequestBody
StudyHistoryDTO
studyHistoryDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
studyHistory
(
studyHistoryDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
studyHistory
(
studyHistoryDTO
));
}
}
@PostMapping
(
"getCourseTest"
)
@PostMapping
(
"getCourseTest"
)
@ApiOperation
(
"获取课程下的测试情况 {memberId 成员id courseId 课程id classId}"
)
@ApiOperation
(
"
**
获取课程下的测试情况 {memberId 成员id courseId 课程id classId}"
)
public
ResponseVO
getCourseTest
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
public
ResponseVO
getCourseTest
(
@RequestBody
ContentMemberDTO
contentMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getCourseTest
(
contentMemberDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getCourseTest
(
contentMemberDTO
));
}
}
@PostMapping
(
"getStudyInfo"
)
@PostMapping
(
"getStudyInfo"
)
@ApiOperation
(
"获取学生完成课程情况 id 学员id"
)
@ApiOperation
(
"
**
获取学生完成课程情况 id 学员id"
)
public
ResponseVO
getStudyInfo
(
@RequestBody
MemberDO
memberDO
){
public
ResponseVO
getStudyInfo
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getStudyInfo
(
memberDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
getStudyInfo
(
memberDO
));
}
}
...
...
src/main/java/com/subsidy/controller/PaperDictController.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.model.PaperDictDO
;
import
com.subsidy.service.PaperDictService
;
import
com.subsidy.util.ConstantUtils
;
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
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 试卷字典表 前端控制器
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@RestController
@Api
(
tags
=
"试卷字典表"
)
@RequestMapping
(
"/paper"
)
public
class
PaperDictController
{
@Autowired
private
PaperDictService
paperDictService
;
@PostMapping
(
"queryPapers"
)
@ApiOperation
(
"查看课程下的测试 {courseId paperName}"
)
public
ResponseVO
queryPapers
(
@RequestBody
PaperDictDO
paperDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
queryPapers
(
paperDictDO
));
}
@PostMapping
(
"deletePaper"
)
@ApiOperation
(
"删除卷子 {id}"
)
public
ResponseVO
deletePaper
(
@RequestBody
PaperDictDO
paperDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
deletePaper
(
paperDictDO
));
}
@PostMapping
(
"update"
)
@ApiOperation
(
"启用/禁用 {id paperStatus}"
)
public
ResponseVO
updateStatus
(
@RequestBody
PaperDictDO
paperDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
updateStatus
(
paperDictDO
));
}
@PostMapping
(
"addPaper"
)
@ApiOperation
(
"添加卷子 {courseId paperName}"
)
public
ResponseVO
addPaper
(
@RequestBody
PaperDictDO
paperDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
paperDictService
.
addPaper
(
paperDictDO
));
}
}
src/main/java/com/subsidy/controller/SignInRecordController.java
View file @
7697e95
...
@@ -37,26 +37,26 @@ public class SignInRecordController {
...
@@ -37,26 +37,26 @@ public class SignInRecordController {
private
SignInRecordService
signInRecordService
;
private
SignInRecordService
signInRecordService
;
@PostMapping
(
"getMemberSignInfo"
)
@PostMapping
(
"getMemberSignInfo"
)
@ApiOperation
(
"获取某个成员的签到记录 id 成员id pageSize pageNum"
)
@ApiOperation
(
"
**
获取某个成员的签到记录 id 成员id pageSize pageNum"
)
public
ResponseVO
getMemberSignInfo
(
@RequestBody
GetMemberSignInfoDTO
getMemberSignInfoDTO
){
public
ResponseVO
getMemberSignInfo
(
@RequestBody
GetMemberSignInfoDTO
getMemberSignInfoDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
getMemberSignInfo
(
getMemberSignInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
getMemberSignInfo
(
getMemberSignInfoDTO
));
}
}
@PostMapping
(
"signIn"
)
@PostMapping
(
"signIn"
)
@ApiOperation
(
"签到 memberId"
)
@ApiOperation
(
"
**
签到 memberId"
)
public
ResponseVO
signIn
(
@RequestBody
SignInRecordDO
signInRecordDO
){
public
ResponseVO
signIn
(
@RequestBody
SignInRecordDO
signInRecordDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signIn
(
signInRecordDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signIn
(
signInRecordDO
));
}
}
@PostMapping
(
"classStudyHistory"
)
@PostMapping
(
"classStudyHistory"
)
@ApiOperation
(
"校区学习记录 id 校区id className courseName pageSize pageNum"
)
@ApiOperation
(
"
**
校区学习记录 id 校区id className courseName pageSize pageNum"
)
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
//@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public
ResponseVO
classSignInfo
(
@RequestBody
ClassSignInfoDTO
classSignInfoDTO
){
public
ResponseVO
classSignInfo
(
@RequestBody
ClassSignInfoDTO
classSignInfoDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
classSignInfo
(
classSignInfoDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
classSignInfo
(
classSignInfoDTO
));
}
}
@PostMapping
(
"signInStatus"
)
@PostMapping
(
"signInStatus"
)
@ApiOperation
(
"判断学生当天有没有打卡 {memberId 学生id}"
)
@ApiOperation
(
"
**
判断学生当天有没有打卡 {memberId 学生id}"
)
public
ResponseVO
signInStatus
(
@RequestBody
SignInRecordDO
signInRecordDO
){
public
ResponseVO
signInStatus
(
@RequestBody
SignInRecordDO
signInRecordDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signInStatus
(
signInRecordDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
signInRecordService
.
signInStatus
(
signInRecordDO
));
}
}
...
...
src/main/java/com/subsidy/controller/SmsVerifyCodeController.java
View file @
7697e95
...
@@ -31,7 +31,7 @@ public class SmsVerifyCodeController {
...
@@ -31,7 +31,7 @@ public class SmsVerifyCodeController {
private
SmsVerifyCodeService
smsVerifyCodeService
;
private
SmsVerifyCodeService
smsVerifyCodeService
;
@PostMapping
(
value
=
"/send"
)
@PostMapping
(
value
=
"/send"
)
@ApiOperation
(
"发送短信验证码 {telephone} "
)
@ApiOperation
(
"
**
发送短信验证码 {telephone} "
)
public
ResponseVO
sendVerifyCode
(
@RequestBody
SendVerifyCodeDTO
sendVerifyCodeDTO
)
{
public
ResponseVO
sendVerifyCode
(
@RequestBody
SendVerifyCodeDTO
sendVerifyCodeDTO
)
{
smsVerifyCodeService
.
sendVerifyCode
(
sendVerifyCodeDTO
);
smsVerifyCodeService
.
sendVerifyCode
(
sendVerifyCodeDTO
);
return
ResponseData
.
generateCreatedResponse
(
0
);
return
ResponseData
.
generateCreatedResponse
(
0
);
...
...
src/main/java/com/subsidy/controller/VodDictController.java
View file @
7697e95
...
@@ -34,34 +34,34 @@ public class VodDictController {
...
@@ -34,34 +34,34 @@ public class VodDictController {
private
VodDictService
vodDictService
;
private
VodDictService
vodDictService
;
@PostMapping
(
"/signature"
)
@PostMapping
(
"/signature"
)
@ApiOperation
(
"获取签名"
)
@ApiOperation
(
"
**
获取签名"
)
public
ResponseVO
signature
()
throws
Exception
{
public
ResponseVO
signature
()
throws
Exception
{
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
signature
());
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
signature
());
}
}
@PostMapping
(
"getContendVods"
)
@PostMapping
(
"getContendVods"
)
@ApiOperation
(
"获取目录下的视频 {contentId vodName}"
)
@ApiOperation
(
"
**
获取目录下的视频 {contentId vodName}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getContendVods
(
@RequestBody
GetContendVodsDTO
getContendVodsDTO
){
public
ResponseVO
getContendVods
(
@RequestBody
GetContendVodsDTO
getContendVodsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
getContendVods
(
getContendVodsDTO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
getContendVods
(
getContendVodsDTO
));
}
}
@PostMapping
(
"deleteVod"
)
@PostMapping
(
"deleteVod"
)
@ApiOperation
(
"删除视频 id "
)
@ApiOperation
(
"
**
删除视频 id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
deleteVod
(
@RequestBody
VodDictDO
vodDictDO
){
public
ResponseVO
deleteVod
(
@RequestBody
VodDictDO
vodDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
deleteVod
(
vodDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
deleteVod
(
vodDictDO
));
}
}
@PostMapping
(
"addVod"
)
@PostMapping
(
"addVod"
)
@ApiOperation
(
"新增视频 contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
@ApiOperation
(
"
**
新增视频 contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addVod
(
@RequestBody
VodDictDO
vodDictDO
){
public
ResponseVO
addVod
(
@RequestBody
VodDictDO
vodDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
addVod
(
vodDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
addVod
(
vodDictDO
));
}
}
@PostMapping
(
"updateVod"
)
@PostMapping
(
"updateVod"
)
@ApiOperation
(
"新增视频 id contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
@ApiOperation
(
"
**
新增视频 id contentId vodName vodLength vodType vodSize vodUrl vodCode"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateVod
(
@RequestBody
VodDictDO
vodDictDO
){
public
ResponseVO
updateVod
(
@RequestBody
VodDictDO
vodDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
updateVod
(
vodDictDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodDictService
.
updateVod
(
vodDictDO
));
...
...
src/main/java/com/subsidy/controller/VodPlayHistoryController.java
View file @
7697e95
...
@@ -32,13 +32,13 @@ public class VodPlayHistoryController {
...
@@ -32,13 +32,13 @@ public class VodPlayHistoryController {
private
VodPlayHistoryService
vodPlayHistoryService
;
private
VodPlayHistoryService
vodPlayHistoryService
;
@PostMapping
(
"insertHistory"
)
@PostMapping
(
"insertHistory"
)
@ApiOperation
(
"记录学生看视频位置 ajax请求 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
@ApiOperation
(
"
**
记录学生看视频位置 ajax请求 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
public
ResponseVO
insertHistory
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
public
ResponseVO
insertHistory
(
@RequestBody
VodPlayHistoryDO
vodPlayHistoryDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistory
(
vodPlayHistoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistory
(
vodPlayHistoryDO
));
}
}
@RequestMapping
(
"insertHistoryNew"
)
@RequestMapping
(
"insertHistoryNew"
)
@ApiOperation
(
"记录学生看视频位置 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
@ApiOperation
(
"
**
记录学生看视频位置 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点"
)
public
ResponseVO
insertHistoryNew
(
@RequestBody
String
param
){
public
ResponseVO
insertHistoryNew
(
@RequestBody
String
param
){
VodPlayHistoryDO
vodPlayHistoryDO
=
JSON
.
parseObject
(
param
,
VodPlayHistoryDO
.
class
);
VodPlayHistoryDO
vodPlayHistoryDO
=
JSON
.
parseObject
(
param
,
VodPlayHistoryDO
.
class
);
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistoryNew
(
vodPlayHistoryDO
));
return
ResponseData
.
generateCreatedResponse
(
0
,
vodPlayHistoryService
.
insertHistoryNew
(
vodPlayHistoryDO
));
...
...
src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java
View file @
7697e95
...
@@ -15,4 +15,6 @@ public class ClassDetailDTO {
...
@@ -15,4 +15,6 @@ public class ClassDetailDTO {
Boolean
flag
;
Boolean
flag
;
private
Long
paperId
;
}
}
src/main/java/com/subsidy/dto/exercise/GetPaperExerciseDTO.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
dto
.
exercise
;
import
lombok.Data
;
@Data
public
class
GetPaperExerciseDTO
{
private
Integer
pageSize
;
private
Integer
pageNum
;
private
Integer
difficulty
;
private
String
exerciseType
;
private
Long
paperId
;
private
String
title
;
}
src/main/java/com/subsidy/dto/member/GetAllDTO.java
View file @
7697e95
package
com
.
subsidy
.
dto
.
member
;
package
com
.
subsidy
.
dto
.
member
;
import
com.subsidy.model.MemberDO
;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
public
class
GetAllDTO
extends
MemberDO
{
public
class
GetAllDTO
{
private
String
userName
;
private
String
status
;
private
Long
departmentId
;
private
Integer
pageNum
;
private
Integer
pageNum
;
...
...
src/main/java/com/subsidy/dto/member/PasswordLoginDTO.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
dto
.
member
;
import
lombok.Data
;
@Data
public
class
PasswordLoginDTO
{
private
Long
companyId
;
private
String
accountName
;
private
String
password
;
}
src/main/java/com/subsidy/mapper/CompanyDictMapper.java
View file @
7697e95
...
@@ -5,8 +5,11 @@ import com.subsidy.model.AdministerDO;
...
@@ -5,8 +5,11 @@ import com.subsidy.model.AdministerDO;
import
com.subsidy.model.CompanyDictDO
;
import
com.subsidy.model.CompanyDictDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.vo.administer.OperatorsVO
;
import
com.subsidy.vo.administer.OperatorsVO
;
import
com.subsidy.vo.company.GetAllCompanyVO
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 企业字典表 Mapper 接口
* 企业字典表 Mapper 接口
...
@@ -26,8 +29,8 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
...
@@ -26,8 +29,8 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
IPage
<
OperatorsVO
>
operators
(
IPage
page
,
String
companyName
,
Integer
id
,
String
userName
,
Integer
role
);
IPage
<
OperatorsVO
>
operators
(
IPage
page
,
String
companyName
,
Integer
id
,
String
userName
,
Integer
role
);
/**
/**
*
通过企业id查找企业的管理员
*
查找所有的公司名称
*/
*/
AdministerDO
getAdministerByCompanyId
(
Long
companyId
);
List
<
GetAllCompanyVO
>
getAllCompany
(
CompanyDictDO
companyDictDO
);
}
}
src/main/java/com/subsidy/mapper/ExerciseDictMapper.java
View file @
7697e95
package
com
.
subsidy
.
mapper
;
package
com
.
subsidy
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.model.ExerciseDictDO
;
import
com.subsidy.model.ExerciseDictDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.vo.exercise.GetPaperExerciseVO
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
/**
/**
...
@@ -15,4 +17,11 @@ import org.springframework.stereotype.Repository;
...
@@ -15,4 +17,11 @@ import org.springframework.stereotype.Repository;
@Repository
@Repository
public
interface
ExerciseDictMapper
extends
BaseMapper
<
ExerciseDictDO
>
{
public
interface
ExerciseDictMapper
extends
BaseMapper
<
ExerciseDictDO
>
{
/**
* 获取某一套卷子的题目
*/
IPage
<
GetPaperExerciseVO
>
getPaperExercise
(
IPage
page
,
Long
paperId
,
Integer
difficulty
,
String
exerciseType
,
String
title
);
}
}
src/main/java/com/subsidy/mapper/ExerciseDoneHistoryMapper.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.ExerciseDoneHistoryDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 做题历史记录表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@Repository
public
interface
ExerciseDoneHistoryMapper
extends
BaseMapper
<
ExerciseDoneHistoryDO
>
{
}
src/main/java/com/subsidy/mapper/MemberMapper.java
View file @
7697e95
package
com
.
subsidy
.
mapper
;
package
com
.
subsidy
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.member.PasswordLoginDTO
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.MemberDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.vo.administer.UserRoleVO
;
import
com.subsidy.vo.member.GetAllVO
;
import
com.subsidy.vo.member.GetAllVO
;
import
com.subsidy.vo.member.StudyPageVO
;
import
com.subsidy.vo.member.StudyPageVO
;
import
io.swagger.models.auth.In
;
import
io.swagger.models.auth.In
;
...
@@ -23,6 +25,12 @@ import java.util.List;
...
@@ -23,6 +25,12 @@ import java.util.List;
public
interface
MemberMapper
extends
BaseMapper
<
MemberDO
>
{
public
interface
MemberMapper
extends
BaseMapper
<
MemberDO
>
{
/**
/**
* 账号密码登录
*/
UserRoleVO
passwordLogin
(
PasswordLoginDTO
passwordLoginDTO
);
/**
* 查看学生的课程
* 查看学生的课程
*/
*/
List
<
StudyPageVO
>
studyPage
(
MemberDO
memberDO
);
List
<
StudyPageVO
>
studyPage
(
MemberDO
memberDO
);
...
...
src/main/java/com/subsidy/mapper/PaperDictMapper.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.PaperDictDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.vo.paper.QueryPapersVO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 试卷字典表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@Repository
public
interface
PaperDictMapper
extends
BaseMapper
<
PaperDictDO
>
{
List
<
QueryPapersVO
>
queryPapers
(
PaperDictDO
paperDictDO
);
}
src/main/java/com/subsidy/model/ExerciseDictDO.java
View file @
7697e95
...
@@ -25,6 +25,11 @@ public class ExerciseDictDO extends BaseModel {
...
@@ -25,6 +25,11 @@ public class ExerciseDictDO extends BaseModel {
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
///**
// * 试卷id
// */
//private Long paperId;
/**
/**
* 题目类型:单选/多选/是非
* 题目类型:单选/多选/是非
*/
*/
...
...
src/main/java/com/subsidy/model/ExerciseDoneHistoryDO.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
model
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 做题历史记录表
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"exercise_done_history"
)
public
class
ExerciseDoneHistoryDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 卷子id
*/
private
Long
paperId
;
/**
* 学生id
*/
private
Long
memberId
;
/**
* 学习任务id
*/
private
Long
classId
;
/**
* 习题id
*/
private
Long
exerciseId
;
/**
* 做题答案 /已读
*/
private
String
answer
;
/**
* 结果 0:错误 1:正确
*/
private
Integer
result
;
/**
* 看视频/做题时长
*/
private
Integer
length
;
}
src/main/java/com/subsidy/model/ExerciseDoneResultDO.java
View file @
7697e95
...
@@ -25,6 +25,11 @@ public class ExerciseDoneResultDO extends BaseModel {
...
@@ -25,6 +25,11 @@ public class ExerciseDoneResultDO extends BaseModel {
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
id
;
///**
// * 卷子id
// */
//private Long paperId;
/**
/**
* 成员id
* 成员id
*/
*/
...
...
src/main/java/com/subsidy/model/MemberDO.java
View file @
7697e95
...
@@ -26,9 +26,9 @@ public class MemberDO extends BaseModel {
...
@@ -26,9 +26,9 @@ public class MemberDO extends BaseModel {
private
Long
id
;
private
Long
id
;
/**
/**
*
部门
id
*
公司
id
*/
*/
private
Long
department
Id
;
private
Long
company
Id
;
/**
/**
* 账号
* 账号
...
@@ -66,6 +66,11 @@ public class MemberDO extends BaseModel {
...
@@ -66,6 +66,11 @@ public class MemberDO extends BaseModel {
private
String
idCard
;
private
String
idCard
;
/**
/**
* 第一次登录
*/
private
Integer
firstLogin
;
/**
* 状态
* 状态
*/
*/
private
String
status
;
private
String
status
;
...
...
src/main/java/com/subsidy/model/PaperDictDO.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
model
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 试卷字典表
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"paper_dict"
)
public
class
PaperDictDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 课程id
*/
private
String
courseId
;
/**
* 卷子名称
*/
private
String
paperName
;
/**
* 启用状态 0 :未启用 1:启用
*/
private
Integer
paperStatus
;
}
src/main/java/com/subsidy/service/CompanyDictService.java
View file @
7697e95
...
@@ -7,6 +7,10 @@ import com.subsidy.model.AdministerDO;
...
@@ -7,6 +7,10 @@ import com.subsidy.model.AdministerDO;
import
com.subsidy.model.CompanyDictDO
;
import
com.subsidy.model.CompanyDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.subsidy.vo.administer.OperatorsVO
;
import
com.subsidy.vo.administer.OperatorsVO
;
import
com.subsidy.vo.company.GetAllCompanyVO
;
import
com.subsidy.vo.member.GetAllVO
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -26,4 +30,6 @@ public interface CompanyDictService extends IService<CompanyDictDO> {
...
@@ -26,4 +30,6 @@ public interface CompanyDictService extends IService<CompanyDictDO> {
String
updateAdminister
(
AddCompanyDTO
addCompanyDTO
);
String
updateAdminister
(
AddCompanyDTO
addCompanyDTO
);
List
<
GetAllCompanyVO
>
getAllCompany
(
CompanyDictDO
companyDictDO
);
}
}
src/main/java/com/subsidy/service/ExerciseDictService.java
View file @
7697e95
...
@@ -2,6 +2,7 @@ package com.subsidy.service;
...
@@ -2,6 +2,7 @@ package com.subsidy.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.exercise.GetAllExercisesDTO
;
import
com.subsidy.dto.exercise.GetAllExercisesDTO
;
import
com.subsidy.dto.exercise.GetPaperExerciseDTO
;
import
com.subsidy.dto.exercise.SubmitDTO
;
import
com.subsidy.dto.exercise.SubmitDTO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.ExerciseDictDO
;
import
com.subsidy.model.ExerciseDictDO
;
...
@@ -32,4 +33,5 @@ public interface ExerciseDictService extends IService<ExerciseDictDO> {
...
@@ -32,4 +33,5 @@ public interface ExerciseDictService extends IService<ExerciseDictDO> {
String
submit
(
SubmitDTO
submitDTO
);
String
submit
(
SubmitDTO
submitDTO
);
IPage
getPaperExercise
(
GetPaperExerciseDTO
getPaperExerciseDTO
);
}
}
src/main/java/com/subsidy/service/ExerciseDoneHistoryService.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
service
;
import
com.subsidy.model.ExerciseDoneHistoryDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 做题历史记录表 服务类
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
public
interface
ExerciseDoneHistoryService
extends
IService
<
ExerciseDoneHistoryDO
>
{
}
src/main/java/com/subsidy/service/MemberService.java
View file @
7697e95
...
@@ -2,10 +2,7 @@ package com.subsidy.service;
...
@@ -2,10 +2,7 @@ package com.subsidy.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.administer.VerifyCodeDTO
;
import
com.subsidy.dto.administer.VerifyCodeDTO
;
import
com.subsidy.dto.member.AddMemberDTO
;
import
com.subsidy.dto.member.*
;
import
com.subsidy.dto.member.ContentMemberDTO
;
import
com.subsidy.dto.member.GetAllDTO
;
import
com.subsidy.dto.member.StudyHistoryDTO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.MemberDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.subsidy.vo.administer.UserRoleVO
;
import
com.subsidy.vo.administer.UserRoleVO
;
...
@@ -33,7 +30,7 @@ public interface MemberService extends IService<MemberDO> {
...
@@ -33,7 +30,7 @@ public interface MemberService extends IService<MemberDO> {
UserRoleVO
login
(
VerifyCodeDTO
verifyCodeDTO
);
UserRoleVO
login
(
VerifyCodeDTO
verifyCodeDTO
);
UserRoleVO
passwordLogin
(
MemberDO
memberD
O
);
UserRoleVO
passwordLogin
(
PasswordLoginDTO
passwordLoginDT
O
);
String
updatePassword
(
MemberDO
memberDO
);
String
updatePassword
(
MemberDO
memberDO
);
...
...
src/main/java/com/subsidy/service/PaperDictService.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
service
;
import
com.subsidy.model.PaperDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.subsidy.vo.paper.QueryPapersVO
;
import
java.util.List
;
/**
* <p>
* 试卷字典表 服务类
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
public
interface
PaperDictService
extends
IService
<
PaperDictDO
>
{
List
<
QueryPapersVO
>
queryPapers
(
PaperDictDO
paperDictDO
);
String
deletePaper
(
PaperDictDO
paperDictDO
);
String
updateStatus
(
PaperDictDO
paperDictDO
);
String
addPaper
(
PaperDictDO
paperDictDO
);
}
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
7697e95
...
@@ -269,7 +269,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -269,7 +269,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
int
passNum
=
0
;
int
passNum
=
0
;
for
(
ExerciseDoneResultDO
exerciseDoneResultDO
:
exerciseDoneResultDOS
)
{
for
(
ExerciseDoneResultDO
exerciseDoneResultDO
:
exerciseDoneResultDOS
)
{
if
(
exerciseDoneResultDO
.
getRightCounts
()
>
exerciseDoneResultDO
.
getTotalCounts
()
*
0.6
)
{
if
(
exerciseDoneResultDO
.
getRightCounts
()
>
=
exerciseDoneResultDO
.
getTotalCounts
()
*
0.6
)
{
passNum
++;
passNum
++;
}
}
}
}
...
@@ -798,9 +798,10 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -798,9 +798,10 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
String
accountName
=
PinyinHelper
.
toHanYuPinyinString
(
s
.
getUserName
(),
format
,
""
,
true
);
String
accountName
=
PinyinHelper
.
toHanYuPinyinString
(
s
.
getUserName
(),
format
,
""
,
true
);
List
<
MemberDO
>
memberDOS
=
memberMapper
.
selectList
(
new
QueryWrapper
<
MemberDO
>()
List
<
MemberDO
>
memberDOS
=
memberMapper
.
selectList
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
accountName
));
.
eq
(
MemberDO:
:
getAccountName
,
accountName
)
.
eq
(
MemberDO:
:
getCompanyId
,
companyId
));
if
(
memberDOS
.
size
()
>
0
)
{
if
(
memberDOS
.
size
()
>
0
)
{
String
usernames
=
userName
(
accountName
,
0
);
String
usernames
=
userName
(
accountName
,
0
,
companyId
);
memberDO1
.
setAccountName
(
usernames
);
memberDO1
.
setAccountName
(
usernames
);
}
else
{
}
else
{
memberDO1
.
setAccountName
(
accountName
);
memberDO1
.
setAccountName
(
accountName
);
...
@@ -808,6 +809,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -808,6 +809,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
}
catch
(
BadHanyuPinyinOutputFormatCombination
ex
)
{
}
catch
(
BadHanyuPinyinOutputFormatCombination
ex
)
{
}
}
memberDO1
.
setCompanyId
(
companyId
);
memberDO1
.
setFirstLogin
(
0
);
memberDO1
.
setTelephone
(
s
.
getTelephone
());
memberDO1
.
setTelephone
(
s
.
getTelephone
());
memberDO1
.
setIdCard
(
s
.
getIdCard
());
memberDO1
.
setIdCard
(
s
.
getIdCard
());
memberDO1
.
setStatus
(
"启用"
);
memberDO1
.
setStatus
(
"启用"
);
...
@@ -832,13 +835,14 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -832,13 +835,14 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
return
ConstantUtils
.
ADD_SUCCESS
;
return
ConstantUtils
.
ADD_SUCCESS
;
}
}
public
String
userName
(
String
originName
,
int
i
)
{
public
String
userName
(
String
originName
,
int
i
,
Long
companyId
)
{
i
++;
i
++;
List
<
MemberDO
>
memberDOS
=
memberMapper
.
selectList
(
new
QueryWrapper
<
MemberDO
>()
List
<
MemberDO
>
memberDOS
=
memberMapper
.
selectList
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
originName
+
i
));
.
eq
(
MemberDO:
:
getAccountName
,
originName
+
i
)
.
eq
(
MemberDO:
:
getCompanyId
,
companyId
));
if
(
memberDOS
.
size
()
>
0
)
{
if
(
memberDOS
.
size
()
>
0
)
{
return
userName
(
originName
,
i
);
return
userName
(
originName
,
i
,
companyId
);
}
else
{
}
else
{
return
originName
+
i
;
return
originName
+
i
;
}
}
...
...
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
View file @
7697e95
...
@@ -19,10 +19,13 @@ import com.subsidy.service.CompanyDictService;
...
@@ -19,10 +19,13 @@ import com.subsidy.service.CompanyDictService;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.vo.administer.OperatorsVO
;
import
com.subsidy.vo.administer.OperatorsVO
;
import
com.subsidy.vo.company.GetAllCompanyVO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 企业字典表 服务实现类
* 企业字典表 服务实现类
...
@@ -131,4 +134,8 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
...
@@ -131,4 +134,8 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
return
ConstantUtils
.
SET_SUCCESS
;
return
ConstantUtils
.
SET_SUCCESS
;
}
}
public
List
<
GetAllCompanyVO
>
getAllCompany
(
CompanyDictDO
companyDictDO
){
return
this
.
baseMapper
.
getAllCompany
(
companyDictDO
);
}
}
}
src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java
View file @
7697e95
...
@@ -106,37 +106,7 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
...
@@ -106,37 +106,7 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
public
IPage
queryCompanyCourse
(
QueryCoursesDTO
queryCoursesDTO
)
{
public
IPage
queryCompanyCourse
(
QueryCoursesDTO
queryCoursesDTO
)
{
Page
pager
=
new
Page
(
queryCoursesDTO
.
getPageNum
(),
queryCoursesDTO
.
getPageSize
());
Page
pager
=
new
Page
(
queryCoursesDTO
.
getPageNum
(),
queryCoursesDTO
.
getPageSize
());
////判断角色
//List<RoleAdministerMappingDO> roleAdministerMappingDOS = roleAdministerMappingMapper.selectList(new QueryWrapper<RoleAdministerMappingDO>()
//.lambda()
//.eq(RoleAdministerMappingDO::getAdministerId,roleAdministerMappingMapper));
//
//Boolean flag = false;
//for (RoleAdministerMappingDO roleAdministerMappingDO : roleAdministerMappingDOS){
//
// if (roleAdministerMappingDO.getRoleId() ==3){
// flag= false;
// }else if(roleAdministerMappingDO.getRoleId()==2) {
// flag = true;
// }
//}
//List<Long> longs = new ArrayList<>();
//if (flag){
// //运营者账号 该企业下的所有课程 管理员
// //获取该企业下所有老师的课程
// AdministerDO administerDO = administerMapper.selectById(queryCoursesDTO.getAdministerId());
//
// List<AdministerDO> administerDOS = administerMapper.selectList(new QueryWrapper<AdministerDO>()
// .lambda()
// .eq(AdministerDO::getCompanyId,administerDO.getCompanyId()));
// for (AdministerDO administerDO1 : administerDOS){
// longs.add(administerDO1.getId());
// }
return
this
.
baseMapper
.
queryCompanyCourse
(
pager
,
queryCoursesDTO
.
getCourseName
(),
queryCoursesDTO
.
getCategoryId
(),
queryCoursesDTO
.
getCourseType
(),
queryCoursesDTO
.
getCourseSource
(),
queryCoursesDTO
.
getCompanyId
());
return
this
.
baseMapper
.
queryCompanyCourse
(
pager
,
queryCoursesDTO
.
getCourseName
(),
queryCoursesDTO
.
getCategoryId
(),
queryCoursesDTO
.
getCourseType
(),
queryCoursesDTO
.
getCourseSource
(),
queryCoursesDTO
.
getCompanyId
());
//}
}
}
...
...
src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java
View file @
7697e95
...
@@ -3,15 +3,16 @@ package com.subsidy.service.impl;
...
@@ -3,15 +3,16 @@ package com.subsidy.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.dto.exercise.GetAllExercisesDTO
;
import
com.subsidy.dto.exercise.GetAllExercisesDTO
;
import
com.subsidy.dto.exercise.GetPaperExerciseDTO
;
import
com.subsidy.dto.exercise.SubmitDTO
;
import
com.subsidy.dto.exercise.SubmitDTO
;
import
com.subsidy.mapper.ExerciseDictMapper
;
import
com.subsidy.mapper.ExerciseDoneResultMapper
;
import
com.subsidy.mapper.ExerciseDoneResultMapper
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.ExerciseDictDO
;
import
com.subsidy.model.ExerciseDictDO
;
import
com.subsidy.mapper.ExerciseDictMapper
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.service.ExerciseDictService
;
import
com.subsidy.service.ExerciseDictService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.vo.course.ExerciseVO
;
import
com.subsidy.vo.course.ExerciseVO
;
import
com.subsidy.vo.exercise.MemberExerciseVO
;
import
com.subsidy.vo.exercise.MemberExerciseVO
;
...
@@ -58,51 +59,51 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
...
@@ -58,51 +59,51 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
int
orderNo
=
1
;
int
orderNo
=
1
;
if
(
exerciseDictDOS
.
size
()
>
0
)
{
if
(
exerciseDictDOS
.
size
()
>
0
)
{
orderNo
=
exerciseDictDOS
.
get
(
0
).
getOrderNo
()
+
1
;
orderNo
=
exerciseDictDOS
.
get
(
0
).
getOrderNo
()
+
1
;
}
}
exerciseDictDO
.
setOrderNo
(
orderNo
);
exerciseDictDO
.
setOrderNo
(
orderNo
);
this
.
baseMapper
.
insert
(
exerciseDictDO
);
this
.
baseMapper
.
insert
(
exerciseDictDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
return
ConstantUtils
.
ADD_SUCCESS
;
}
}
public
String
deleteExercise
(
ExerciseDictDO
exerciseDictDO
){
public
String
deleteExercise
(
ExerciseDictDO
exerciseDictDO
)
{
this
.
baseMapper
.
deleteById
(
exerciseDictDO
.
getId
());
this
.
baseMapper
.
deleteById
(
exerciseDictDO
.
getId
());
return
ConstantUtils
.
DELETE_SUCCESS
;
return
ConstantUtils
.
DELETE_SUCCESS
;
}
}
public
String
updateExercise
(
ExerciseDictDO
exerciseDictDO
){
public
String
updateExercise
(
ExerciseDictDO
exerciseDictDO
)
{
this
.
baseMapper
.
updateById
(
exerciseDictDO
);
this
.
baseMapper
.
updateById
(
exerciseDictDO
);
return
ConstantUtils
.
SET_SUCCESS
;
return
ConstantUtils
.
SET_SUCCESS
;
}
}
public
List
<
ExerciseVO
>
getCourseExercises
(
CourseDictDO
courseDictDO
){
public
List
<
ExerciseVO
>
getCourseExercises
(
CourseDictDO
courseDictDO
)
{
List
<
ExerciseVO
>
exerciseVOS
=
new
ArrayList
<>();
List
<
ExerciseVO
>
exerciseVOS
=
new
ArrayList
<>();
List
<
ExerciseDictDO
>
exerciseDictDOS
=
this
.
baseMapper
.
selectList
(
new
QueryWrapper
<
ExerciseDictDO
>()
List
<
ExerciseDictDO
>
exerciseDictDOS
=
this
.
baseMapper
.
selectList
(
new
QueryWrapper
<
ExerciseDictDO
>()
.
lambda
()
.
lambda
()
.
eq
(
ExerciseDictDO:
:
getCourseId
,
courseDictDO
.
getId
()));
.
eq
(
ExerciseDictDO:
:
getCourseId
,
courseDictDO
.
getId
()));
for
(
ExerciseDictDO
exerciseDictDO
:
exerciseDictDOS
){
for
(
ExerciseDictDO
exerciseDictDO
:
exerciseDictDOS
)
{
ExerciseVO
exerciseVO
=
new
ExerciseVO
();
ExerciseVO
exerciseVO
=
new
ExerciseVO
();
BeanUtils
.
copyProperties
(
exerciseDictDO
,
exerciseVO
);
BeanUtils
.
copyProperties
(
exerciseDictDO
,
exerciseVO
);
exerciseVOS
.
add
(
exerciseVO
);
exerciseVOS
.
add
(
exerciseVO
);
}
}
return
exerciseVOS
;
return
exerciseVOS
;
}
}
public
String
submit
(
SubmitDTO
submitDTO
){
public
String
submit
(
SubmitDTO
submitDTO
)
{
ExerciseDoneResultDO
exerciseDoneResultDO
=
new
ExerciseDoneResultDO
();
ExerciseDoneResultDO
exerciseDoneResultDO
=
new
ExerciseDoneResultDO
();
List
<
MemberExerciseVO
>
memberExerciseVOS
=
submitDTO
.
getMemberExerciseVOS
();
List
<
MemberExerciseVO
>
memberExerciseVOS
=
submitDTO
.
getMemberExerciseVOS
();
int
rightCounts
=
0
;
int
rightCounts
=
0
;
for
(
MemberExerciseVO
exerciseVO
:
memberExerciseVOS
){
for
(
MemberExerciseVO
exerciseVO
:
memberExerciseVOS
)
{
ExerciseDictDO
exerciseDictDO
=
this
.
baseMapper
.
selectById
(
exerciseVO
.
getId
());
ExerciseDictDO
exerciseDictDO
=
this
.
baseMapper
.
selectById
(
exerciseVO
.
getId
());
if
(
exerciseDictDO
.
getRightAnswer
().
equals
(
exerciseVO
.
getSelectAnswer
())){
if
(
exerciseDictDO
.
getRightAnswer
().
equals
(
exerciseVO
.
getSelectAnswer
()))
{
rightCounts
++;
rightCounts
++;
}
}
}
}
...
@@ -114,13 +115,18 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
...
@@ -114,13 +115,18 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
exerciseDoneResultDO
.
setMemberId
(
submitDTO
.
getMemberId
());
exerciseDoneResultDO
.
setMemberId
(
submitDTO
.
getMemberId
());
exerciseDoneResultMapper
.
delete
(
new
QueryWrapper
<
ExerciseDoneResultDO
>()
exerciseDoneResultMapper
.
delete
(
new
QueryWrapper
<
ExerciseDoneResultDO
>()
.
lambda
()
.
lambda
()
.
eq
(
ExerciseDoneResultDO:
:
getMemberId
,
submitDTO
.
getMemberId
())
.
eq
(
ExerciseDoneResultDO:
:
getMemberId
,
submitDTO
.
getMemberId
())
.
eq
(
ExerciseDoneResultDO:
:
getCourseId
,
submitDTO
.
getCourseId
()));
.
eq
(
ExerciseDoneResultDO:
:
getCourseId
,
submitDTO
.
getCourseId
()));
exerciseDoneResultMapper
.
insert
(
exerciseDoneResultDO
);
exerciseDoneResultMapper
.
insert
(
exerciseDoneResultDO
);
return
ConstantUtils
.
COMMIT_SUCCESS
;
return
ConstantUtils
.
COMMIT_SUCCESS
;
}
}
public
IPage
getPaperExercise
(
GetPaperExerciseDTO
getPaperExerciseDTO
)
{
Page
pager
=
new
Page
(
getPaperExerciseDTO
.
getPageNum
(),
getPaperExerciseDTO
.
getPageSize
());
return
this
.
baseMapper
.
getPaperExercise
(
pager
,
getPaperExerciseDTO
.
getPaperId
(),
getPaperExerciseDTO
.
getDifficulty
(),
getPaperExerciseDTO
.
getExerciseType
(),
getPaperExerciseDTO
.
getTitle
());
}
}
}
src/main/java/com/subsidy/service/impl/ExerciseDoneHistoryServiceImpl.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.ExerciseDoneHistoryDO
;
import
com.subsidy.mapper.ExerciseDoneHistoryMapper
;
import
com.subsidy.service.ExerciseDoneHistoryService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 做题历史记录表 服务实现类
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@Service
public
class
ExerciseDoneHistoryServiceImpl
extends
ServiceImpl
<
ExerciseDoneHistoryMapper
,
ExerciseDoneHistoryDO
>
implements
ExerciseDoneHistoryService
{
}
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
View file @
7697e95
...
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
...
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.dto.administer.VerifyCodeDTO
;
import
com.subsidy.dto.administer.VerifyCodeDTO
;
import
com.subsidy.dto.member.AddMemberDTO
;
import
com.subsidy.dto.member.*
;
import
com.subsidy.dto.member.ContentMemberDTO
;
import
com.subsidy.dto.member.GetAllDTO
;
import
com.subsidy.dto.member.StudyHistoryDTO
;
import
com.subsidy.mapper.*
;
import
com.subsidy.mapper.*
;
import
com.subsidy.model.*
;
import
com.subsidy.model.*
;
import
com.subsidy.service.MemberService
;
import
com.subsidy.service.MemberService
;
...
@@ -96,12 +93,12 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -96,12 +93,12 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
this
.
baseMapper
.
deleteById
(
memberDO
.
getId
());
this
.
baseMapper
.
deleteById
(
memberDO
.
getId
());
classMemberMappingMapper
.
delete
(
new
QueryWrapper
<
ClassMemberMappingDO
>()
classMemberMappingMapper
.
delete
(
new
QueryWrapper
<
ClassMemberMappingDO
>()
.
lambda
()
.
lambda
()
.
eq
(
ClassMemberMappingDO:
:
getMemberId
,
memberDO
.
getId
()));
.
eq
(
ClassMemberMappingDO:
:
getMemberId
,
memberDO
.
getId
()));
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getMemberId
,
memberDO
.
getId
()));
.
eq
(
MemberDepartmentMappingDO:
:
getMemberId
,
memberDO
.
getId
()));
return
ConstantUtils
.
DELETE_SUCCESS
;
return
ConstantUtils
.
DELETE_SUCCESS
;
}
}
...
@@ -116,22 +113,29 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -116,22 +113,29 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw
new
HttpException
(
20002
);
throw
new
HttpException
(
20002
);
}
}
//部门
List
<
Long
>
longs
=
addMemberDTO
.
getDepartmentIds
();
Integer
count1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
Integer
count1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
()));
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
())
.
eq
(
MemberDO:
:
getCompanyId
,
addMemberDTO
.
getCompanyId
()));
if
(
count1
>
0
)
{
if
(
count1
>
0
)
{
throw
new
HttpException
(
20002
);
throw
new
HttpException
(
20002
);
}
}
MemberDO
memberDO
=
new
MemberDO
();
MemberDO
memberDO
=
new
MemberDO
();
BeanUtils
.
copyProperties
(
addMemberDTO
,
memberDO
);
BeanUtils
.
copyProperties
(
addMemberDTO
,
memberDO
);
memberDO
.
setPassword
(
"123456"
);
memberDO
.
setPassword
(
"123456"
);
memberDO
.
setStatus
(
"启用"
);
memberDO
.
setStatus
(
"启用"
);
memberDO
.
setFirstLogin
(
0
);
//公司赋值
memberDO
.
setCompanyId
(
addMemberDTO
.
getCompanyId
());
this
.
baseMapper
.
insert
(
memberDO
);
this
.
baseMapper
.
insert
(
memberDO
);
//部门
List
<
Long
>
longs
=
addMemberDTO
.
getDepartmentIds
();
for
(
Long
lg
:
longs
)
{
for
(
Long
lg
:
longs
)
{
MemberDepartmentMappingDO
memberDepartmentMappingDO
=
new
MemberDepartmentMappingDO
();
MemberDepartmentMappingDO
memberDepartmentMappingDO
=
new
MemberDepartmentMappingDO
();
memberDepartmentMappingDO
.
setMemberId
(
memberDO
.
getId
());
memberDepartmentMappingDO
.
setMemberId
(
memberDO
.
getId
());
...
@@ -144,7 +148,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -144,7 +148,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public
String
updateMember
(
AddMemberDTO
addMemberDTO
)
{
public
String
updateMember
(
AddMemberDTO
addMemberDTO
)
{
if
(
null
!=
addMemberDTO
.
getDepartmentIds
())
{
if
(
null
!=
addMemberDTO
.
getDepartmentIds
())
{
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDO:
:
getTelephone
,
addMemberDTO
.
getTelephone
())
.
eq
(
MemberDO:
:
getTelephone
,
addMemberDTO
.
getTelephone
())
...
@@ -156,6 +160,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -156,6 +160,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
Integer
count1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
Integer
count1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
())
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
())
.
eq
(
MemberDO:
:
getCompanyId
,
addMemberDTO
.
getCompanyId
())
.
ne
(
MemberDO:
:
getId
,
addMemberDTO
.
getId
()));
.
ne
(
MemberDO:
:
getId
,
addMemberDTO
.
getId
()));
if
(
count1
>
0
)
{
if
(
count1
>
0
)
{
...
@@ -167,7 +172,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -167,7 +172,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
BeanUtils
.
copyProperties
(
addMemberDTO
,
memberDO
);
BeanUtils
.
copyProperties
(
addMemberDTO
,
memberDO
);
this
.
baseMapper
.
updateById
(
memberDO
);
this
.
baseMapper
.
updateById
(
memberDO
);
if
(
null
!=
addMemberDTO
.
getDepartmentIds
()){
if
(
null
!=
addMemberDTO
.
getDepartmentIds
())
{
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getMemberId
,
addMemberDTO
.
getId
()));
.
eq
(
MemberDepartmentMappingDO:
:
getMemberId
,
addMemberDTO
.
getId
()));
...
@@ -189,18 +194,23 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -189,18 +194,23 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
UserRoleVO
login
(
VerifyCodeDTO
verifyCodeDTO
)
{
public
UserRoleVO
login
(
VerifyCodeDTO
verifyCodeDTO
)
{
UserRoleVO
userRoleVO
=
new
UserRoleVO
();
UserRoleVO
userRoleVO
=
new
UserRoleVO
();
MemberDO
userRole
DO
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
MemberDO
>()
MemberDO
member
DO
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
lambda
()
.
eq
(
MemberDO:
:
getTelephone
,
verifyCodeDTO
.
getTelephone
()));
.
eq
(
MemberDO:
:
getTelephone
,
verifyCodeDTO
.
getTelephone
()));
if
(
userRole
DO
==
null
)
{
if
(
member
DO
==
null
)
{
throw
new
HttpException
(
10010
);
throw
new
HttpException
(
10010
);
}
}
if
(
"冻结"
.
equals
(
userRoleDO
.
getStatus
()))
{
if
(
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
throw
new
HttpException
(
10013
);
throw
new
HttpException
(
10013
);
}
}
BeanUtils
.
copyProperties
(
userRoleDO
,
userRoleVO
);
//是否登陆过 1:是 0:否
if
(
0
==
memberDO
.
getFirstLogin
())
{
memberDO
.
setFirstLogin
(
1
);
this
.
baseMapper
.
updateById
(
memberDO
);
}
BeanUtils
.
copyProperties
(
memberDO
,
userRoleVO
);
SmsVerifyCodeDO
smsCodeDO
=
smsVerifyCodeMapper
.
selectOne
(
new
QueryWrapper
<
SmsVerifyCodeDO
>()
SmsVerifyCodeDO
smsCodeDO
=
smsVerifyCodeMapper
.
selectOne
(
new
QueryWrapper
<
SmsVerifyCodeDO
>()
.
lambda
()
.
lambda
()
...
@@ -212,21 +222,17 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -212,21 +222,17 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
return
userRoleVO
;
return
userRoleVO
;
}
}
public
UserRoleVO
passwordLogin
(
MemberDO
memberDO
)
{
public
UserRoleVO
passwordLogin
(
PasswordLoginDTO
passwordLoginDTO
)
{
UserRoleVO
userRoleVO
=
new
UserRoleVO
();
UserRoleVO
userRoleVO
=
this
.
baseMapper
.
passwordLogin
(
passwordLoginDTO
);
MemberDO
memberDO1
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
MemberDO
>()
if
(
userRoleVO
==
null
)
{
.
lambda
()
.
eq
(
MemberDO:
:
getPassword
,
memberDO
.
getPassword
())
.
eq
(
MemberDO:
:
getAccountName
,
memberDO
.
getAccountName
()));
if
(
memberDO1
==
null
)
{
throw
new
HttpException
(
10004
);
throw
new
HttpException
(
10004
);
}
}
if
(
"冻结"
.
equals
(
userRoleVO
.
getStatus
()))
{
if
(
"冻结"
.
equals
(
memberDO1
.
getStatus
())){
throw
new
HttpException
(
10014
);
throw
new
HttpException
(
10014
);
}
}
if
(
0
==
userRoleVO
.
getFirstLogin
())
{
BeanUtils
.
copyProperties
(
memberDO1
,
userRoleVO
);
throw
new
HttpException
(
10015
);
}
return
userRoleVO
;
return
userRoleVO
;
}
}
...
@@ -343,9 +349,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -343,9 +349,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
memberVodVO
.
setStatus
(
false
);
memberVodVO
.
setStatus
(
false
);
if
(
vodPlayHistoryDOS
.
size
()
>
0
)
{
if
(
vodPlayHistoryDOS
.
size
()
>
0
)
{
int
length
=
MathUtil
.
intDivCeil
(
100
*
vodPlayHistoryDOS
.
get
(
0
).
getPlayRecord
(),
vodDictDO
.
getVodLength
());
int
length
=
MathUtil
.
intDivCeil
(
100
*
vodPlayHistoryDOS
.
get
(
0
).
getPlayRecord
(),
vodDictDO
.
getVodLength
());
if
(
length
>=
100
)
{
if
(
length
>=
100
)
{
memberVodVO
.
setPercent
(
100
);
memberVodVO
.
setPercent
(
100
);
}
else
{
}
else
{
memberVodVO
.
setPercent
(
length
);
memberVodVO
.
setPercent
(
length
);
}
}
if
(
memberVodVO
.
getPercent
()
>=
80
)
{
if
(
memberVodVO
.
getPercent
()
>=
80
)
{
...
@@ -376,15 +382,15 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -376,15 +382,15 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
contentVodNewVO
.
setContentVodVOS
(
contentVodVOS
);
contentVodNewVO
.
setContentVodVOS
(
contentVodVOS
);
List
<
VodPlayHistoryDO
>
vodPlayHistoryDOS
=
vodPlayHistoryMapper
.
selectList
(
new
QueryWrapper
<
VodPlayHistoryDO
>()
List
<
VodPlayHistoryDO
>
vodPlayHistoryDOS
=
vodPlayHistoryMapper
.
selectList
(
new
QueryWrapper
<
VodPlayHistoryDO
>()
.
lambda
()
.
lambda
()
.
eq
(
VodPlayHistoryDO:
:
getClassId
,
contentVodDTO
.
getClassId
())
.
eq
(
VodPlayHistoryDO:
:
getClassId
,
contentVodDTO
.
getClassId
())
.
eq
(
VodPlayHistoryDO:
:
getMemberId
,
contentVodDTO
.
getMemberId
())
.
eq
(
VodPlayHistoryDO:
:
getMemberId
,
contentVodDTO
.
getMemberId
())
.
orderByDesc
(
VodPlayHistoryDO:
:
getCreateDate
));
.
orderByDesc
(
VodPlayHistoryDO:
:
getCreateDate
));
if
(
vodPlayHistoryDOS
.
size
()
>
0
)
{
if
(
vodPlayHistoryDOS
.
size
()
>
0
)
{
VodPlayHistoryDO
vodPlayHistoryDO
=
vodPlayHistoryDOS
.
get
(
0
);
VodPlayHistoryDO
vodPlayHistoryDO
=
vodPlayHistoryDOS
.
get
(
0
);
VodDictDO
vodDictDO
=
vodDictMapper
.
selectById
(
vodPlayHistoryDO
.
getVodId
());
VodDictDO
vodDictDO
=
vodDictMapper
.
selectById
(
vodPlayHistoryDO
.
getVodId
());
if
(
null
!=
vodDictDO
)
{
if
(
null
!=
vodDictDO
)
{
BeanUtils
.
copyProperties
(
vodDictDO
,
contentVodNewVO
);
BeanUtils
.
copyProperties
(
vodDictDO
,
contentVodNewVO
);
contentVodNewVO
.
setPlayRecord
(
vodPlayHistoryDO
.
getPlayRecord
());
contentVodNewVO
.
setPlayRecord
(
vodPlayHistoryDO
.
getPlayRecord
());
}
}
}
}
...
@@ -456,10 +462,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -456,10 +462,10 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
getCourseTestVO
.
setTotalCount
(
String
.
valueOf
(
exerciseDoneResultDO
.
getTotalCounts
()));
getCourseTestVO
.
setTotalCount
(
String
.
valueOf
(
exerciseDoneResultDO
.
getTotalCounts
()));
//正确率
//正确率
Integer
percent
=
MathUtil
.
intDivFloorPercent
(
exerciseDoneResultDO
.
getRightCounts
(),
exerciseDoneResultDO
.
getTotalCounts
());
Integer
percent
=
MathUtil
.
intDivFloorPercent
(
exerciseDoneResultDO
.
getRightCounts
(),
exerciseDoneResultDO
.
getTotalCounts
());
if
(
percent
>=
60
)
{
if
(
percent
>=
60
)
{
getCourseTestVO
.
setResult
(
"合格"
);
getCourseTestVO
.
setResult
(
"合格"
);
}
else
{
}
else
{
getCourseTestVO
.
setResult
(
"不合格"
);
getCourseTestVO
.
setResult
(
"不合格"
);
}
}
getCourseTestVO
.
setPercent
(
String
.
valueOf
(
percent
));
getCourseTestVO
.
setPercent
(
String
.
valueOf
(
percent
));
...
@@ -483,7 +489,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
...
@@ -483,7 +489,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
MemberDO
memberDO1
=
this
.
baseMapper
.
selectById
(
memberDO
.
getId
());
MemberDO
memberDO1
=
this
.
baseMapper
.
selectById
(
memberDO
.
getId
());
//第几天
//第几天
long
diff
=
Duration
.
between
(
memberDO1
.
getCreateDate
(),
LocalDateTime
.
now
()).
toDays
();
long
diff
=
Duration
.
between
(
memberDO1
.
getCreateDate
(),
LocalDateTime
.
now
()).
toDays
();
getStudyInfoVO
.
setDiff
(
diff
);
getStudyInfoVO
.
setDiff
(
diff
);
//已学课程
//已学课程
...
...
src/main/java/com/subsidy/service/impl/PaperDictServiceImpl.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.model.PaperDictDO
;
import
com.subsidy.mapper.PaperDictMapper
;
import
com.subsidy.service.PaperDictService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.vo.paper.QueryPapersVO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 试卷字典表 服务实现类
* </p>
*
* @author DengMin
* @since 2021-12-03
*/
@Service
public
class
PaperDictServiceImpl
extends
ServiceImpl
<
PaperDictMapper
,
PaperDictDO
>
implements
PaperDictService
{
public
List
<
QueryPapersVO
>
queryPapers
(
PaperDictDO
paperDictDO
){
return
this
.
baseMapper
.
queryPapers
(
paperDictDO
);
}
public
String
deletePaper
(
PaperDictDO
paperDictDO
){
this
.
baseMapper
.
deleteById
(
paperDictDO
.
getId
());
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
String
updateStatus
(
PaperDictDO
paperDictDO
){
this
.
baseMapper
.
updateById
(
paperDictDO
);
return
ConstantUtils
.
SET_SUCCESS
;
}
public
String
addPaper
(
PaperDictDO
paperDictDO
){
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
PaperDictDO
>()
.
lambda
()
.
eq
(
PaperDictDO:
:
getCourseId
,
paperDictDO
.
getCourseId
())
.
eq
(
PaperDictDO:
:
getPaperName
,
paperDictDO
.
getPaperName
()));
if
(
count
>
0
){
throw
new
HttpException
(
50001
);
}
paperDictDO
.
setPaperStatus
(
0
);
this
.
baseMapper
.
insert
(
paperDictDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
}
}
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
View file @
7697e95
...
@@ -166,12 +166,11 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
...
@@ -166,12 +166,11 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
SignInStatusVO
signInStatusVO
=
new
SignInStatusVO
();
SignInStatusVO
signInStatusVO
=
new
SignInStatusVO
();
Boolean
flag
=
true
;
Boolean
flag
=
true
;
// 已经签过到了
//获取有效课程
//获取有效课程
List
<
ClassDictDO
>
classDictDOS
=
classMemberMappingMapper
.
getMemberClass
(
signInRecordDO
.
getMemberId
());
List
<
ClassDictDO
>
classDictDOS
=
classMemberMappingMapper
.
getMemberClass
(
signInRecordDO
.
getMemberId
());
for
(
ClassDictDO
classDictDO
:
classDictDOS
)
{
for
(
ClassDictDO
classDictDO
:
classDictDOS
)
{
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
SignInRecordDO
>()
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
SignInRecordDO
>()
.
lambda
()
.
lambda
()
...
@@ -180,13 +179,17 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
...
@@ -180,13 +179,17 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
.
gt
(
SignInRecordDO:
:
getSignInDate
,
LocalDate
.
now
()));
.
gt
(
SignInRecordDO:
:
getSignInDate
,
LocalDate
.
now
()));
if
(
count
==
0
)
{
if
(
count
==
0
)
{
flag
=
false
;
flag
=
false
;
//没有签到
}
}
}
}
signInStatusVO
.
setStatus
(
flag
);
signInStatusVO
.
setStatus
(
flag
);
return
signInStatusVO
;
return
signInStatusVO
;
}
}
//public static void main(String[] args) {
// System.out.println(LocalDate.now().plusDays(1));
//}
}
}
src/main/java/com/subsidy/vo/administer/UserRoleVO.java
View file @
7697e95
...
@@ -11,7 +11,11 @@ public class UserRoleVO {
...
@@ -11,7 +11,11 @@ public class UserRoleVO {
private
String
userName
;
private
String
userName
;
private
String
img
;
private
String
image
;
private
String
status
;
private
Integer
firstLogin
;
}
}
src/main/java/com/subsidy/vo/company/GetAllCompanyVO.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
vo
.
company
;
import
lombok.Data
;
@Data
public
class
GetAllCompanyVO
{
private
Long
id
;
private
String
companyName
;
}
src/main/java/com/subsidy/vo/exercise/GetPaperExerciseVO.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
vo
.
exercise
;
import
lombok.Data
;
@Data
public
class
GetPaperExerciseVO
{
}
src/main/java/com/subsidy/vo/member/GetAllVO.java
View file @
7697e95
package
com
.
subsidy
.
vo
.
member
;
package
com
.
subsidy
.
vo
.
member
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.MemberDO
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -7,7 +9,21 @@ import lombok.Data;
...
@@ -7,7 +9,21 @@ import lombok.Data;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
public
class
GetAllVO
extends
MemberDO
{
public
class
GetAllVO
{
private
Long
id
;
private
String
accountName
;
private
String
userName
;
private
String
telephone
;
private
String
gender
;
private
String
idCard
;
private
String
status
;
private
List
<
DepartmentDictDO
>
departmentDictDOS
;
private
List
<
DepartmentDictDO
>
departmentDictDOS
;
...
...
src/main/java/com/subsidy/vo/paper/QueryPapersVO.java
0 → 100644
View file @
7697e95
package
com
.
subsidy
.
vo
.
paper
;
import
lombok.Data
;
@Data
public
class
QueryPapersVO
{
private
Long
id
;
private
String
paperName
;
private
String
paperStatus
;
}
src/main/resources/application-dev.properties
View file @
7697e95
# 本地环境配置
# 本地环境配置
# 数据源配置
# 数据源配置
#spring.datasource.url=jdbc:mysql://rm-uf6n0xuw1x835h2f7ro.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.url
=
jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.url
=
jdbc:mysql://116.62.57.92:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
#spring.datasource.username=ykadmin_new
#spring.datasource.username=ykadmin_new
...
...
src/main/resources/application.properties
View file @
7697e95
# 环境配置
# 环境配置
spring.profiles.active
=
dev
spring.profiles.active
=
prod
# 端口号
# 端口号
spring.server.port
=
23454
spring.server.port
=
23454
#嵌入tomcat配置
#嵌入tomcat配置
...
...
src/main/resources/code.properties
View file @
7697e95
...
@@ -8,6 +8,7 @@ meishu.code-message[10010]=学生信息不存在
...
@@ -8,6 +8,7 @@ meishu.code-message[10010]=学生信息不存在
meishu.code-message[10011]=成员信息不存在
meishu.code-message[10011]=成员信息不存在
meishu.code-message[10013]=账户已冻结,请联系账户管理员
meishu.code-message[10013]=账户已冻结,请联系账户管理员
meishu.code-message[10014]=该成员已存在,请勿重复添加
meishu.code-message[10014]=该成员已存在,请勿重复添加
meishu.code-message[10015]=首次登录请使用验证码登录
meishu.code-message[20001]=该课程已存在
meishu.code-message[20001]=该课程已存在
...
@@ -17,6 +18,10 @@ meishu.code-message[30001]=该部门已存在
...
@@ -17,6 +18,10 @@ meishu.code-message[30001]=该部门已存在
meishu.code-message[40001]=该目录已存在
meishu.code-message[40001]=该目录已存在
meishu.code-message[50001]=该试卷已存在
meishu.code-message[70010]=验证码错误
meishu.code-message[70010]=验证码错误
meishu.code-message[70011]=验证码发送频繁
meishu.code-message[70011]=验证码发送频繁
meishu.code-message[70012]=手机号未注册
meishu.code-message[70012]=手机号未注册
...
...
src/main/resources/mapper/ClassMemberMappingMapper.xml
View file @
7697e95
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
WHERE
WHERE
t.delete_date IS NULL
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t2.delete_date IS NULL
and t2.start_date
<
= now()
and t2.end_date >=DATE_FORMAT(now(), '%Y-%m-%d')
and t2.end_date >= now()
and t.member_id = #{memberId}
and t.member_id = #{memberId}
</select>
</select>
...
...
src/main/resources/mapper/CompanyDictMapper.xml
View file @
7697e95
...
@@ -49,17 +49,17 @@
...
@@ -49,17 +49,17 @@
</if>
</if>
</select>
</select>
<select
id=
"getAdministerByCompanyId"
parameterType=
"long"
resultType=
"com.subsidy.model.AdministerDO"
>
<select
id=
"getAllCompany"
parameterType=
"com.subsidy.model.CompanyDictDO"
resultType=
"com.subsidy.vo.company.GetAllCompanyVO"
>
SELECT
SELECT
*
t.id,
t.company_name
FROM
FROM
administer t
company_dict t
LEFT JOIN role_administer_mapping t2 ON t.id = t2.administer_id
where t.delete_date is null
WHERE
<if
test=
"companyName != null and companyName != ''"
>
t.delete_date IS NOT NULL
and t.company_name like concat('%',#{companyName} ,'%')
AND t2.delete_date IS NOT NULL
</if>
AND t.company_id = #{companyId}
AND t2.role_id = 2
</select>
</select>
</mapper>
</mapper>
src/main/resources/mapper/ExerciseDictMapper.xml
View file @
7697e95
...
@@ -25,4 +25,33 @@
...
@@ -25,4 +25,33 @@
id, exercise_type, course_id, difficulty, title, items, right_answer, detail
id, exercise_type, course_id, difficulty, title, items, right_answer, detail
</sql>
</sql>
<select
id=
"getPaperExercise"
resultType=
"com.subsidy.vo.exercise.GetPaperExerciseVO"
>
SELECT
id,
exercise_type,
course_id,
difficulty,
title,
items,
right_answer,
detail,
order_no
FROM
exercise_dict t
WHERE
t.delete_date IS NULL
AND t.paper_id = #{paperId}
<if
test=
"difficulty!=null and difficulty !=''"
>
AND t.difficulty = #{difficulty}
</if>
<if
test=
"exerciseType!=null and exerciseType !=''"
>
AND t.exercise_type = #{exerciseType}
</if>
<if
test=
"title !=null and title !=''"
>
and t.title like concat('%',#{title} ,'%')
</if>
order by t.order_no
</select>
</mapper>
</mapper>
src/main/resources/mapper/ExerciseDoneHistoryMapper.xml
0 → 100644
View file @
7697e95
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.ExerciseDoneHistoryMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.ExerciseDoneHistoryDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"update_date"
property=
"updateDate"
/>
<result
column=
"delete_date"
property=
"deleteDate"
/>
<result
column=
"paper_id"
property=
"paperId"
/>
<result
column=
"member_id"
property=
"memberId"
/>
<result
column=
"class_id"
property=
"classId"
/>
<result
column=
"exercise_id"
property=
"exerciseId"
/>
<result
column=
"answer"
property=
"answer"
/>
<result
column=
"result"
property=
"result"
/>
<result
column=
"length"
property=
"length"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, paper_id, member_id, class_id, exercise_id, answer, result, length
</sql>
</mapper>
src/main/resources/mapper/MemberMapper.xml
View file @
7697e95
...
@@ -24,6 +24,23 @@
...
@@ -24,6 +24,23 @@
id, user_name, telephone, password, gender, image, id_card
id, user_name, telephone, password, gender, image, id_card
</sql>
</sql>
<select
id=
"passwordLogin"
parameterType=
"com.subsidy.dto.member.PasswordLoginDTO"
resultType=
"com.subsidy.vo.administer.UserRoleVO"
>
SELECT
t.id,
t.telephone,
t.user_name,
t.image,
t.status,
t.first_login
FROM
member t
WHERE
t.delete_date IS NULL
AND t.account_name = #{accountName}
AND t.PASSWORD = #{password}
AND t.company_id =#{companyId}
</select>
<select
id=
"studyPage"
parameterType=
"com.subsidy.model.MemberDO"
resultType=
"com.subsidy.vo.member.StudyPageVO"
>
<select
id=
"studyPage"
parameterType=
"com.subsidy.model.MemberDO"
resultType=
"com.subsidy.vo.member.StudyPageVO"
>
SELECT
SELECT
t3.id,
t3.id,
...
...
src/main/resources/mapper/PaperDictMapper.xml
0 → 100644
View file @
7697e95
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.PaperDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.PaperDictDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"update_date"
property=
"updateDate"
/>
<result
column=
"delete_date"
property=
"deleteDate"
/>
<result
column=
"course_id"
property=
"courseId"
/>
<result
column=
"paper_name"
property=
"paperName"
/>
<result
column=
"paper_status"
property=
"paperStatus"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, course_id, paper_name, paper_status
</sql>
<select
id=
"queryPapers"
parameterType=
"com.subsidy.model.PaperDictDO"
resultType=
"com.subsidy.vo.paper.QueryPapersVO"
>
SELECT
id,
paper_name,
paper_status
FROM
paper_dict t
WHERE
t.delete_date is null
and t.course_id = #{courseId}
<if
test=
"paperName != null and paperName !=''"
>
AND t.paper_name LIKE concat('%',#{paperName} ,'%')
</if>
</select>
</mapper>
src/main/resources/mybatis-plus.properties
View file @
7697e95
...
@@ -6,7 +6,7 @@ setParent=com.subsidy
...
@@ -6,7 +6,7 @@ setParent=com.subsidy
# mapper.xml文件生成路径
# mapper.xml文件生成路径
mapperPath
=
/src/main/resources/mapper/
mapperPath
=
/src/main/resources/mapper/
# 数据库地址
# 数据库地址
url
=
jdbc:mysql://116.62.57.92:3306/subsidy?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&useAffectedRows=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
url
=
jdbc:mysql://116.62.57.92:3306/subsidy
_test
?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true&useAffectedRows=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
driverName
=
com.mysql.cj.jdbc.Driver
driverName
=
com.mysql.cj.jdbc.Driver
userName
=
devloper
userName
=
devloper
password
=
dev@1553$
password
=
dev@1553$
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment