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 6dad6971
authored
Feb 15, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
班级通知表同步下
1 parent
49d090c5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
1311 additions
and
204 deletions
src/main/java/com/subsidy/controller/AdministerController.java
src/main/java/com/subsidy/controller/CategoryController.java
src/main/java/com/subsidy/controller/ClassDictController.java
src/main/java/com/subsidy/controller/CompanyDictController.java
src/main/java/com/subsidy/controller/CourseCategoryMappingController.java
src/main/java/com/subsidy/controller/CourseDictController.java
src/main/java/com/subsidy/controller/CourseJobMappingController.java
src/main/java/com/subsidy/controller/CourseRankMappingController.java
src/main/java/com/subsidy/controller/DepartmentDictController.java
src/main/java/com/subsidy/controller/RankDictController.java
src/main/java/com/subsidy/dto/administer/ManageMemberDTO.java
src/main/java/com/subsidy/dto/administer/OperatorsDTO.java
src/main/java/com/subsidy/dto/company/AddCompanyDTO.java
src/main/java/com/subsidy/dto/course/QueryCoursesDTO.java
src/main/java/com/subsidy/dto/course/UpdateCoursesDTO.java
src/main/java/com/subsidy/dto/department/GetDepartmentMembersDTO.java
src/main/java/com/subsidy/mapper/CategoryMapper.java
src/main/java/com/subsidy/mapper/ClassDictMapper.java
src/main/java/com/subsidy/mapper/CompanyDictMapper.java
src/main/java/com/subsidy/mapper/CourseCategoryMappingMapper.java
src/main/java/com/subsidy/mapper/CourseDictMapper.java
src/main/java/com/subsidy/mapper/CourseJobMappingMapper.java
src/main/java/com/subsidy/mapper/CourseRankMappingMapper.java
src/main/java/com/subsidy/mapper/DepartmentDictMapper.java
src/main/java/com/subsidy/mapper/FieldDictMapper.java
src/main/java/com/subsidy/mapper/JobDictMapper.java
src/main/java/com/subsidy/mapper/MemberMapper.java
src/main/java/com/subsidy/mapper/PaperDictMapper.java
src/main/java/com/subsidy/mapper/RankDictMapper.java
src/main/java/com/subsidy/model/ClassDictDO.java
src/main/java/com/subsidy/model/ClassNoticeDO.java
src/main/java/com/subsidy/model/CompanyDictDO.java
src/main/java/com/subsidy/model/CourseCategoryMappingDO.java
src/main/java/com/subsidy/model/CourseDictDO.java
src/main/java/com/subsidy/model/CourseJobMappingDO.java
src/main/java/com/subsidy/model/CourseRankMappingDO.java
src/main/java/com/subsidy/model/RankDictDO.java
src/main/java/com/subsidy/service/AdministerService.java
src/main/java/com/subsidy/service/ClassDictService.java
src/main/java/com/subsidy/service/CourseCategoryMappingService.java
src/main/java/com/subsidy/service/CourseDictService.java
src/main/java/com/subsidy/service/CourseJobMappingService.java
src/main/java/com/subsidy/service/CourseRankMappingService.java
src/main/java/com/subsidy/service/DepartmentDictService.java
src/main/java/com/subsidy/service/RankDictService.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CourseCategoryMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CourseJobMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/CourseRankMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
src/main/java/com/subsidy/service/impl/RankDictServiceImpl.java
src/main/java/com/subsidy/vo/administer/ClassSummaryVO.java
src/main/java/com/subsidy/vo/administer/ManageMemberVO.java
src/main/java/com/subsidy/vo/administer/OperatorsVO.java
src/main/java/com/subsidy/vo/classdict/GetAllClassesVO.java
src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java
src/main/java/com/subsidy/vo/course/QueryCoursesVO.java
src/main/resources/application.properties
src/main/resources/code.properties
src/main/resources/mapper/CategoryMapper.xml
src/main/resources/mapper/ClassDictMapper.xml
src/main/resources/mapper/CompanyDictMapper.xml
src/main/resources/mapper/CourseCategoryMappingMapper.xml
src/main/resources/mapper/CourseDictMapper.xml
src/main/resources/mapper/CourseJobMappingMapper.xml
src/main/resources/mapper/CourseRankMappingMapper.xml
src/main/resources/mapper/DepartmentDictMapper.xml
src/main/resources/mapper/FieldDictMapper.xml
src/main/resources/mapper/JobDictMapper.xml
src/main/resources/mapper/MemberMapper.xml
src/main/resources/mapper/PaperDictMapper.xml
src/main/resources/mapper/RankDictMapper.xml
src/main/java/com/subsidy/controller/AdministerController.java
View file @
6dad697
...
...
@@ -8,6 +8,7 @@ import com.subsidy.dto.administer.*;
import
com.subsidy.model.AdministerDO
;
import
com.subsidy.model.ExerciseDoneHistoryDO
;
import
com.subsidy.model.ExerciseDoneResultDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.service.AdministerService
;
import
com.subsidy.util.ConstantUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -86,8 +87,8 @@ public class AdministerController {
}
@PostMapping
(
"classSummary"
)
@ApiOperation
(
"
课程汇总
id 班级id "
)
//
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
@ApiOperation
(
"
班级详情--数据概览
id 班级id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
classSummary
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classSummary
(
classDetailDTO
));
}
...
...
@@ -220,4 +221,9 @@ public class AdministerController {
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
importMember
(
companyId
,
file
));
}
@PostMapping
(
"manageMember"
)
@ApiOperation
(
"用户管理 {pageSize pageNum userName:名字}"
)
public
ResponseVO
manageMember
(
@RequestBody
ManageMemberDTO
manageMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
manageMember
(
manageMemberDTO
));
}
}
src/main/java/com/subsidy/controller/CategoryController.java
View file @
6dad697
...
...
@@ -66,5 +66,4 @@ public class CategoryController {
return
ResponseData
.
generateCreatedResponse
(
0
,
categoryService
.
updateCategory
(
categoryDO
));
}
}
src/main/java/com/subsidy/controller/ClassDictController.java
View file @
6dad697
...
...
@@ -36,7 +36,7 @@ public class ClassDictController {
private
ClassDictService
classDictService
;
@PostMapping
(
"getAllClasses"
)
@ApiOperation
(
"获取某公司下的所有课程 companyId 所选企业id className 班级名称"
)
@ApiOperation
(
"获取某公司下的所有课程 companyId 所选企业id className 班级名称
openStatus 开放状态 startDate 开始时间 endDate 结束时间
"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getAllClasses
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getAllClasses
(
classDictDO
));
...
...
@@ -97,5 +97,12 @@ public class ClassDictController {
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
batchSms
(
classDictDO
));
}
@PostMapping
(
"getClassBaseInfo"
)
@ApiOperation
(
"班级详情--获取课程基本信息"
)
public
ResponseVO
getClassBaseInfo
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getClassBaseInfo
(
classDictDO
));
}
}
src/main/java/com/subsidy/controller/CompanyDictController.java
View file @
6dad697
...
...
@@ -34,14 +34,14 @@ public class CompanyDictController {
private
CompanyDictService
companyDictService
;
@PostMapping
(
"/administers"
)
@ApiOperation
(
"查询所有企业 {id companyName pageNum pageSize }"
)
@ApiOperation
(
"查询所有企业 {id companyName
fieldId 行业id
pageNum pageSize }"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
operators
(
@RequestBody
OperatorsDTO
operatorsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
operators
(
operatorsDTO
));
}
@PostMapping
(
"addCompany"
)
@ApiOperation
(
"添加企业 {accountName:账号 companyName:企业名称
shortName 简称 banner:标语 field
:领域 role 1:超级管理员 2:普通成员}"
)
@ApiOperation
(
"添加企业 {accountName:账号 companyName:企业名称
address 企业所在地 shortName 简称 banner:标语 field[]
:领域 role 1:超级管理员 2:普通成员}"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addOperator
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
addOperator
(
addCompanyDTO
));
...
...
@@ -55,7 +55,7 @@ public class CompanyDictController {
}
@PostMapping
(
"updateCompany"
)
@ApiOperation
(
"修改企业 id accountName:账号 companyName:企业名称
shortName 简称 banner:标语 field
:领域 role 1:超级管理员 2:普通成员"
)
@ApiOperation
(
"修改企业 id accountName:账号 companyName:企业名称
address 企业所在地 shortName 简称 banner:标语 field[]
:领域 role 1:超级管理员 2:普通成员"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateAdminister
(
@RequestBody
AddCompanyDTO
addCompanyDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
updateAdminister
(
addCompanyDTO
));
...
...
src/main/java/com/subsidy/controller/CourseCategoryMappingController.java
0 → 100644
View file @
6dad697
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 2022-02-14
*/
@RestController
@Api
(
tags
=
"课程类目映射"
)
@RequestMapping
(
"/course-category-mapping-do"
)
public
class
CourseCategoryMappingController
{
}
src/main/java/com/subsidy/controller/CourseDictController.java
View file @
6dad697
...
...
@@ -5,6 +5,7 @@ import com.subsidy.common.ResponseData;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.course.QueryCoursesDTO
;
import
com.subsidy.dto.course.UpdateCoursesDTO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.service.CourseDictService
;
import
com.subsidy.util.ConstantUtils
;
...
...
@@ -47,24 +48,30 @@ public class CourseDictController {
}
@PostMapping
(
"queryCourses"
)
@ApiOperation
(
"平台运营者--查询课程 pageSize pageNum
administerId companyId courseName categoryId courseType courseSourc
e"
)
@ApiOperation
(
"平台运营者--查询课程 pageSize pageNum
courseName fieldId categoryId jobId rankId courseTyp
e"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
queryCourses
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCourses
(
queryCoursesDTO
));
}
@PostMapping
(
"updateCourses"
)
@ApiOperation
(
"编辑课程 id co
mpanyId courseName categoryId courseType courseSource
"
)
@ApiOperation
(
"编辑课程 id co
urseName courseType coverPage fieldDictDOS categoryDOS jobDictDOS rankDictDOS
"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
updateCourses
(
@RequestBody
CourseDictDO
courseDictD
O
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
updateCourses
(
courseDictD
O
));
public
ResponseVO
updateCourses
(
@RequestBody
UpdateCoursesDTO
updateCoursesDT
O
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
updateCourses
(
updateCoursesDT
O
));
}
@PostMapping
(
"queryCompanyCourse"
)
@ApiOperation
(
"企业内容管理-- { companyId 所选企业id}"
)
@ApiOperation
(
"企业内容管理-- { companyId 所选企业id
pageSize pageNum courseName categoryId jobId rankId
}"
)
public
ResponseVO
queryCompanyCourse
(
@RequestBody
QueryCoursesDTO
queryCoursesDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
queryCompanyCourse
(
queryCoursesDTO
));
}
@PostMapping
(
"updateOpenStatus"
)
@ApiOperation
(
"修改课程开放状态 id openStatus"
)
public
ResponseVO
updateOpenStatus
(
@RequestBody
CourseDictDO
courseDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
courseDictService
.
updateOpenStatus
(
courseDictDO
));
}
}
src/main/java/com/subsidy/controller/CourseJobMappingController.java
0 → 100644
View file @
6dad697
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 2022-02-14
*/
@RestController
@Api
(
tags
=
"课程-岗位映射表"
)
@RequestMapping
(
"/course-job-mapping-do"
)
public
class
CourseJobMappingController
{
}
src/main/java/com/subsidy/controller/CourseRankMappingController.java
0 → 100644
View file @
6dad697
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 2022-02-14
*/
@RestController
@Api
(
tags
=
"课程职级映射表"
)
@RequestMapping
(
"/course-rank-mapping-do"
)
public
class
CourseRankMappingController
{
}
src/main/java/com/subsidy/controller/DepartmentDictController.java
View file @
6dad697
...
...
@@ -4,6 +4,7 @@ package com.subsidy.controller;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.common.interceptor.LoginRequired
;
import
com.subsidy.dto.department.GetDepartmentMembersDTO
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.service.DepartmentDictService
;
import
com.subsidy.util.ConstantUtils
;
...
...
@@ -13,6 +14,7 @@ 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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
...
...
@@ -59,6 +61,13 @@ public class DepartmentDictController {
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
updateDepartment
(
departmentDictDO
));
}
@PostMapping
(
"getDepartmentMembers"
)
@ApiOperation
(
"获取部门成员 companyId 公司id id 部门id"
)
public
ResponseVO
getDepartmentMembers
(
@RequestBody
GetDepartmentMembersDTO
getDepartmentMembersDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
getDepartmentMembers
(
getDepartmentMembersDTO
));
}
}
src/main/java/com/subsidy/controller/RankDictController.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.mapper.RankDictMapper
;
import
com.subsidy.model.RankDictDO
;
import
com.subsidy.service.RankDictService
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 职级字典表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@RestController
@Api
(
tags
=
"职级字典表"
)
@RequestMapping
(
"/rankDict"
)
public
class
RankDictController
{
@Autowired
private
RankDictService
rankDictService
;
@PostMapping
(
"addRank"
)
@ApiOperation
(
"添加职级 companyId rank"
)
public
ResponseVO
addRank
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
addRank
(
rankDictDO
));
}
@PostMapping
(
"deleteRank"
)
@ApiOperation
(
"删除职级 id"
)
public
ResponseVO
deleteById
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
deleteRank
(
rankDictDO
));
}
@PostMapping
(
"updateRank"
)
@ApiOperation
(
"添加职级 id companyId rank"
)
public
ResponseVO
updateRank
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
updateRank
(
rankDictDO
));
}
@PostMapping
(
"queryRanks"
)
@ApiOperation
(
"查看职级 companyId"
)
public
ResponseVO
queryRanks
(
@RequestBody
RankDictDO
rankDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
rankDictService
.
queryRanks
(
rankDictDO
));
}
}
src/main/java/com/subsidy/dto/administer/ManageMemberDTO.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
dto
.
administer
;
import
lombok.Data
;
@Data
public
class
ManageMemberDTO
{
private
Integer
pageSize
;
private
Integer
pageNum
;
private
String
userName
;
}
src/main/java/com/subsidy/dto/administer/OperatorsDTO.java
View file @
6dad697
...
...
@@ -11,6 +11,8 @@ public class OperatorsDTO {
private
Integer
role
;
private
Long
fieldId
;
private
String
companyName
;
private
String
userName
;
...
...
src/main/java/com/subsidy/dto/company/AddCompanyDTO.java
View file @
6dad697
...
...
@@ -3,6 +3,8 @@ package com.subsidy.dto.company;
import
com.subsidy.model.CompanyDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AddCompanyDTO
extends
CompanyDictDO
{
...
...
@@ -14,4 +16,6 @@ public class AddCompanyDTO extends CompanyDictDO {
private
Integer
role
;
private
List
<
Long
>
field
;
}
src/main/java/com/subsidy/dto/course/QueryCoursesDTO.java
View file @
6dad697
...
...
@@ -2,8 +2,6 @@ package com.subsidy.dto.course;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
QueryCoursesDTO
{
...
...
@@ -17,12 +15,12 @@ public class QueryCoursesDTO {
private
String
courseType
;
private
String
courseSource
;
private
Long
fieldId
;
private
Long
administer
Id
;
private
Long
rank
Id
;
private
Long
company
Id
;
private
Long
job
Id
;
private
L
ist
<
Long
>
teacherIds
;
private
L
ong
companyId
;
}
src/main/java/com/subsidy/dto/course/UpdateCoursesDTO.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
dto
.
course
;
import
com.subsidy.model.CategoryDO
;
import
com.subsidy.model.FieldDictDO
;
import
com.subsidy.model.JobDictDO
;
import
com.subsidy.model.RankDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
UpdateCoursesDTO
{
private
Long
id
;
/**
*
*/
private
Long
companyId
;
/**
* 课程名称
*/
private
String
courseName
;
/**
* 封面
*/
private
String
coverPage
;
/**
* 课程类型
*/
private
String
courseType
;
/**
* 行业范围
*/
private
List
<
FieldDictDO
>
fieldDictDOS
;
/**
* 课程类目
*/
private
List
<
CategoryDO
>
categoryDOS
;
/**
* 适用岗位
*/
private
List
<
JobDictDO
>
jobDictDOS
;
/**
* 适用职级
*/
private
List
<
RankDictDO
>
rankDictDOS
;
}
src/main/java/com/subsidy/dto/department/GetDepartmentMembersDTO.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
dto
.
department
;
import
lombok.Data
;
@Data
public
class
GetDepartmentMembersDTO
{
private
Integer
pageSize
;
private
Integer
pageNum
;
private
Long
departmentId
;
private
Long
companyId
;
private
String
userName
;
}
src/main/java/com/subsidy/mapper/CategoryMapper.java
View file @
6dad697
...
...
@@ -4,6 +4,8 @@ import com.subsidy.model.CategoryDO;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 类目名称 Mapper 接口
...
...
@@ -12,7 +14,13 @@ import org.springframework.stereotype.Repository;
* @author DengMin
* @since 2021-10-11
*/
@Repository
@Repository
public
interface
CategoryMapper
extends
BaseMapper
<
CategoryDO
>
{
/**
* 查看某个课程下的所有类目
*/
List
<
CategoryDO
>
queryCourseCategory
(
Long
courseId
);
}
src/main/java/com/subsidy/mapper/ClassDictMapper.java
View file @
6dad697
...
...
@@ -6,6 +6,7 @@ import com.subsidy.model.ClassDictDO;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.VodDictDO
;
import
com.subsidy.vo.classdict.GetAllClassesVO
;
import
com.subsidy.vo.classdict.GetClassBaseInfoVO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -42,4 +43,9 @@ public interface ClassDictMapper extends BaseMapper<ClassDictDO> {
*/
List
<
MemberDO
>
classMembers
(
Long
classId
);
/**
* 班级详情--获取课程基本信息
*/
GetClassBaseInfoVO
getClassBaseInfo
(
Long
classId
);
}
src/main/java/com/subsidy/mapper/CompanyDictMapper.java
View file @
6dad697
...
...
@@ -21,11 +21,10 @@ import java.util.List;
public
interface
CompanyDictMapper
extends
BaseMapper
<
CompanyDictDO
>
{
/**
* 查找运营者
*
* 企业管理--查找所有主账号
* @return
*/
IPage
<
OperatorsVO
>
operators
(
IPage
page
,
String
companyName
,
Integer
id
,
String
userName
,
Integer
role
);
IPage
<
OperatorsVO
>
operators
(
IPage
page
,
String
companyName
,
Long
fieldId
);
/**
* 查找所有的公司名称
...
...
src/main/java/com/subsidy/mapper/CourseCategoryMappingMapper.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CourseCategoryMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 课程类目映射 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Repository
public
interface
CourseCategoryMappingMapper
extends
BaseMapper
<
CourseCategoryMappingDO
>
{
}
src/main/java/com/subsidy/mapper/CourseDictMapper.java
View file @
6dad697
...
...
@@ -22,10 +22,11 @@ import java.util.List;
public
interface
CourseDictMapper
extends
BaseMapper
<
CourseDictDO
>
{
/**
* 查询全部课程
* 运营者查询全部课程
* courseName fieldId categoryId jobId courseRank courseType
* @return
*/
IPage
<
QueryCoursesVO
>
queryCourses
(
IPage
page
,
String
courseName
,
Long
categoryId
,
String
courseType
,
String
courseSourc
e
,
Long
companyId
);
IPage
<
QueryCoursesVO
>
queryCourses
(
IPage
page
,
String
courseName
,
Long
fieldId
,
Long
categoryId
,
Long
jobId
,
Long
rankId
,
String
courseTyp
e
,
Long
companyId
);
/**
* 通过课程id查询课程下的学生-----弃用
...
...
@@ -39,9 +40,19 @@ public interface CourseDictMapper extends BaseMapper<CourseDictDO> {
IPage
<
QueryCoursesVO
>
queryPublicCourses
(
IPage
page
,
String
courseName
,
Long
categoryId
,
String
courseType
,
String
courseSource
);
/**
* 查
询企业内部课程
* 查
看课程下有多少课时
*/
IPage
<
QueryCoursesVO
>
queryCompanyCourse
(
IPage
page
,
String
courseName
,
Long
categoryId
,
String
courseType
,
String
courseSource
,
Long
companyId
);
Integer
queryCourseCnt
(
Long
courseId
);
/**
* 查看课程学习总时长
*/
Integer
queryCoursePlayLength
(
Long
courseId
);
/**
* 修改课程的开放状态
*/
void
updateOpenStatus
(
CourseDictDO
courseDictDO
);
}
src/main/java/com/subsidy/mapper/CourseJobMappingMapper.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CourseJobMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 课程-岗位映射表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Repository
public
interface
CourseJobMappingMapper
extends
BaseMapper
<
CourseJobMappingDO
>
{
}
src/main/java/com/subsidy/mapper/CourseRankMappingMapper.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CourseRankMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 课程职级映射表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Repository
public
interface
CourseRankMappingMapper
extends
BaseMapper
<
CourseRankMappingDO
>
{
}
src/main/java/com/subsidy/mapper/DepartmentDictMapper.java
View file @
6dad697
package
com
.
subsidy
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.MemberDO
;
import
org.springframework.stereotype.Repository
;
/**
...
...
@@ -17,5 +19,4 @@ public interface DepartmentDictMapper extends BaseMapper<DepartmentDictDO> {
//List<GetDepartmentsVO> getDepartments(DepartmentDictDO departmentDictDO);
}
src/main/java/com/subsidy/mapper/FieldDictMapper.java
View file @
6dad697
...
...
@@ -21,5 +21,16 @@ public interface FieldDictMapper extends BaseMapper<FieldDictDO> {
IPage
<
FieldDictDO
>
queryFields
(
IPage
ipage
,
String
fieldName
);
/**
* 查看公司所有的行业
* @param companyId
* @return
*/
List
<
FieldDictDO
>
queryCompanyFields
(
Long
companyId
);
/**
* 查看课程所属行业
*/
List
<
FieldDictDO
>
queryCourseFields
(
Long
courseId
);
}
src/main/java/com/subsidy/mapper/JobDictMapper.java
View file @
6dad697
...
...
@@ -4,6 +4,8 @@ import com.subsidy.model.JobDictDO;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 岗位表 Mapper 接口
...
...
@@ -12,7 +14,13 @@ import org.springframework.stereotype.Repository;
* @author DengMin
* @since 2022-02-10
*/
@Repository
@Repository
public
interface
JobDictMapper
extends
BaseMapper
<
JobDictDO
>
{
/**
* 获取某个课程适用的所有岗位
*/
List
<
JobDictDO
>
queryCourseJobs
(
Long
courseId
);
}
src/main/java/com/subsidy/mapper/MemberMapper.java
View file @
6dad697
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.subsidy.dto.member.PasswordLoginDTO
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.vo.administer.ManageMemberVO
;
import
com.subsidy.vo.administer.UserRoleVO
;
import
com.subsidy.vo.member.GetAllVO
;
import
com.subsidy.vo.member.MyCoursesVO
;
...
...
@@ -29,7 +30,6 @@ public interface MemberMapper extends BaseMapper<MemberDO> {
*/
UserRoleVO
passwordLogin
(
PasswordLoginDTO
passwordLoginDTO
);
/**
* 查看学生的课程[废弃]
*/
...
...
@@ -48,6 +48,11 @@ public interface MemberMapper extends BaseMapper<MemberDO> {
/**
* 查询部门所有的学生
*/
IPage
<
GetAllVO
>
getMembers
(
IPage
iPage
,
Long
departmentId
,
String
userName
,
String
status
);
IPage
<
GetAllVO
>
getMembers
(
IPage
iPage
,
Long
departmentId
,
String
userName
,
String
status
);
/**
* 查询某公司所有的学生 公司不传就是查平台所有学生
*/
IPage
<
ManageMemberVO
>
manageMember
(
IPage
iPage
,
Long
companyId
,
String
userName
);
}
src/main/java/com/subsidy/mapper/PaperDictMapper.java
View file @
6dad697
...
...
@@ -28,4 +28,10 @@ public interface PaperDictMapper extends BaseMapper<PaperDictDO> {
* 查看某个卷子有多少人完成 卷子id
*/
Integer
completeCount
(
Long
paperId
);
/**
* 查看某个课程下有多少卷子
*/
Integer
queryCoursePapersCnt
(
Long
courseId
);
}
src/main/java/com/subsidy/mapper/RankDictMapper.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.RankDictDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 职级字典表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Repository
public
interface
RankDictMapper
extends
BaseMapper
<
RankDictDO
>
{
/**
* 查看某个课程的职级
*/
List
<
RankDictDO
>
queryCourseRanks
(
Long
courseId
);
/**
* 查看某个公司的职级
*/
List
<
RankDictDO
>
queryCompanyRanks
(
Long
companyId
);
}
src/main/java/com/subsidy/model/ClassDictDO.java
View file @
6dad697
...
...
@@ -41,7 +41,7 @@ public class ClassDictDO extends BaseModel {
/**
* 班级类型
*/
private
String
classType
;
private
String
classType
Id
;
/**
* 课程id
...
...
@@ -68,5 +68,10 @@ public class ClassDictDO extends BaseModel {
*/
private
Integer
isFastPlay
;
/**
* 班级状态
*/
private
String
openStatus
;
}
src/main/java/com/subsidy/model/ClassNoticeDO.java
View file @
6dad697
...
...
@@ -44,7 +44,11 @@ public class ClassNoticeDO extends BaseModel {
/**
* 通知时间
*/
private
LocalDateTime
noticeTime
;
private
String
noticeTime
;
/**
* 发送状态
*/
private
String
status
;
}
src/main/java/com/subsidy/model/CompanyDictDO.java
View file @
6dad697
...
...
@@ -46,10 +46,9 @@ public class CompanyDictDO extends BaseModel {
private
String
banner
;
/**
*
领域
*
地址
*/
private
String
field
;
private
String
address
;
}
src/main/java/com/subsidy/model/CourseCategoryMappingDO.java
0 → 100644
View file @
6dad697
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 2022-02-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"course_category_mapping"
)
public
class
CourseCategoryMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
courseId
;
private
Long
categoryId
;
}
src/main/java/com/subsidy/model/CourseDictDO.java
View file @
6dad697
...
...
@@ -29,7 +29,7 @@ public class CourseDictDO extends BaseModel {
private
Long
id
;
/**
*
*
企业id
*/
private
Long
companyId
;
...
...
@@ -53,9 +53,5 @@ public class CourseDictDO extends BaseModel {
*/
private
String
courseSource
;
///**
// * 习题截止时间
// */
//private LocalDateTime deadline;
}
src/main/java/com/subsidy/model/CourseJobMappingDO.java
0 → 100644
View file @
6dad697
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 2022-02-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"course_job_mapping"
)
public
class
CourseJobMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
jobId
;
private
Long
courseId
;
}
src/main/java/com/subsidy/model/CourseRankMappingDO.java
0 → 100644
View file @
6dad697
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 2022-02-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"course_rank_mapping"
)
public
class
CourseRankMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
courseId
;
private
Long
rankId
;
}
src/main/java/com/subsidy/model/RankDictDO.java
0 → 100644
View file @
6dad697
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 2022-02-14
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"rank_dict"
)
public
class
RankDictDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
companyId
;
/**
* 职级
*/
private
String
rank
;
}
src/main/java/com/subsidy/service/AdministerService.java
View file @
6dad697
...
...
@@ -76,4 +76,5 @@ public interface AdministerService extends IService<AdministerDO> {
String
importMember
(
Long
companyId
,
MultipartFile
multipartFile
);
IPage
<
ManageMemberVO
>
manageMember
(
ManageMemberDTO
manageMemberDTO
);
}
src/main/java/com/subsidy/service/ClassDictService.java
View file @
6dad697
...
...
@@ -8,6 +8,7 @@ import com.subsidy.model.ClassDictDO;
import
com.subsidy.model.ClassMemberMappingDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.vo.classdict.GetAllClassesVO
;
import
com.subsidy.vo.classdict.GetClassBaseInfoVO
;
import
java.util.List
;
...
...
@@ -38,4 +39,7 @@ public interface ClassDictService extends IService<ClassDictDO> {
String
addMemberToClass
(
AddMemberToClassDTO
addMemberToClassDTO
);
String
batchSms
(
ClassDictDO
classDictDO
);
GetClassBaseInfoVO
getClassBaseInfo
(
ClassDictDO
classDictDO
);
}
src/main/java/com/subsidy/service/CourseCategoryMappingService.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
;
import
com.subsidy.model.CourseCategoryMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 课程类目映射 服务类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
public
interface
CourseCategoryMappingService
extends
IService
<
CourseCategoryMappingDO
>
{
}
src/main/java/com/subsidy/service/CourseDictService.java
View file @
6dad697
...
...
@@ -2,6 +2,7 @@ package com.subsidy.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.course.QueryCoursesDTO
;
import
com.subsidy.dto.course.UpdateCoursesDTO
;
import
com.subsidy.model.CourseDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -21,8 +22,10 @@ public interface CourseDictService extends IService<CourseDictDO> {
IPage
queryCourses
(
QueryCoursesDTO
queryCoursesDTO
);
String
updateCourses
(
CourseDictDO
courseDictD
O
);
String
updateCourses
(
UpdateCoursesDTO
updateCoursesDT
O
);
IPage
queryCompanyCourse
(
QueryCoursesDTO
queryCoursesDTO
);
String
updateOpenStatus
(
CourseDictDO
courseDictDO
);
}
src/main/java/com/subsidy/service/CourseJobMappingService.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
;
import
com.subsidy.model.CourseJobMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 课程-岗位映射表 服务类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
public
interface
CourseJobMappingService
extends
IService
<
CourseJobMappingDO
>
{
}
src/main/java/com/subsidy/service/CourseRankMappingService.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
;
import
com.subsidy.model.CourseRankMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 课程职级映射表 服务类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
public
interface
CourseRankMappingService
extends
IService
<
CourseRankMappingDO
>
{
}
src/main/java/com/subsidy/service/DepartmentDictService.java
View file @
6dad697
package
com
.
subsidy
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.department.GetDepartmentMembersDTO
;
import
com.subsidy.dto.department.GetDepartmentsVO
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -23,4 +25,6 @@ public interface DepartmentDictService extends IService<DepartmentDictDO> {
String
deleteDepartment
(
DepartmentDictDO
departmentDictDO
);
String
updateDepartment
(
DepartmentDictDO
departmentDictDO
);
IPage
getDepartmentMembers
(
GetDepartmentMembersDTO
getDepartmentMembersDTO
);
}
src/main/java/com/subsidy/service/RankDictService.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
;
import
com.subsidy.model.RankDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 职级字典表 服务类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
public
interface
RankDictService
extends
IService
<
RankDictDO
>
{
String
addRank
(
RankDictDO
rankDictDO
);
String
deleteRank
(
RankDictDO
rankDictDO
);
String
updateRank
(
RankDictDO
rankDictDO
);
List
<
RankDictDO
>
queryRanks
(
RankDictDO
rankDictDO
);
}
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
6dad697
...
...
@@ -10,6 +10,7 @@ import com.subsidy.dto.administer.ClassDailyInfoDTO;
import
com.subsidy.dto.administer.ClassDetailDTO
;
import
com.subsidy.dto.administer.ClassVodDailyInfoDTO
;
import
com.subsidy.dto.administer.ClassVodInfoDTO
;
import
com.subsidy.dto.administer.ManageMemberDTO
;
import
com.subsidy.dto.administer.MemberStudyLogDTO
;
import
com.subsidy.dto.administer.OperatorsDTO
;
import
com.subsidy.dto.member.ImportMemberDTO
;
...
...
@@ -21,10 +22,12 @@ import com.subsidy.mapper.CompanyDictMapper;
import
com.subsidy.mapper.CourseDictMapper
;
import
com.subsidy.mapper.DepartmentDictMapper
;
import
com.subsidy.mapper.ExerciseDoneResultMapper
;
import
com.subsidy.mapper.FieldDictMapper
;
import
com.subsidy.mapper.MemberDepartmentMappingMapper
;
import
com.subsidy.mapper.MemberMapper
;
import
com.subsidy.mapper.OprAdmDictMapper
;
import
com.subsidy.mapper.RoleAdministerMappingMapper
;
import
com.subsidy.mapper.SignInRecordMapper
;
import
com.subsidy.mapper.VodDictMapper
;
import
com.subsidy.mapper.VodPlayHistoryMapper
;
import
com.subsidy.model.AdministerDO
;
...
...
@@ -61,6 +64,7 @@ import com.subsidy.vo.administer.ExerciseTestVO;
import
com.subsidy.vo.administer.GetMemberPapersVO
;
import
com.subsidy.vo.administer.GetPaperDetailVO
;
import
com.subsidy.vo.administer.LoginVO
;
import
com.subsidy.vo.administer.ManageMemberVO
;
import
com.subsidy.vo.administer.MemberStudyLogVO
;
import
com.subsidy.vo.administer.OperatorsVO
;
import
com.subsidy.vo.administer.PermissionsVO
;
...
...
@@ -183,7 +187,10 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
private
OprAdmDictMapper
oprAdmDictMapper
;
@Autowired
private
FieldDictService
fieldDictService
;
private
FieldDictMapper
fieldDictMapper
;
@Autowired
private
SignInRecordMapper
signInRecordMapper
;
//@Autowired
//private MongoTemplate mongoTemplate;
...
...
@@ -319,21 +326,11 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
public
IPage
<
OperatorsVO
>
operators
(
OperatorsDTO
operatorsDTO
)
{
Page
pager
=
new
Page
(
operatorsDTO
.
getPageNum
(),
operatorsDTO
.
getPageSize
());
//判断该用户的角色
Integer
count
=
roleAdministerMappingMapper
.
selectCount
(
new
QueryWrapper
<
RoleAdministerMappingDO
>()
.
lambda
()
.
eq
(
RoleAdministerMappingDO:
:
getAdministerId
,
operatorsDTO
.
getId
())
.
eq
(
RoleAdministerMappingDO:
:
getRoleId
,
1
));
if
(
count
>
0
)
{
operatorsDTO
.
setId
(
null
);
}
IPage
<
OperatorsVO
>
operatorsVOIPage
=
companyDictMapper
.
operators
(
pager
,
operatorsDTO
.
getCompanyName
(),
operatorsDTO
.
getId
(),
operatorsDTO
.
getUserName
(),
0
);
IPage
<
OperatorsVO
>
operatorsVOIPage
=
companyDictMapper
.
operators
(
pager
,
operatorsDTO
.
getCompanyName
(),
operatorsDTO
.
getFieldId
());
List
<
OperatorsVO
>
operatorsVOS
=
operatorsVOIPage
.
getRecords
();
for
(
OperatorsVO
operatorsVO
:
operatorsVOS
){
//operatorsVO.getField()
for
(
OperatorsVO
operatorsVO
:
operatorsVOS
)
{
operatorsVO
.
setField
(
fieldDictMapper
.
queryCompanyFields
(
operatorsVO
.
getCompanyId
()));
}
return
operatorsVOIPage
;
...
...
@@ -392,57 +389,65 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
ClassSummaryVO
classSummaryVO
=
new
ClassSummaryVO
();
ClassDictDO
classDictDO
=
classDictMapper
.
selectById
(
classDetailDTO
.
getId
());
classSummaryVO
.
setClassId
(
classDetailDTO
.
getId
());
classSummaryVO
.
setClassName
(
classDictDO
.
getClassName
());
classSummaryVO
.
setStartDate
(
classDictDO
.
getStartDate
());
classSummaryVO
.
setEndDate
(
classDictDO
.
getEndDate
());
CourseDictDO
courseDictDO
=
courseDictMapper
.
selectById
(
classDictDO
.
getCourseId
());
classSummaryVO
.
setCourseName
(
courseDictDO
.
getCourseName
());
//班级人数
List
<
ClassMemberMappingDO
>
classMemberMappingDOS
=
classMemberMappingMapper
.
selectList
(
new
QueryWrapper
<
ClassMemberMappingDO
>()
.
lambda
()
.
eq
(
ClassMemberMappingDO:
:
getClassId
,
classDetailDTO
.
getId
()));
classSummaryVO
.
setMemberCount
(
classMemberMappingDOS
.
size
());
//课程
总数
//课程
由多少个视频
List
<
VodDictDO
>
vodDictDOS
=
classDictMapper
.
getClassVods
(
classDetailDTO
.
getId
());
classSummaryVO
.
setTotalVodCounts
(
vodDictDOS
.
size
());
/**
* 学生平均学习时长和平均学习次数
*/
int
totalStudyVods
=
0
;
int
totalStudyLength
=
0
;
//学生总共学习课时数
for
(
VodDictDO
vodDictDO
:
vodDictDOS
)
{
int
signCnt
=
0
;
int
testCnt
=
0
;
int
vodCnt
=
0
;
for
(
ClassMemberMappingDO
classMemberMappingDO
:
classMemberMappingDOS
)
{
int
totalLength
=
vodPlayHistoryMapper
.
memberVodTotalLength
(
classMemberMappingDO
.
getMemberId
(),
vodDictDO
.
getId
());
if
(
totalLength
>=
vodDictDO
.
getVodLength
())
{
totalStudyVods
++;
//签到
Integer
signCount
=
signInRecordMapper
.
selectCount
(
new
QueryWrapper
<
SignInRecordDO
>()
.
lambda
()
.
eq
(
SignInRecordDO:
:
getMemberId
,
classMemberMappingDO
.
getMemberId
())
.
eq
(
SignInRecordDO:
:
getClassId
,
classDetailDTO
.
getId
()));
if
(
signCount
>
0
)
{
signCnt
++;
}
//测试
int
testCount
=
exerciseDoneResultMapper
.
selectCount
(
new
QueryWrapper
<
ExerciseDoneResultDO
>()
.
lambda
()
.
eq
(
ExerciseDoneResultDO:
:
getMemberId
,
classMemberMappingDO
.
getMemberId
())
.
eq
(
ExerciseDoneResultDO:
:
getClassId
,
classDetailDTO
.
getId
()));
if
(
testCount
>
0
)
{
testCnt
++;
}
//视频
int
i
=
0
;
for
(
VodDictDO
vodDictDO
:
vodDictDOS
)
{
int
totalPlayLength
=
vodPlayHistoryMapper
.
memberVodTotalLength
(
classMemberMappingDO
.
getMemberId
(),
vodDictDO
.
getId
());
if
(
totalPlayLength
>=
vodDictDO
.
getVodLength
())
{
i
++;
}
}
totalStudyLength
+=
totalLength
;
if
(
i
==
vodDictDOS
.
size
())
{
vodCnt
++;
}
}
classSummaryVO
.
setStudyVodCounts
(
MathUtil
.
intDivCeil
(
totalStudyVods
,
classMemberMappingDOS
.
size
()));
//平均完成时长 学生观看课程视频的全部时长/总人数
int
avg
=
MathUtil
.
intDivCeil
(
totalStudyLength
,
classMemberMappingDOS
.
size
());
classSummaryVO
.
setAvgVodPlayLength
(
avg
);
//签到人数 这个人签到了就算签过了
classSummaryVO
.
setSignCount
(
signCnt
);
//测试通过率
Integer
passNum
=
exerciseDoneResultMapper
.
getClassTestPassRate
(
classDictDO
.
getId
());
classSummaryVO
.
setPassRate
(
MathUtil
.
intDivFloorPercent
(
passNum
,
classSummaryVO
.
getMemberCount
()));
classSummaryVO
.
setPassCnt
(
testCnt
);
//视频看完人数
classSummaryVO
.
setVodCnt
(
vodCnt
);
//签到总次数
long
signCount
=
redisUtil
.
scan
(
"subsidySignInfo*:classId:"
+
classDictDO
.
getId
()
+
"*"
).
stream
().
count
();
classSummaryVO
.
setAvgSignCount
(
MathUtil
.
intDivCeil
(
signCount
,
classSummaryVO
.
getMemberCount
()));
//答疑数
Integer
count
=
answeringQuestionMapper
.
selectCount
(
new
QueryWrapper
<
AnsweringQuestionDO
>()
.
lambda
()
.
eq
(
AnsweringQuestionDO:
:
getClassId
,
classD
ictD
O
.
getId
()));
.
eq
(
AnsweringQuestionDO:
:
getClassId
,
classD
etailDT
O
.
getId
()));
classSummaryVO
.
setAnswerCount
(
count
);
return
classSummaryVO
;
}
...
...
@@ -1036,7 +1041,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
int
i
=
1
;
if
(
hashMap
!=
null
)
{
for
(
ClassDailyInfoVO
classDailyInfoVO
:
classDailyInfoVOS
){
for
(
ClassDailyInfoVO
classDailyInfoVO
:
classDailyInfoVOS
)
{
Row
r
=
sheet
.
createRow
(
ai
.
getAndIncrement
());
AtomicInteger
a
=
new
AtomicInteger
();
Cell
cell
=
r
.
createCell
(
at
.
getAndIncrement
());
...
...
@@ -1056,7 +1061,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
int
studyLength
=
0
;
for
(
String
tt
:
title
)
{
if
(!
"姓名"
.
equals
(
tt
)
&&
!
"完成率"
.
equals
(
tt
)
&&
!
"学习时长"
.
equals
(
tt
)&&
!
"序号"
.
equals
(
tt
))
{
if
(!
"姓名"
.
equals
(
tt
)
&&
!
"完成率"
.
equals
(
tt
)
&&
!
"学习时长"
.
equals
(
tt
)
&&
!
"序号"
.
equals
(
tt
))
{
Cell
cell1
=
r
.
createCell
(
a
.
getAndIncrement
());
if
(
null
!=
hashMap
)
{
...
...
@@ -1115,8 +1120,8 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
});
if
(
hashMap
!=
null
)
{
int
i
=
1
;
for
(
Long
lg
:
memberIds
)
{
int
i
=
1
;
for
(
Long
lg
:
memberIds
)
{
Row
r
=
sheet
.
createRow
(
ai
.
getAndIncrement
());
AtomicInteger
a
=
new
AtomicInteger
();
Cell
cell
=
r
.
createCell
(
at
.
getAndIncrement
());
...
...
@@ -1130,7 +1135,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
namecell
.
setCellValue
(
memberMapper
.
selectById
(
lg
).
getUserName
());
int
total
=
0
;
for
(
String
date
:
dates
)
{
if
(!
date
.
equals
(
"姓名"
)
&&
!
"合计时长"
.
equals
(
date
)
&&
!
"序号"
.
equals
(
date
))
{
if
(!
date
.
equals
(
"姓名"
)
&&
!
"合计时长"
.
equals
(
date
)
&&
!
"序号"
.
equals
(
date
))
{
Cell
cell1
=
r
.
createCell
(
a
.
getAndIncrement
());
if
(
null
!=
hashMap1
)
{
total
+=
null
==
hashMap1
.
get
(
date
)
?
0
:
hashMap1
.
get
(
date
);
...
...
@@ -1338,6 +1343,11 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
return
ConstantUtils
.
ADD_SUCCESS
;
}
public
IPage
<
ManageMemberVO
>
manageMember
(
ManageMemberDTO
manageMemberDTO
)
{
Page
pager
=
new
Page
(
manageMemberDTO
.
getPageNum
(),
manageMemberDTO
.
getPageSize
());
return
memberMapper
.
manageMember
(
pager
,
null
,
manageMemberDTO
.
getUserName
());
}
public
String
userName
(
String
originName
,
int
i
,
Long
companyId
)
{
i
++;
List
<
MemberDO
>
memberDOS
=
memberMapper
.
selectList
(
new
QueryWrapper
<
MemberDO
>()
...
...
src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java
View file @
6dad697
...
...
@@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.subsidy.dto.classDict.AddClassDTO
;
import
com.subsidy.dto.classDict.AddMemberToClassDTO
;
import
com.subsidy.dto.classDict.GetSpareMembersDTO
;
import
com.subsidy.mapper.AnsweringQuestionMapper
;
import
com.subsidy.mapper.ClassDictMapper
;
import
com.subsidy.mapper.ClassMemberMappingMapper
;
import
com.subsidy.mapper.ClassNoticeMapper
;
import
com.subsidy.mapper.CompanyDictMapper
;
import
com.subsidy.mapper.CourseDictMapper
;
import
com.subsidy.mapper.RoleAdministerMappingMapper
;
import
com.subsidy.model.AnsweringQuestionDO
;
import
com.subsidy.model.ClassDictDO
;
import
com.subsidy.model.ClassMemberMappingDO
;
import
com.subsidy.model.ClassNoticeDO
;
...
...
@@ -22,6 +24,7 @@ import com.subsidy.service.ClassDictService;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.SMSUtils
;
import
com.subsidy.vo.classdict.GetAllClassesVO
;
import
com.subsidy.vo.classdict.GetClassBaseInfoVO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
...
...
@@ -53,6 +56,8 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
@Autowired
private
ClassNoticeMapper
classNoticeMapper
;
@Autowired
private
AnsweringQuestionMapper
answeringQuestionMapper
;
public
List
<
GetAllClassesVO
>
getAllClasses
(
ClassDictDO
classDictDO
)
{
return
this
.
baseMapper
.
getAllClasses
(
classDictDO
);
...
...
@@ -72,12 +77,12 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
//新建一个班级
ClassDictDO
classDictDO
=
new
ClassDictDO
();
BeanUtils
.
copyProperties
(
addClassDTO
,
classDictDO
);
BeanUtils
.
copyProperties
(
addClassDTO
,
classDictDO
);
this
.
baseMapper
.
insert
(
classDictDO
);
//班级里添加成员
List
<
Long
>
memberIds
=
addClassDTO
.
getMemberIds
();
for
(
Long
lg
:
memberIds
){
for
(
Long
lg
:
memberIds
)
{
ClassMemberMappingDO
classMemberMappingDO
=
new
ClassMemberMappingDO
();
classMemberMappingDO
.
setMemberId
(
lg
);
classMemberMappingDO
.
setClassId
(
classDictDO
.
getId
());
...
...
@@ -85,7 +90,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
//添加通知
List
<
ClassNoticeDO
>
classNoticeDOS
=
addClassDTO
.
getClassNoticeDOS
();
for
(
ClassNoticeDO
classNoticeDO
:
classNoticeDOS
)
{
for
(
ClassNoticeDO
classNoticeDO
:
classNoticeDOS
)
{
classNoticeDO
.
setClassId
(
classDictDO
.
getId
());
classNoticeMapper
.
insert
(
classNoticeDO
);
}
...
...
@@ -106,18 +111,27 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
.
lambda
()
.
eq
(
ClassMemberMappingDO:
:
getClassId
,
classMemberMappingDO
.
getClassId
())
.
eq
(
ClassMemberMappingDO:
:
getMemberId
,
classMemberMappingDO
.
getMemberId
()));
//签到记录
//做题记录
//答疑记录也删除
answeringQuestionMapper
.
delete
(
new
QueryWrapper
<
AnsweringQuestionDO
>()
.
lambda
()
.
eq
(
AnsweringQuestionDO:
:
getAskId
,
classMemberMappingDO
.
getMemberId
())
.
eq
(
AnsweringQuestionDO:
:
getClassId
,
classMemberMappingDO
.
getClassId
()));
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
List
<
MemberDO
>
getSpareMembers
(
GetSpareMembersDTO
getSpareMembersDTO
){
public
List
<
MemberDO
>
getSpareMembers
(
GetSpareMembersDTO
getSpareMembersDTO
)
{
return
this
.
baseMapper
.
getSpareMembers
(
getSpareMembersDTO
);
}
public
String
addMemberToClass
(
AddMemberToClassDTO
addMemberToClassDTO
){
public
String
addMemberToClass
(
AddMemberToClassDTO
addMemberToClassDTO
)
{
List
<
Long
>
memberIds
=
addMemberToClassDTO
.
getMemberIds
();
for
(
Long
lg
:
memberIds
){
for
(
Long
lg
:
memberIds
)
{
ClassMemberMappingDO
classMemberMappingDO
=
new
ClassMemberMappingDO
();
classMemberMappingDO
.
setClassId
(
addMemberToClassDTO
.
getClassId
());
classMemberMappingDO
.
setMemberId
(
lg
);
...
...
@@ -126,7 +140,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return
ConstantUtils
.
ADD_SUCCESS
;
}
public
String
batchSms
(
ClassDictDO
classDictDO
){
public
String
batchSms
(
ClassDictDO
classDictDO
)
{
ClassDictDO
classDictDO1
=
this
.
baseMapper
.
selectById
(
classDictDO
.
getId
());
CourseDictDO
courseDictDO
=
courseDictMapper
.
selectById
(
classDictDO1
.
getCourseId
());
...
...
@@ -136,17 +150,21 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
List
<
MemberDO
>
memberDOS
=
this
.
baseMapper
.
classMembers
(
classDictDO
.
getId
());
StringBuilder
telephone
=
new
StringBuilder
();
String
param
=
"{\"company\":\""
+
companyDictDO
.
getCompanyName
()+
"\",\"course\":\""
+
courseDictDO
.
getCourseName
()+
"\",\"startDate\":\""
+
classDictDO1
.
getStartDate
()
+
"\",\"endDate\":\""
+
classDictDO1
.
getEndDate
()
+
"\"}"
;
if
(
memberDOS
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
memberDOS
.
size
();
i
++)
{
String
param
=
"{\"company\":\""
+
companyDictDO
.
getCompanyName
()
+
"\",\"course\":\""
+
courseDictDO
.
getCourseName
()
+
"\",\"startDate\":\""
+
classDictDO1
.
getStartDate
()
+
"\",\"endDate\":\""
+
classDictDO1
.
getEndDate
()
+
"\"}"
;
if
(
memberDOS
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
memberDOS
.
size
();
i
++)
{
telephone
.
append
(
memberDOS
.
get
(
i
).
getTelephone
());
if
(
i
!=
memberDOS
.
size
()-
1
)
{
if
(
i
!=
memberDOS
.
size
()
-
1
)
{
telephone
.
append
(
","
);
}
}
SMSUtils
.
sendNoticeSMS
(
"SMS_228137810"
,
telephone
.
toString
(),
param
);
SMSUtils
.
sendNoticeSMS
(
"SMS_228137810"
,
telephone
.
toString
(),
param
);
}
return
ConstantUtils
.
SUCCESS_SEND_OUT
;
}
public
GetClassBaseInfoVO
getClassBaseInfo
(
ClassDictDO
classDictDO
)
{
return
this
.
baseMapper
.
getClassBaseInfo
(
classDictDO
.
getId
());
}
}
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
View file @
6dad697
...
...
@@ -10,12 +10,16 @@ import com.subsidy.dto.administer.OperatorsDTO;
import
com.subsidy.dto.company.AddCompanyDTO
;
import
com.subsidy.mapper.AdministerMapper
;
import
com.subsidy.mapper.CompanyDictMapper
;
import
com.subsidy.mapper.CompanyFieldMappingMapper
;
import
com.subsidy.mapper.DepartmentDictMapper
;
import
com.subsidy.mapper.FieldDictMapper
;
import
com.subsidy.mapper.RoleAdministerMappingMapper
;
import
com.subsidy.model.AdministerDO
;
import
com.subsidy.model.ClassHourDictDO
;
import
com.subsidy.model.CompanyDictDO
;
import
com.subsidy.model.CompanyFieldMappingDO
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.model.FieldDictDO
;
import
com.subsidy.model.RoleAdministerMappingDO
;
import
com.subsidy.service.CompanyDictService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -28,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -54,20 +59,23 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
@Autowired
private
RedisUtil
redisUtil
;
@Autowired
private
FieldDictMapper
fieldDictMapper
;
@Autowired
private
CompanyFieldMappingMapper
companyFieldMappingMapper
;
public
IPage
<
OperatorsVO
>
operators
(
OperatorsDTO
operatorsDTO
)
{
Page
pager
=
new
Page
(
operatorsDTO
.
getPageNum
(),
operatorsDTO
.
getPageSize
());
//判断该用户的角色
Integer
count
=
roleAdministerMappingMapper
.
selectCount
(
new
QueryWrapper
<
RoleAdministerMappingDO
>()
.
lambda
()
.
eq
(
RoleAdministerMappingDO:
:
getAdministerId
,
operatorsDTO
.
getId
())
.
eq
(
RoleAdministerMappingDO:
:
getRoleId
,
1
));
if
(
count
>
0
)
{
//后台管理员
operatorsDTO
.
setId
(
null
);
IPage
page
=
this
.
baseMapper
.
operators
(
pager
,
operatorsDTO
.
getCompanyName
(),
operatorsDTO
.
getFieldId
());
List
<
OperatorsVO
>
operatorsVOS
=
page
.
getRecords
();
for
(
OperatorsVO
operatorsVO
:
operatorsVOS
)
{
//查看公司所在行业
List
<
FieldDictDO
>
fieldDictDOS
=
fieldDictMapper
.
queryCompanyFields
(
operatorsVO
.
getCompanyId
());
operatorsVO
.
setField
(
fieldDictDOS
);
}
return
this
.
baseMapper
.
operators
(
pager
,
operatorsDTO
.
getCompanyName
(),
operatorsDTO
.
getId
(),
operatorsDTO
.
getUserName
(),
1
)
;
page
.
setRecords
(
operatorsVOS
);
return
page
;
}
public
String
addOperator
(
AddCompanyDTO
addCompanyDTO
)
{
...
...
@@ -76,7 +84,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
.
lambda
()
.
eq
(
CompanyDictDO:
:
getCompanyName
,
addCompanyDTO
.
getAccountName
()));
if
(
count
>
0
)
{
if
(
count
>
0
)
{
throw
new
HttpException
(
20002
);
}
...
...
@@ -124,6 +132,15 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
classHourDictDO2
.
setRepeatStatus
(
0
);
classHourDictDO2
.
setRepeatTime
(
3
);
redisUtil
.
set
(
RedisPrefixConstant
.
SUBSIDY_SETTINGS_PREFIX
+
companyDictDO
.
getId
(),
classHourDictDO2
);
//行业
List
<
Long
>
fields
=
addCompanyDTO
.
getField
();
for
(
Long
lg
:
fields
)
{
CompanyFieldMappingDO
companyFieldMappingDO
=
new
CompanyFieldMappingDO
();
companyFieldMappingDO
.
setCompanyId
(
companyDictDO
.
getId
());
companyFieldMappingDO
.
setFieldId
(
lg
);
companyFieldMappingMapper
.
insert
(
companyFieldMappingDO
);
}
return
ConstantUtils
.
ADD_SUCCESS
;
}
...
...
@@ -135,7 +152,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
.
lambda
()
.
eq
(
AdministerDO:
:
getCompanyId
,
companyDictDO
.
getId
()));
redisUtil
.
del
(
RedisPrefixConstant
.
SUBSIDY_SETTINGS_PREFIX
+
companyDictDO
.
getId
());
redisUtil
.
del
(
RedisPrefixConstant
.
SUBSIDY_SETTINGS_PREFIX
+
companyDictDO
.
getId
());
return
ConstantUtils
.
DELETE_SUCCESS
;
}
...
...
@@ -145,6 +162,20 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
BeanUtils
.
copyProperties
(
addCompanyDTO
,
companyDictDO
);
this
.
baseMapper
.
updateById
(
companyDictDO
);
if
(
addCompanyDTO
.
getField
().
size
()
>
0
)
{
companyFieldMappingMapper
.
delete
(
new
QueryWrapper
<
CompanyFieldMappingDO
>()
.
lambda
()
.
eq
(
CompanyFieldMappingDO:
:
getCompanyId
,
addCompanyDTO
.
getId
()));
List
<
Long
>
longs
=
addCompanyDTO
.
getField
();
for
(
Long
lg
:
longs
)
{
CompanyFieldMappingDO
companyFieldMappingDO
=
new
CompanyFieldMappingDO
();
companyFieldMappingDO
.
setFieldId
(
lg
);
companyFieldMappingDO
.
setCompanyId
(
addCompanyDTO
.
getId
());
companyFieldMappingMapper
.
insert
(
companyFieldMappingDO
);
}
}
//查找企业管理员
AdministerDO
administerDO
=
administerMapper
.
selectOne
(
new
QueryWrapper
<
AdministerDO
>()
.
lambda
()
...
...
src/main/java/com/subsidy/service/impl/CourseCategoryMappingServiceImpl.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.CourseCategoryMappingDO
;
import
com.subsidy.mapper.CourseCategoryMappingMapper
;
import
com.subsidy.service.CourseCategoryMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 课程类目映射 服务实现类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Service
public
class
CourseCategoryMappingServiceImpl
extends
ServiceImpl
<
CourseCategoryMappingMapper
,
CourseCategoryMappingDO
>
implements
CourseCategoryMappingService
{
}
src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java
View file @
6dad697
This diff is collapsed.
Click to expand it.
src/main/java/com/subsidy/service/impl/CourseJobMappingServiceImpl.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.CourseJobMappingDO
;
import
com.subsidy.mapper.CourseJobMappingMapper
;
import
com.subsidy.service.CourseJobMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 课程-岗位映射表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Service
public
class
CourseJobMappingServiceImpl
extends
ServiceImpl
<
CourseJobMappingMapper
,
CourseJobMappingDO
>
implements
CourseJobMappingService
{
}
src/main/java/com/subsidy/service/impl/CourseRankMappingServiceImpl.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.CourseRankMappingDO
;
import
com.subsidy.mapper.CourseRankMappingMapper
;
import
com.subsidy.service.CourseRankMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 课程职级映射表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Service
public
class
CourseRankMappingServiceImpl
extends
ServiceImpl
<
CourseRankMappingMapper
,
CourseRankMappingDO
>
implements
CourseRankMappingService
{
}
src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
View file @
6dad697
package
com
.
subsidy
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.dto.department.GetDepartmentMembersDTO
;
import
com.subsidy.dto.department.GetDepartmentsVO
;
import
com.subsidy.mapper.MemberDepartmentMappingMapper
;
import
com.subsidy.mapper.MemberMapper
;
import
com.subsidy.model.DepartmentDictDO
;
import
com.subsidy.mapper.DepartmentDictMapper
;
import
com.subsidy.model.MemberDepartmentMappingDO
;
...
...
@@ -32,6 +36,9 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
@Autowired
private
MemberDepartmentMappingMapper
memberDepartmentMappingMapper
;
@Autowired
private
MemberMapper
memberMapper
;
public
List
<
GetDepartmentsVO
>
getDepartments
(
DepartmentDictDO
departmentDictDO
)
{
//返回结果
...
...
@@ -45,14 +52,14 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
for
(
DepartmentDictDO
dd
:
parentNodes
)
{
GetDepartmentsVO
getDepartmentsVO
=
new
GetDepartmentsVO
();
BeanUtils
.
copyProperties
(
dd
,
getDepartmentsVO
);
BeanUtils
.
copyProperties
(
dd
,
getDepartmentsVO
);
Integer
count
=
memberDepartmentMappingMapper
.
selectCount
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getDepartmentId
,
dd
.
getId
()));
.
eq
(
MemberDepartmentMappingDO:
:
getDepartmentId
,
dd
.
getId
()));
getDepartmentsVO
.
setCnt
(
count
);
getDepartmentsVO
.
setChildren
(
getChildNodes
(
getDepartmentsVO
));
DepartmentDictDO
departmentDictDO1
=
this
.
baseMapper
.
selectById
(
dd
.
getParentId
());
if
(
null
!=
departmentDictDO1
){
if
(
null
!=
departmentDictDO1
)
{
getDepartmentsVO
.
setParentDepartmentName
(
departmentDictDO1
.
getDepartmentName
());
}
getDepartmentsVOS
.
add
(
getDepartmentsVO
);
...
...
@@ -78,15 +85,15 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
for
(
DepartmentDictDO
departmentDictDO1
:
departmentDictDOS
)
{
GetDepartmentsVO
getDepartmentsVO
=
new
GetDepartmentsVO
();
BeanUtils
.
copyProperties
(
departmentDictDO1
,
getDepartmentsVO
);
BeanUtils
.
copyProperties
(
departmentDictDO1
,
getDepartmentsVO
);
getDepartmentsVO
.
setChildren
(
getChildNodes
(
getDepartmentsVO
));
Integer
count
=
memberDepartmentMappingMapper
.
selectCount
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getDepartmentId
,
getDepartmentsVO
.
getId
()));
.
eq
(
MemberDepartmentMappingDO:
:
getDepartmentId
,
getDepartmentsVO
.
getId
()));
getDepartmentsVO
.
setCnt
(
count
);
DepartmentDictDO
departmentDictDO2
=
this
.
baseMapper
.
selectById
(
departmentDictDO1
.
getParentId
());
if
(
null
!=
departmentDictDO2
)
{
if
(
null
!=
departmentDictDO2
)
{
getDepartmentsVO
.
setParentDepartmentName
(
departmentDictDO2
.
getDepartmentName
());
}
getDepartmentsVOS
.
add
(
getDepartmentsVO
);
...
...
@@ -122,7 +129,7 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
.
eq
(
DepartmentDictDO:
:
getParentId
,
departmentDictDO
.
getId
())
);
for
(
DepartmentDictDO
departmentDictDO1
:
departmentDictDOS
)
{
for
(
DepartmentDictDO
departmentDictDO1
:
departmentDictDOS
)
{
deleteChildNode
(
departmentDictDO1
);
}
...
...
@@ -157,4 +164,19 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
return
ConstantUtils
.
SET_SUCCESS
;
}
public
IPage
getDepartmentMembers
(
GetDepartmentMembersDTO
getDepartmentMembersDTO
)
{
Page
pager
=
new
Page
(
getDepartmentMembersDTO
.
getPageNum
(),
getDepartmentMembersDTO
.
getPageSize
());
if
(
null
!=
getDepartmentMembersDTO
.
getDepartmentId
()){
//查询某个部门
IPage
iPage
=
memberMapper
.
getMembers
(
pager
,
getDepartmentMembersDTO
.
getDepartmentId
(),
getDepartmentMembersDTO
.
getUserName
(),
null
);
return
iPage
;
}
else
{
//查询整个公司
IPage
iPage
=
memberMapper
.
manageMember
(
pager
,
getDepartmentMembersDTO
.
getCompanyId
(),
getDepartmentMembersDTO
.
getUserName
());
return
iPage
;
}
}
}
src/main/java/com/subsidy/service/impl/RankDictServiceImpl.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.model.RankDictDO
;
import
com.subsidy.mapper.RankDictMapper
;
import
com.subsidy.service.RankDictService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
org.apache.poi.ss.formula.functions.Rank
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 职级字典表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-02-14
*/
@Service
public
class
RankDictServiceImpl
extends
ServiceImpl
<
RankDictMapper
,
RankDictDO
>
implements
RankDictService
{
public
String
addRank
(
RankDictDO
rankDictDO
)
{
int
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
RankDictDO
>()
.
lambda
()
.
eq
(
RankDictDO:
:
getCompanyId
,
rankDictDO
.
getCompanyId
())
.
eq
(
RankDictDO:
:
getRank
,
rankDictDO
.
getRank
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
12001
);
}
this
.
baseMapper
.
insert
(
rankDictDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
}
public
String
deleteRank
(
RankDictDO
rankDictDO
)
{
this
.
baseMapper
.
deleteById
(
rankDictDO
.
getId
());
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
String
updateRank
(
RankDictDO
rankDictDO
)
{
int
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
RankDictDO
>()
.
lambda
()
.
eq
(
RankDictDO:
:
getCompanyId
,
rankDictDO
.
getCompanyId
())
.
eq
(
RankDictDO:
:
getRank
,
rankDictDO
.
getRank
())
.
ne
(
RankDictDO:
:
getId
,
rankDictDO
.
getId
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
12001
);
}
this
.
baseMapper
.
updateById
(
rankDictDO
);
return
ConstantUtils
.
SET_SUCCESS
;
}
public
List
<
RankDictDO
>
queryRanks
(
RankDictDO
rankDictDO
){
return
this
.
baseMapper
.
queryCompanyRanks
(
rankDictDO
.
getCompanyId
());
}
}
src/main/java/com/subsidy/vo/administer/ClassSummaryVO.java
View file @
6dad697
...
...
@@ -7,44 +7,25 @@ public class ClassSummaryVO {
private
Long
classId
;
private
String
className
;
private
String
courseName
;
private
String
startDate
;
private
String
endDate
;
/**
* 学员总数
*/
private
Integer
memberCount
;
/**
* 课程进度
*/
private
Integer
studyVodCounts
;
/**
* 总课时
*/
private
Integer
totalVodCounts
;
/**
* 平均时长
* 视频学习完人数
*/
private
Integer
avgVodPlayLength
;
private
Integer
vodCnt
;
/**
* 测试
通过率
* 测试
人数
*/
private
Integer
pass
Rate
;
private
Integer
pass
Cnt
;
/**
*
平均
签到数
* 签到数
*/
private
Integer
avgS
ignCount
;
private
Integer
s
ignCount
;
/**
* 答疑数
...
...
src/main/java/com/subsidy/vo/administer/ManageMemberVO.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
vo
.
administer
;
import
lombok.Data
;
@Data
public
class
ManageMemberVO
{
private
Long
id
;
private
String
userName
;
private
String
telephone
;
private
String
idCard
;
private
String
companyName
;
private
String
accountName
;
}
src/main/java/com/subsidy/vo/administer/OperatorsVO.java
View file @
6dad697
...
...
@@ -22,11 +22,13 @@ public class OperatorsVO {
private
String
img
;
private
String
address
;
private
String
companyName
;
private
String
accountName
;
private
Integer
companyId
;
private
Long
companyId
;
private
String
logo
;
}
src/main/java/com/subsidy/vo/classdict/GetAllClassesVO.java
View file @
6dad697
...
...
@@ -21,4 +21,7 @@ public class GetAllClassesVO {
private
String
classType
;
private
String
openStatus
;
}
src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java
0 → 100644
View file @
6dad697
package
com
.
subsidy
.
vo
.
classdict
;
import
lombok.Data
;
@Data
public
class
GetClassBaseInfoVO
{
private
String
classType
;
private
String
courseName
;
private
Integer
count
;
private
String
startDate
;
private
String
endDate
;
}
src/main/java/com/subsidy/vo/course/QueryCoursesVO.java
View file @
6dad697
package
com
.
subsidy
.
vo
.
course
;
import
com.subsidy.model.CategoryDO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.FieldDictDO
;
import
com.subsidy.model.JobDictDO
;
import
com.subsidy.model.RankDictDO
;
import
lombok.Data
;
import
org.apache.poi.ss.formula.functions.Rank
;
import
java.util.List
;
@Data
public
class
QueryCoursesVO
{
private
String
name
;
private
Long
id
;
/**
...
...
@@ -21,9 +26,9 @@ public class QueryCoursesVO {
private
String
courseName
;
/**
*
类目id
*
封面
*/
private
Long
categoryId
;
private
String
coverPage
;
/**
* 课程类型
...
...
@@ -31,8 +36,44 @@ public class QueryCoursesVO {
private
String
courseType
;
/**
* 课程来源
* 课程时长
*/
private
Integer
vodLength
;
/**
* 课时
*/
private
Integer
vodCounts
;
/**
* 测试数量
*/
private
Integer
paperCount
;
/**
* 开放状态
*/
private
Integer
openStatus
;
/**
* 行业范围
*/
private
List
<
FieldDictDO
>
fieldDictDOS
;
/**
* 课程类目
*/
private
List
<
CategoryDO
>
categoryDOS
;
/**
* 适用岗位
*/
private
List
<
JobDictDO
>
jobDictDOS
;
/**
* 适用职级
*/
private
String
courseSource
;
private
List
<
RankDictDO
>
rankDictDOS
;
}
src/main/resources/application.properties
View file @
6dad697
# 环境配置
spring.profiles.active
=
prod
spring.profiles.active
=
dev
# 端口号
spring.server.port
=
2345
9
spring.server.port
=
2345
7
#嵌入tomcat配置
#和CPU数
spring.server.acceptorThreadCount
=
600
...
...
src/main/resources/code.properties
View file @
6dad697
...
...
@@ -43,3 +43,5 @@ meishu.code-message[90001]=该类目已存在
meishu.code-message[10001]=导入失败
meishu.code-message[11001]=该行业已存在
meishu.code-message[12001]=该职级已存在
src/main/resources/mapper/CategoryMapper.xml
View file @
6dad697
...
...
@@ -19,4 +19,15 @@
id, name
</sql>
<select
id=
"queryCourseCategory"
parameterType=
"long"
resultType=
"com.subsidy.model.CategoryDO"
>
SELECT
t2.*
FROM
course_category_mapping t
LEFT JOIN category t2 ON t.category_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.course_id = #{courseId}
</select>
</mapper>
src/main/resources/mapper/ClassDictMapper.xml
View file @
6dad697
...
...
@@ -31,19 +31,29 @@
t.start_date,
t.end_date,
t4.cnt,
t.class_type
t5.class_type,
t.open_status
FROM
class_dict t
left join class_type_dict t5 on t.class_type_id = t5.id
LEFT JOIN course_dict t2 ON t.course_id = t2.id
LEFT JOIN ( SELECT t3.class_id, sum( 1 ) AS cnt FROM class_member_mapping t3 WHERE t3.delete_date IS NULL GROUP
BY t3.class_id ) t4 ON t.id = t4.class_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t5.delete_date is null
and t.company_id = #{companyId}
<if
test=
"className != null and className !=''"
>
and t.class_name like concat('%',#{className} ,'%')
</if>
<if
test=
"startDate != null and endDate != null"
>
and t.end_date >= DATE_FORMAT( #{startDate}, '%Y-%m-%d' )
and t.start_date
<
DATE_FORMAT( #{endDateDate}, '%Y-%m-%d' )
</if>
<if
test=
"openStatus != null and openStatus != ''"
>
and t.open_status = #{openStatus}
</if>
order by t.create_date desc
</select>
...
...
@@ -117,4 +127,22 @@
AND t.class_id = #{classId}
</select>
<select
id=
"getClassBaseInfo"
parameterType=
"long"
resultType=
"com.subsidy.vo.classdict.GetClassBaseInfoVO"
>
SELECT
t3.class_type,
t2.course_name,
t.start_date,
t.end_date,
ifnull( t4.cnt, 0 ) AS cnt
FROM
class_dict t
LEFT JOIN course_dict t2 ON t.course_id = t2.id
LEFT JOIN class_type_dict t3 ON t.class_type_id = t3.id
LEFT JOIN ( SELECT t.class_id, count( 1 ) AS cnt FROM class_member_mapping t WHERE t.delete_date IS NULL AND t.class_id = #{classId} ) t4 ON t.id = t4.class_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t.id = #{classId}
</select>
</mapper>
src/main/resources/mapper/CompanyDictMapper.xml
View file @
6dad697
...
...
@@ -30,21 +30,20 @@
t.account_name,
t.img,
t2.company_name,
t2.logo
t2.logo,
t2.address
FROM
administer t
left join company_dict t2 on t.company_id = t2.id
left join company_field_mapping t3 on t2.id = t3.company_id
WHERE
t.delete_date IS NULL
AND t.role = #{role}
and role = 1
<if
test=
"companyName != null and companyName != ''"
>
and t2.company_name like concat('%',#{companyName} ,'%')
</if>
<if
test=
"userName != null and userName != ''"
>
and t.user_name like concat('%',#{userName} ,'%')
</if>
<if
test=
"id != null and id !=''"
>
and t.id = #{id}
<if
test=
"fieldId != null and fieldId != ''"
>
and t3.field_id = #{fieldId}
</if>
</select>
...
...
src/main/resources/mapper/CourseCategoryMappingMapper.xml
0 → 100644
View file @
6dad697
<?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.CourseCategoryMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CourseCategoryMappingDO"
>
<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=
"category_id"
property=
"categoryId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, course_id, category_id
</sql>
</mapper>
src/main/resources/mapper/CourseDictMapper.xml
View file @
6dad697
...
...
@@ -17,32 +17,47 @@
<!-- 通用查询结果列 -->
<select
id=
"queryCourses"
resultType=
"com.subsidy.vo.course.QueryCoursesVO"
>
SELECT
t.*,
t2.name
t.id,
t.course_name,
t.course_rank,
t.course_type,
t.open_status
FROM
course_dict t
left join category t2 on t.category_id = t2.id
LEFT JOIN course_field_mapping t2 ON t.id = t2.course_id
LEFT JOIN course_category_mapping t3 ON t.id = t3.course_id
LEFT JOIN course_job_mapping t4 ON t.id = t4.course_id
left join course_rank_mapping t5 on t.id = t5.course_id
WHERE
t.delete_date IS NULL
<if
test=
"companyId != null and companyId !=''"
>
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t4.delete_date IS NULL
and t5.delete_date is null
<if
test=
"companyId != null and companyId != ''"
>
and t.company_id = #{companyId}
</if>
<if
test=
"companyId ==null"
>
<if
test=
"companyId ==
null"
>
and t.company_id is null
</if>
<if
test=
"categoryId != null"
>
AND t.category_id = #{categoryId}
</if>
<if
test=
"courseName != null and courseName !=''"
>
AND t.course_name like concat('%',#{courseName} ,'%')
</if>
<if
test=
"courseSource != null and courseSource != ''"
>
AND t.course_source = #{courseSource}
</if>
<if
test=
"courseType != null and courseType !=''"
>
AND t.course_type = #{courseType}
</if>
<if
test=
"jobId != null and jobId != ''"
>
and t4.job_id = #{jobId}
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
and t3.category_id = #{categoryId}
</if>
<if
test=
"fieldId != null and fieldId != ''"
>
and t2.field_id = #{field}
</if>
<if
test=
"rankId != null and rankId != ''"
>
and t5.rank_id = #{rankId}
</if>
</select>
<sql
id=
"Base_Column_List"
>
...
...
@@ -90,37 +105,32 @@
AND t.administer_id is null
</select>
<select
id=
"queryCo
mpanyCourse"
resultType=
"com.subsidy.vo.course.QueryCoursesVO
"
>
<select
id=
"queryCo
urseCnt"
parameterType=
"long"
resultType=
"integer
"
>
SELECT
t.id,
t.company_id,
t.course_name,
t.category_id,
t.course_type,
t.course_source,
t2.name
count( 1 )
FROM
course_dict t
left join category t2 on t.category_id = t2.
id
course_content t1
LEFT JOIN vod_dict t2 ON t1.id = t2.content_
id
WHERE
t.delete_date IS NULL
<if
test=
"categoryId != null"
>
AND t.category_id = #{categoryId}
</if>
<if
test=
"courseName != null and courseName !=''"
>
AND t.course_name like concat('%',#{courseName} ,'%')
</if>
<if
test=
"courseSource != null and courseSource != ''"
>
AND t.course_source = #{courseSource}
</if>
<if
test=
"courseType != null and courseType !=''"
>
AND t.course_type = #{courseType}
</if>
<if
test=
"companyId !=null and companyId !='' "
>
AND t.company_id = #{companyId}
</if>
t1.delete_date IS NULL
AND t2.delete_date IS NULL
AND t1.course_id = #{courseId}
</select>
<select
id=
"queryCoursePlayLength"
parameterType=
"long"
resultType=
"integer"
>
SELECT
sum( t2.vod_length )
FROM
course_content t1
LEFT JOIN vod_dict t2 ON t1.id = t2.content_id
WHERE
t1.delete_date IS NULL
AND t2.delete_date IS NULL
AND t1.course_id = #{courseId}
</select>
<update
id=
"updateOpenStatus"
>
update course_dict set open_status = #{openStatus} where id = #{id}
</update>
</mapper>
src/main/resources/mapper/CourseJobMappingMapper.xml
0 → 100644
View file @
6dad697
<?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.CourseJobMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CourseJobMappingDO"
>
<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=
"job_id"
property=
"jobId"
/>
<result
column=
"course_id"
property=
"courseId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, job_id, course_id
</sql>
</mapper>
src/main/resources/mapper/CourseRankMappingMapper.xml
0 → 100644
View file @
6dad697
<?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.CourseRankMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CourseRankMappingDO"
>
<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=
"rank_id"
property=
"rankId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, course_id, rank_id
</sql>
</mapper>
src/main/resources/mapper/DepartmentDictMapper.xml
View file @
6dad697
...
...
@@ -33,4 +33,5 @@
<!-- AND t.company_id =#{companyId}-->
<!-- </select>-->
</mapper>
src/main/resources/mapper/FieldDictMapper.xml
View file @
6dad697
...
...
@@ -30,4 +30,27 @@
AND t.field_name LIKE concat('%',#{fieldName} ,'%')
</select>
<select
id=
"queryCompanyFields"
parameterType=
"long"
resultType=
"com.subsidy.model.FieldDictDO"
>
SELECT
t2.*
FROM
company_field_mapping t
LEFT JOIN field_dict t2 ON t.field_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
</select>
<select
id=
"queryCourseFields"
parameterType=
"long"
resultType=
"com.subsidy.model.FieldDictDO"
>
SELECT
t2.*
FROM
course_field_mapping t
LEFT JOIN field_dict t2 ON t.field_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.course_id = #{courseId}
</select>
</mapper>
src/main/resources/mapper/JobDictMapper.xml
View file @
6dad697
...
...
@@ -21,4 +21,16 @@
id, company_id, job_name, order_no
</sql>
<select
id=
"queryCourseJobs"
parameterType=
"long"
resultType=
"com.subsidy.model.JobDictDO"
>
SELECT
t2.*
FROM
course_job_mapping t
LEFT JOIN job_dict t2 ON t.job_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.course_id = #{courseId}
</select>
</mapper>
src/main/resources/mapper/MemberMapper.xml
View file @
6dad697
...
...
@@ -184,4 +184,26 @@
</if>
</select>
<select
id=
"manageMember"
parameterType=
"string"
resultType=
"com.subsidy.vo.administer.ManageMemberVO"
>
SELECT
t.id,
t.user_name,
t.telephone,
t.id_card,
t.account_name,
t2.company_name
FROM
member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
<if
test=
"userName != null and userName != ''"
>
AND t.user_name LIKE concat('%',#{userName} ,'%')
</if>
<if
test=
"companyId != null and companyId != ''"
>
and t2.company_id = #{companyId}
</if>
</select>
</mapper>
src/main/resources/mapper/PaperDictMapper.xml
View file @
6dad697
...
...
@@ -49,4 +49,14 @@
AND t.paper_id = #{paperId}
</select>
<select
id=
"queryCoursePapersCnt"
parameterType=
"long"
resultType=
"integer"
>
SELECT
count( 1 )
FROM
paper_dict t
WHERE
t.delete_date IS NULL
AND t.course_id = #{courseId}
</select>
</mapper>
src/main/resources/mapper/RankDictMapper.xml
0 → 100644
View file @
6dad697
<?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.RankDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.RankDictDO"
>
<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=
"rank"
property=
"rank"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, rank
</sql>
<select
id=
"queryCourseRanks"
parameterType=
"long"
resultType=
"com.subsidy.model.RankDictDO"
>
SELECT
t2.*
FROM
course_rank_mapping t
LEFT JOIN rank_dict t2 ON t.rank_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.course_id = #{courseId}
</select>
<select
id=
"queryCompanyRanks"
parameterType=
"long"
resultType=
"com.subsidy.model.RankDictDO"
>
select * from rank_dict t where t.delete_date is null
<if
test=
"companyId!=null and companyId != ''"
>
and t.company_id = #{companyId}
</if>
<if
test=
"companyId == null"
>
and t.company_id is null
</if>
</select>
</mapper>
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