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 f9929fde
authored
Jan 05, 2024
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024.1 企业服务中心 开发前备份
1 parent
ccfd90c4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
844 additions
and
332 deletions
src/main/java/com/subsidy/controller/AdministerController.java
src/main/java/com/subsidy/controller/ClassDictController.java
src/main/java/com/subsidy/controller/CompanyDictController.java
src/main/java/com/subsidy/controller/CompanyMemberMappingController.java
src/main/java/com/subsidy/controller/DepartmentDictController.java
src/main/java/com/subsidy/dto/company/GetCompanyMembersDTO.java
src/main/java/com/subsidy/dto/department/GetDepartmentsVO.java
src/main/java/com/subsidy/dto/member/AddMemberDTO.java
src/main/java/com/subsidy/dto/member/CancerMemberDTO.java
src/main/java/com/subsidy/dto/member/ImportMemberDTO.java
src/main/java/com/subsidy/dto/member/InviteMemberDTO.java
src/main/java/com/subsidy/mapper/CompanyDictMapper.java
src/main/java/com/subsidy/mapper/CompanyMemberMappingMapper.java
src/main/java/com/subsidy/mapper/MemberDepartmentMappingMapper.java
src/main/java/com/subsidy/model/ClassDictDO.java
src/main/java/com/subsidy/model/CompanyDictDO.java
src/main/java/com/subsidy/model/CompanyMemberMappingDO.java
src/main/java/com/subsidy/model/MemberDO.java
src/main/java/com/subsidy/model/MemberDepartmentMappingDO.java
src/main/java/com/subsidy/service/AdministerService.java
src/main/java/com/subsidy/service/ClassDictService.java
src/main/java/com/subsidy/service/CompanyMemberMappingService.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/ClassHourDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
src/main/java/com/subsidy/service/impl/PushDataServiceImpl.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java
src/main/java/com/subsidy/vo/company/GetCompanyMembersVO.java
src/main/java/com/subsidy/vo/member/DownloadFailClassMembers.java
src/main/java/com/subsidy/vo/member/DownloadFailClassMembersDTO.java
src/main/java/com/subsidy/vo/member/DownloadFailMembersDTO.java
src/main/java/com/subsidy/vo/member/ImportClassMemberDTO.java
src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java
src/main/java/com/subsidy/vo/member/ImportMemberResultVO.java
src/main/java/com/subsidy/vo/member/ImportMemberVO.java
src/main/resources/code.properties
src/main/resources/mapper/AdministerMapper.xml
src/main/resources/mapper/AnsweringQuestionMapper.xml
src/main/resources/mapper/BusinessScopeDictMapper.xml
src/main/resources/mapper/CertCompanyMappingMapper.xml
src/main/resources/mapper/CertMemberMappingMapper.xml
src/main/resources/mapper/ClassDictMapper.xml
src/main/resources/mapper/ClassMemberMappingMapper.xml
src/main/resources/mapper/ClassTypeDictMapper.xml
src/main/resources/mapper/CompanyDictMapper.xml
src/main/resources/mapper/CompanyFieldMappingMapper.xml
src/main/resources/mapper/CompanyMemberMappingMapper.xml
src/main/resources/mapper/DudaoMapper.xml
src/main/resources/mapper/JobDictMapper.xml
src/main/resources/mapper/MemberDepartmentMappingMapper.xml
src/main/resources/mapper/MemberMapper.xml
src/main/resources/mapper/OprMemDictMapper.xml
src/main/resources/mapper/PushImageDataMapper.xml
src/main/resources/mapper/RotationImgDictMapper.xml
src/main/java/com/subsidy/controller/AdministerController.java
View file @
f9929fd
...
...
@@ -7,6 +7,7 @@ import com.subsidy.common.interceptor.LoginRequired;
import
com.subsidy.dto.administer.*
;
import
com.subsidy.model.*
;
import
com.subsidy.service.AdministerService
;
import
com.subsidy.vo.member.DownloadFailMembersDTO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
/**
* <p>
* 管理平台用户 前端控制器
...
...
@@ -250,6 +253,12 @@ public class AdministerController {
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
importMember
(
companyId
,
file
));
}
@PostMapping
(
"downloadFailMembers"
)
@ApiOperation
(
"下载失败的学员 importMemberVOS[] 字段是导出失败的字段"
)
public
void
downloadFailMembers
(
@RequestBody
DownloadFailMembersDTO
downloadFailMembersDTO
){
administerService
.
downloadFailMembers
(
downloadFailMembersDTO
);
}
@PostMapping
(
"manageMember"
)
@ApiOperation
(
"用户管理 {pageSize pageNum userName:名字 }"
)
@LoginRequired
...
...
src/main/java/com/subsidy/controller/ClassDictController.java
View file @
f9929fd
...
...
@@ -13,14 +13,13 @@ import com.subsidy.model.ClassDictDO;
import
com.subsidy.model.ClassMemberMappingDO
;
import
com.subsidy.service.ClassDictService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.vo.member.DownloadFailClassMembers
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.annotation.CachePut
;
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
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
/**
* <p>
...
...
@@ -53,7 +52,7 @@ public class ClassDictController {
}
@PostMapping
(
"addClass"
)
@ApiOperation
(
"添加班级 userId:登录人id companyId courseId classTypeId(证书课程的话传0) className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]"
)
@ApiOperation
(
"添加班级 userId:登录人id companyId courseId classType
classType
Id(证书课程的话传0) className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]"
)
@LoginRequired
public
ResponseVO
addClass
(
@RequestBody
AddClassDTO
addClassDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addClass
(
addClassDTO
));
...
...
@@ -61,7 +60,7 @@ public class ClassDictController {
@PostMapping
(
"updateClass"
)
@ApiOperation
(
"修改班级 id className classTypeId startDate endDate isOrder 是否按顺序播放 isFastPlay 是否允许快进 "
+
"testRule:测试规则 limitHour 学习上限时长 imageClassCheck:首次进入班级时人脸验证 imageTestCheck:测试前人脸识别验证"
+
"testRule:测试规则
classType
limitHour 学习上限时长 imageClassCheck:首次进入班级时人脸验证 imageTestCheck:测试前人脸识别验证"
+
"activityDetection:活跃度检测开启/关闭 activityDetectionMethod:活跃度检测方式 firstDragAllowed:首次播放允许拖曳"
+
"firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 classCode"
)
@LoginRequired
...
...
@@ -125,6 +124,17 @@ public class ClassDictController {
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getAllCertClasses
(
classDictDO
));
}
@PostMapping
(
"importClassMembers"
)
@ApiOperation
(
"班级导入学员 file companyId"
)
public
ResponseVO
importClassMembers
(
@RequestParam
(
"file"
)
MultipartFile
file
,
Long
companyId
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
importClassMembers
(
file
,
companyId
));
}
@PostMapping
(
"downloadFailClassMembers"
)
@ApiOperation
(
"下载导入失败的班级学员 downloadFailClassMembersDTOS[] 失败返回的那些字段"
)
public
void
downloadFailClassMembers
(
@RequestBody
DownloadFailClassMembers
downloadFailClassMembers
){
classDictService
.
downloadFailClassMembers
(
downloadFailClassMembers
);
}
}
src/main/java/com/subsidy/controller/CompanyDictController.java
View file @
f9929fd
...
...
@@ -88,7 +88,7 @@ public class CompanyDictController {
}
@PostMapping
(
"getCompanyMembers"
)
@ApiOperation
(
"获取公司里的成员 pageNum pageSize companyId 公司id userName 成员名称"
)
@ApiOperation
(
"获取公司里的成员 pageNum pageSize companyId 公司id userName 成员名称
memberStatus
"
)
@LoginRequired
public
ResponseVO
getCompanyMembers
(
@RequestBody
GetCompanyMembersDTO
getCompanyMembersDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyDictService
.
getCompanyMembers
(
getCompanyMembersDTO
));
...
...
src/main/java/com/subsidy/controller/CompanyMemberMappingController.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.dto.member.CancerMemberDTO
;
import
com.subsidy.dto.member.InviteMemberDTO
;
import
com.subsidy.mapper.CompanyMemberMappingMapper
;
import
com.subsidy.model.CompanyMemberMappingDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.service.CompanyMemberMappingService
;
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 Tuyp
* @since 2023-12-21
*/
@RestController
@Api
(
tags
=
"公司人员映射表"
)
@RequestMapping
(
"/companyMemberMapping"
)
public
class
CompanyMemberMappingController
{
@Autowired
private
CompanyMemberMappingService
companyMemberMappingService
;
@PostMapping
(
"noCompanyMembers"
)
@ApiOperation
(
" userName idCard"
)
public
ResponseVO
noCompanyMembers
(
@RequestBody
MemberDO
memberDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyMemberMappingService
.
noCompanyMembers
(
memberDO
));
}
@PostMapping
(
"inviteMember"
)
@ApiOperation
(
"邀请某人 userName idCard companyId"
)
public
ResponseVO
inviteMember
(
@RequestBody
InviteMemberDTO
inviteMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyMemberMappingService
.
inviteMember
(
inviteMemberDTO
));
}
@PostMapping
(
"cancerMember"
)
@ApiOperation
(
"离职 memberIds[] companyId"
)
public
ResponseVO
cancerMember
(
@RequestBody
CancerMemberDTO
cancerMemberDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
companyMemberMappingService
.
cancerMember
(
cancerMemberDTO
));
}
}
src/main/java/com/subsidy/controller/DepartmentDictController.java
View file @
f9929fd
...
...
@@ -55,7 +55,7 @@ public class DepartmentDictController {
}
@PostMapping
(
"updateDepartment"
)
@ApiOperation
(
"编辑部门 id companyId departmentName leaderName parentId"
)
@ApiOperation
(
"编辑部门 id companyId
fullName
departmentName leaderName parentId"
)
@LoginRequired
public
ResponseVO
updateDepartment
(
@RequestBody
DepartmentDictDO
departmentDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
departmentDictService
.
updateDepartment
(
departmentDictDO
));
...
...
src/main/java/com/subsidy/dto/company/GetCompanyMembersDTO.java
View file @
f9929fd
...
...
@@ -13,4 +13,6 @@ public class GetCompanyMembersDTO {
private
String
userName
;
private
String
memberStatus
;
}
src/main/java/com/subsidy/dto/department/GetDepartmentsVO.java
View file @
f9929fd
...
...
@@ -15,6 +15,8 @@ public class GetDepartmentsVO {
private
Integer
cnt
;
private
String
fullName
;
private
Long
parentId
;
private
List
<
GetDepartmentsVO
>
children
;
...
...
src/main/java/com/subsidy/dto/member/AddMemberDTO.java
View file @
f9929fd
...
...
@@ -12,4 +12,6 @@ public class AddMemberDTO extends MemberDO {
private
List
<
Long
>
jobIds
;
private
Long
companyId
;
}
src/main/java/com/subsidy/dto/member/CancerMemberDTO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
dto
.
member
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
CancerMemberDTO
{
private
List
<
Long
>
memberIds
;
private
Long
companyId
;
}
src/main/java/com/subsidy/dto/member/ImportMemberDTO.java
View file @
f9929fd
package
com
.
subsidy
.
dto
.
member
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.subsidy.util.excel.ExcelColumn
;
import
com.subsidy.util.excel.ExcelColumnUtil
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
ImportMemberDTO
{
...
...
src/main/java/com/subsidy/dto/member/InviteMemberDTO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
dto
.
member
;
import
lombok.Data
;
@Data
public
class
InviteMemberDTO
{
private
String
userName
;
private
String
idCard
;
private
Long
companyId
;
private
Long
departmentId
;
}
src/main/java/com/subsidy/mapper/CompanyDictMapper.java
View file @
f9929fd
...
...
@@ -37,7 +37,7 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
/**
* 查看某个公司的学生
*/
IPage
<
GetCompanyMembersVO
>
getCompanyMembers
(
IPage
page
,
Long
companyId
,
String
userName
);
IPage
<
GetCompanyMembersVO
>
getCompanyMembers
(
IPage
page
,
Long
companyId
,
String
userName
,
String
memberStatus
);
}
src/main/java/com/subsidy/mapper/CompanyMemberMappingMapper.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CompanyDictDO
;
import
com.subsidy.model.CompanyMemberMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.model.MemberDO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 公司人员映射表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
@Repository
public
interface
CompanyMemberMappingMapper
extends
BaseMapper
<
CompanyMemberMappingDO
>
{
/**
* 查看某公司下已经认证的学员的个数
*/
Integer
companyAuthMembersCount
(
Long
companyId
);
/**
* 查看某个人所在公司
*/
CompanyDictDO
memberCompany
(
Long
memberId
);
/**
* 查看公司里里全部的人
*/
List
<
String
>
companyMembers
(
Long
companyId
);
/**
* 找出还没有公司的人
*/
List
<
MemberDO
>
noCompanyMembers
(
String
userName
,
String
idCard
);
/**
* 查看某个公司accountName的人
*/
List
<
MemberDO
>
companyAccountMembers
(
Long
companyId
,
String
accountName
);
}
src/main/java/com/subsidy/mapper/MemberDepartmentMappingMapper.java
View file @
f9929fd
...
...
@@ -15,4 +15,6 @@ import org.springframework.stereotype.Repository;
@Repository
public
interface
MemberDepartmentMappingMapper
extends
BaseMapper
<
MemberDepartmentMappingDO
>
{
void
cancelMember
(
Long
memberId
);
}
src/main/java/com/subsidy/model/ClassDictDO.java
View file @
f9929fd
...
...
@@ -48,6 +48,8 @@ public class ClassDictDO extends BaseModel {
*/
private
String
classTypeId
;
private
String
classType
;
/**
* 课程id
*/
...
...
src/main/java/com/subsidy/model/CompanyDictDO.java
View file @
f9929fd
...
...
@@ -41,6 +41,16 @@ public class CompanyDictDO extends BaseModel {
private
String
companyCode
;
/**
* 账号
*/
private
String
accountName
;
/**
* 密码
*/
private
String
password
;
/**
* 简称
*/
private
String
shortName
;
...
...
src/main/java/com/subsidy/model/CompanyMemberMappingDO.java
0 → 100644
View file @
f9929fd
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 Tuyp
* @since 2023-12-21
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"company_member_mapping"
)
public
class
CompanyMemberMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 公司id
*/
private
Long
companyId
;
/**
* 人员id
*/
private
Long
memberId
;
/**
* 人员状态 1在职 0 离职
*/
private
Integer
memberStatus
;
}
src/main/java/com/subsidy/model/MemberDO.java
View file @
f9929fd
...
...
@@ -29,10 +29,10 @@ public class MemberDO extends BaseModel {
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 公司id
*/
private
Long
companyId
;
//
/**
// * 公司id 该字段已删除
//
*/
//
private Long companyId;
/**
* 账号
...
...
src/main/java/com/subsidy/model/MemberDepartmentMappingDO.java
View file @
f9929fd
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
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.subsidy.util.BaseModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.time.LocalDateTime
;
/**
* <p>
* 老师部门映射表
...
...
@@ -36,6 +37,11 @@ public class MemberDepartmentMappingDO extends BaseModel {
*/
private
Long
departmentId
;
/**
* 人员在职状态
*/
private
Integer
memberStatus
;
private
LocalDateTime
createTime
;
private
LocalDateTime
updateTime
;
...
...
src/main/java/com/subsidy/service/AdministerService.java
View file @
f9929fd
...
...
@@ -8,6 +8,9 @@ import com.subsidy.vo.administer.*;
import
com.subsidy.vo.classdict.ClassDetailVO
;
import
com.subsidy.vo.image.GetMemberCheckDetailVO
;
import
com.subsidy.vo.member.ClassSignVO
;
import
com.subsidy.vo.member.DownloadFailMembersDTO
;
import
com.subsidy.vo.member.ImportMemberResultVO
;
import
com.subsidy.vo.member.ImportMemberVO
;
import
com.subsidy.vo.sign.AnswerRecordVO
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -81,7 +84,9 @@ public interface AdministerService extends IService<AdministerDO> {
void
memberStudyLog
(
MemberStudyLogDTO
memberStudyLogDTO
)
throws
Exception
;
String
importMember
(
Long
companyId
,
MultipartFile
multipartFile
)
throws
Exception
;
ImportMemberResultVO
importMember
(
Long
companyId
,
MultipartFile
multipartFile
)
throws
Exception
;
void
downloadFailMembers
(
DownloadFailMembersDTO
downloadFailMembersDTO
);
IPage
<
ManageMemberVO
>
manageMember
(
ManageMemberDTO
manageMemberDTO
);
...
...
src/main/java/com/subsidy/service/ClassDictService.java
View file @
f9929fd
...
...
@@ -10,6 +10,9 @@ import com.subsidy.model.ClassMemberMappingDO;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.vo.classdict.GetAllClassesVO
;
import
com.subsidy.vo.classdict.GetClassBaseInfoVO
;
import
com.subsidy.vo.member.DownloadFailClassMembers
;
import
com.subsidy.vo.member.ImportClassMembersVO
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.util.List
;
...
...
@@ -24,7 +27,7 @@ import java.util.List;
*/
public
interface
ClassDictService
extends
IService
<
ClassDictDO
>
{
List
<
GetAllClassesVO
>
getAllClasses
(
ClassDictDO
classDictDO
)
throws
Exception
;
List
<
GetAllClassesVO
>
getAllClasses
(
ClassDictDO
classDictDO
)
throws
Exception
;
String
deleteClasses
(
ClassDictDO
classDictDO
);
...
...
@@ -46,6 +49,10 @@ public interface ClassDictService extends IService<ClassDictDO> {
String
email
(
ClassMemberMappingDO
classMemberMappingDO
);
List
<
GetAllClassesVO
>
getAllCertClasses
(
ClassDictDO
classDictDO
)
throws
Exception
;
List
<
GetAllClassesVO
>
getAllCertClasses
(
ClassDictDO
classDictDO
)
throws
Exception
;
ImportClassMembersVO
importClassMembers
(
MultipartFile
multipartFile
,
Long
companyId
);
void
downloadFailClassMembers
(
DownloadFailClassMembers
downloadFailClassMembers
);
}
src/main/java/com/subsidy/service/CompanyMemberMappingService.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
service
;
import
com.subsidy.dto.member.CancerMemberDTO
;
import
com.subsidy.dto.member.InviteMemberDTO
;
import
com.subsidy.model.CompanyMemberMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.subsidy.model.MemberDO
;
import
java.util.List
;
/**
* <p>
* 公司人员映射表 服务类
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
public
interface
CompanyMemberMappingService
extends
IService
<
CompanyMemberMappingDO
>
{
List
<
MemberDO
>
noCompanyMembers
(
MemberDO
memberDO
);
String
inviteMember
(
InviteMemberDTO
inviteMemberDTO
);
String
cancerMember
(
CancerMemberDTO
cancerMemberDTO
);
}
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
f9929fd
This diff is collapsed.
Click to expand it.
src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java
View file @
f9929fd
...
...
@@ -11,53 +11,44 @@ import com.subsidy.dto.classDict.AddClassDTO;
import
com.subsidy.dto.classDict.AddMemberToClassDTO
;
import
com.subsidy.dto.classDict.GetClassBaseInfoDTO
;
import
com.subsidy.dto.classDict.GetSpareMembersDTO
;
import
com.subsidy.dto.member.ImportMemberDTO
;
import
com.subsidy.jobs.CourseNotificationJob
;
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.mapper.VodDictMapper
;
import
com.subsidy.mapper.VodPlayHistoryMapper
;
import
com.subsidy.mapper.*
;
import
com.subsidy.model.AnsweringQuestionDO
;
import
com.subsidy.model.ClassDictDO
;
import
com.subsidy.model.ClassMemberMappingDO
;
import
com.subsidy.model.ClassNoticeDO
;
import
com.subsidy.model.CompanyDictDO
;
import
com.subsidy.model.CourseDictDO
;
import
com.subsidy.model.FieldDictDO
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.RoleAdministerMappingDO
;
import
com.subsidy.model.VodDictDO
;
import
com.subsidy.service.ClassDictService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.DateFormatUtil
;
import
com.subsidy.util.QuartzUtil
;
import
com.subsidy.util.SMSUtils
;
import
com.subsidy.util.excel.ExcelUtil
;
import
com.subsidy.util.websocket.WebSocketUtil
;
import
com.subsidy.vo.classdict.ClassSettingsVO
;
import
com.subsidy.vo.classdict.GetAllClassesVO
;
import
com.subsidy.vo.classdict.GetClassBaseInfoVO
;
import
com.subsidy.vo.classdict.SystemSettings
;
import
com.subsidy.vo.member.DownloadFailClassMembers
;
import
com.subsidy.vo.member.DownloadFailClassMembersDTO
;
import
com.subsidy.vo.member.ImportClassMemberDTO
;
import
com.subsidy.vo.member.ImportClassMembersVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.socket.TextMessage
;
import
org.springframework.web.socket.WebSocketSession
;
import
java.io.IOException
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* <p>
...
...
@@ -94,6 +85,9 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
@Autowired
private
VodPlayHistoryMapper
vodPlayHistoryMapper
;
@Autowired
private
CompanyMemberMappingMapper
companyMemberMappingMapper
;
public
List
<
GetAllClassesVO
>
getAllClasses
(
ClassDictDO
classDictDO
)
throws
Exception
{
DateFormat
fmt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
@@ -173,10 +167,10 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
List
<
ClassMemberMappingDO
>
list
=
classMemberMappingMapper
.
selectList
(
new
QueryWrapper
<
ClassMemberMappingDO
>()
.
lambda
()
.
eq
(
ClassMemberMappingDO:
:
getClassId
,
classDictDO
.
getId
()));
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
ClassMemberMappingDO
classMemberMappingDO
:
list
)
{
WebSocketSession
webSocketSession
=
WebSocketUtil
.
webSocketMap
.
get
(
classMemberMappingDO
.
getMemberId
());
if
(
null
!=
webSocketSession
&&
webSocketSession
.
isOpen
())
{
if
(
null
!=
webSocketSession
&&
webSocketSession
.
isOpen
())
{
try
{
//班级的配置
List
<
ClassSettingsVO
>
classSettings
=
this
.
baseMapper
.
getClassSettings
(
classMemberMappingDO
.
getMemberId
());
...
...
@@ -258,29 +252,29 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
GetClassBaseInfoVO
getClassBaseInfoVO
=
this
.
baseMapper
.
getClassBaseInfo
(
getClassBaseInfoDTO
.
getId
());
//查看课程完成状态
//查看某个课程都有哪些视频
List
<
VodDictDO
>
vodDictDOS
=
vodDictMapper
.
getCourseVods
(
getClassBaseInfoVO
.
getCourseId
(),
null
);
int
completeNum
=
0
;
List
<
VodDictDO
>
vodDictDOS
=
vodDictMapper
.
getCourseVods
(
getClassBaseInfoVO
.
getCourseId
(),
null
);
int
completeNum
=
0
;
//查看每个视频的状态
for
(
VodDictDO
vodDictDO
:
vodDictDOS
){
int
i
=
vodPlayHistoryMapper
.
completeVodOrNot
(
getClassBaseInfoDTO
.
getUserId
(),
vodDictDO
.
getId
(),
getClassBaseInfoDTO
.
getId
());
for
(
VodDictDO
vodDictDO
:
vodDictDOS
)
{
int
i
=
vodPlayHistoryMapper
.
completeVodOrNot
(
getClassBaseInfoDTO
.
getUserId
(),
vodDictDO
.
getId
(),
getClassBaseInfoDTO
.
getId
());
completeNum
+=
i
;
}
if
(
completeNum
==
vodDictDOS
.
size
()){
if
(
completeNum
==
vodDictDOS
.
size
())
{
getClassBaseInfoVO
.
setTestFlag
(
true
);
}
else
{
}
else
{
getClassBaseInfoVO
.
setTestFlag
(
false
);
}
return
getClassBaseInfoVO
;
}
public
String
email
(
ClassMemberMappingDO
classMemberMappingDO
){
public
String
email
(
ClassMemberMappingDO
classMemberMappingDO
)
{
ClassMemberMappingDO
classMemberMappingDO1
=
classMemberMappingMapper
.
selectOne
(
new
QueryWrapper
<
ClassMemberMappingDO
>()
.
lambda
()
.
eq
(
ClassMemberMappingDO:
:
getMemberId
,
classMemberMappingDO
.
getMemberId
())
.
eq
(
ClassMemberMappingDO:
:
getClassId
,
classMemberMappingDO
.
getClassId
()));
.
lambda
()
.
eq
(
ClassMemberMappingDO:
:
getMemberId
,
classMemberMappingDO
.
getMemberId
())
.
eq
(
ClassMemberMappingDO:
:
getClassId
,
classMemberMappingDO
.
getClassId
()));
if
(
null
!=
classMemberMappingDO1
){
if
(
null
!=
classMemberMappingDO1
)
{
classMemberMappingDO1
.
setEmail
(
classMemberMappingDO
.
getEmail
());
classMemberMappingDO1
.
setEmailStatus
(
classMemberMappingDO
.
getEmailStatus
());
classMemberMappingMapper
.
updateById
(
classMemberMappingDO1
);
...
...
@@ -308,4 +302,43 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return
getAllClassesVOS
;
}
public
ImportClassMembersVO
importClassMembers
(
MultipartFile
multipartFile
,
Long
companyId
)
{
ImportClassMembersVO
importClassMembersVO
=
new
ImportClassMembersVO
();
List
<
ImportClassMemberDTO
>
importClassMemberDTOS
=
ExcelUtil
.
readExcel
(
null
,
ImportClassMemberDTO
.
class
,
multipartFile
);
//查找企业下所有的学员的手机号 手机 姓名 身份证
List
<
String
>
companyMembers
=
companyMemberMappingMapper
.
companyMembers
(
companyId
);
List
<
ImportClassMemberDTO
>
successMembers
=
new
ArrayList
<
ImportClassMemberDTO
>();
List
<
ImportClassMemberDTO
>
failMembers
=
new
ArrayList
<
ImportClassMemberDTO
>();
//查看该学员是否该企业下的人,不是的话就要返回 是的话直接导入成功
for
(
ImportClassMemberDTO
imd
:
importClassMemberDTOS
)
{
if
(
null
==
imd
.
getUserName
()
||
null
==
imd
.
getTelephone
()
||
null
==
imd
.
getIdCard
())
{
imd
.
setReason
(
"人员信息不完整"
);
failMembers
.
add
(
imd
);
}
else
if
(!
companyMembers
.
contains
(
imd
.
getUserName
()
+
imd
.
getTelephone
()
+
imd
.
getIdCard
()))
{
imd
.
setReason
(
"企业内未查询到该成员信息"
);
failMembers
.
add
(
imd
);
}
else
if
(
successMembers
.
contains
(
imd
.
getUserName
()
+
imd
.
getTelephone
()
+
imd
.
getIdCard
()))
{
imd
.
setReason
(
"人员信息重复"
);
failMembers
.
add
(
imd
);
}
else
{
successMembers
.
add
(
imd
);
}
}
importClassMembersVO
.
setSuccessMembers
(
successMembers
);
importClassMembersVO
.
setFailureMembers
(
failMembers
);
return
importClassMembersVO
;
}
public
void
downloadFailClassMembers
(
DownloadFailClassMembers
downloadFailClassMembers
)
{
List
<
DownloadFailClassMembersDTO
>
downloadFailClassMembersDTOS
=
downloadFailClassMembers
.
getDownloadFailClassMembersDTOS
();
ExcelUtil
.
writeExcel
(
downloadFailClassMembersDTOS
,
DownloadFailClassMembersDTO
.
class
);
}
}
src/main/java/com/subsidy/service/impl/ClassHourDictServiceImpl.java
View file @
f9929fd
...
...
@@ -114,31 +114,31 @@ public class ClassHourDictServiceImpl extends ServiceImpl<ClassHourDictMapper, C
PollingGetVO
pollingGetVO
=
new
PollingGetVO
();
MemberDO
memberDO
=
memberMapper
.
selectById
(
vodPlayHistoryDO
.
getMemberId
());
//查看系统设定的时长
ClassHourDictDO
classHourDictDO
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
ClassHourDictDO
>()
.
lambda
()
.
eq
(
ClassHourDictDO:
:
getCompanyId
,
memberDO
.
getCompanyId
()));
if
(
classHourDictDO
.
getStatus
()
==
0
)
{
pollingGetVO
.
setBool
(
false
);
return
pollingGetVO
;
}
//查看当天这个人看了多少时间
Integer
total
=
vodPlayHistoryMapper
.
memberDailyStudyLength
(
memberDO
.
getId
(),
null
);
//是否超过时长 没超过 false 超过 true
if
(
classHourDictDO
==
null
)
{
pollingGetVO
.
setBool
(
true
);
}
else
{
if
(
total
+
vodPlayHistoryDO
.
getPlayLength
()
<
classHourDictDO
.
getClassHour
()
*
3600
)
{
pollingGetVO
.
setBool
(
false
);
}
else
{
pollingGetVO
.
setBool
(
true
);
}
}
//
MemberDO memberDO = memberMapper.selectById(vodPlayHistoryDO.getMemberId());
//
//
//查看系统设定的时长
//
ClassHourDictDO classHourDictDO = this.baseMapper.selectOne (new QueryWrapper<ClassHourDictDO>()
//
.lambda()
//
.eq(ClassHourDictDO::getCompanyId,memberDO.getCompanyId()));
//
//
if (classHourDictDO.getStatus() == 0) {
//
pollingGetVO.setBool(false);
//
return pollingGetVO;
//
}
//
//
//查看当天这个人看了多少时间
//
Integer total = vodPlayHistoryMapper.memberDailyStudyLength(memberDO.getId(),null);
//
//
//是否超过时长 没超过 false 超过 true
//
if (classHourDictDO == null) {
//
pollingGetVO.setBool(true);
//
} else {
//
if (total + vodPlayHistoryDO.getPlayLength() < classHourDictDO.getClassHour() * 3600) {
//
pollingGetVO.setBool(false);
//
} else {
//
pollingGetVO.setBool(true);
//
}
//
}
return
pollingGetVO
;
}
...
...
src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java
View file @
f9929fd
...
...
@@ -120,6 +120,9 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
@Autowired
private
VODConfig
vodConfig
;
@Autowired
private
CompanyMemberMappingMapper
companyMemberMappingMapper
;
public
IPage
<
OperatorsVO
>
operators
(
OperatorsDTO
operatorsDTO
)
{
Page
pager
=
new
Page
(
operatorsDTO
.
getPageNum
(),
operatorsDTO
.
getPageSize
());
...
...
@@ -334,12 +337,12 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
public
IPage
<
GetCompanyMembersVO
>
getCompanyMembers
(
GetCompanyMembersDTO
getCompanyMembersDTO
)
{
Page
pager
=
new
Page
(
getCompanyMembersDTO
.
getPageNum
(),
getCompanyMembersDTO
.
getPageSize
());
return
this
.
baseMapper
.
getCompanyMembers
(
pager
,
getCompanyMembersDTO
.
getCompanyId
(),
getCompanyMembersDTO
.
getUserName
());
return
this
.
baseMapper
.
getCompanyMembers
(
pager
,
getCompanyMembersDTO
.
getCompanyId
(),
getCompanyMembersDTO
.
getUserName
()
,
getCompanyMembersDTO
.
getMemberStatus
()
);
}
public
void
exportCompanyMembers
(
GetCompanyMembersDTO
getCompanyMembersDTO
)
{
Page
pager
=
new
Page
(
1
,
-
1
);
List
<
GetCompanyMembersVO
>
getCompanyMembersVOS
=
this
.
baseMapper
.
getCompanyMembers
(
pager
,
getCompanyMembersDTO
.
getCompanyId
(),
getCompanyMembersDTO
.
getUserName
()).
getRecords
();
List
<
GetCompanyMembersVO
>
getCompanyMembersVOS
=
this
.
baseMapper
.
getCompanyMembers
(
pager
,
getCompanyMembersDTO
.
getCompanyId
(),
getCompanyMembersDTO
.
getUserName
()
,
getCompanyMembersDTO
.
getMemberStatus
()
).
getRecords
();
ExcelUtil
.
writeExcel
(
getCompanyMembersVOS
,
GetCompanyMembersVO
.
class
);
}
...
...
@@ -397,16 +400,13 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
MemberSummaryVO
memberSummaryVO
=
new
MemberSummaryVO
();
//总数
Integer
total
=
memberMapper
.
selectCount
(
new
QueryWrapper
<
Member
DO
>()
Integer
total
=
companyMemberMappingMapper
.
selectCount
(
new
QueryWrapper
<
CompanyMemberMapping
DO
>()
.
lambda
()
.
eq
(
Member
DO:
:
getCompanyId
,
getCompanyMembersDTO
.
getCompanyId
()));
.
eq
(
CompanyMemberMapping
DO:
:
getCompanyId
,
getCompanyMembersDTO
.
getCompanyId
()));
memberSummaryVO
.
setTotal
(
total
);
//短信验证
Integer
smsCnt
=
memberMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getCompanyId
,
getCompanyMembersDTO
.
getCompanyId
())
.
isNull
(
MemberDO:
:
getFirstLogin
));
Integer
smsCnt
=
companyMemberMappingMapper
.
companyAuthMembersCount
(
getCompanyMembersDTO
.
getCompanyId
());
memberSummaryVO
.
setSmsCnt
(
smsCnt
);
memberSummaryVO
.
setImgCnt
(
total
-
smsCnt
);
...
...
src/main/java/com/subsidy/service/impl/CompanyMemberMappingServiceImpl.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.dto.member.CancerMemberDTO
;
import
com.subsidy.dto.member.InviteMemberDTO
;
import
com.subsidy.mapper.MemberDepartmentMappingMapper
;
import
com.subsidy.mapper.MemberMapper
;
import
com.subsidy.model.CompanyMemberMappingDO
;
import
com.subsidy.mapper.CompanyMemberMappingMapper
;
import
com.subsidy.model.MemberDO
;
import
com.subsidy.model.MemberDepartmentMappingDO
;
import
com.subsidy.service.CompanyMemberMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* <p>
* 公司人员映射表 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-12-21
*/
@Service
public
class
CompanyMemberMappingServiceImpl
extends
ServiceImpl
<
CompanyMemberMappingMapper
,
CompanyMemberMappingDO
>
implements
CompanyMemberMappingService
{
@Autowired
private
MemberMapper
memberMapper
;
@Autowired
private
MemberDepartmentMappingMapper
memberDepartmentMappingMapper
;
public
List
<
MemberDO
>
noCompanyMembers
(
MemberDO
memberDO
)
{
return
this
.
baseMapper
.
noCompanyMembers
(
memberDO
.
getIdCard
(),
memberDO
.
getUserName
());
}
public
String
inviteMember
(
InviteMemberDTO
inviteMemberDTO
)
{
MemberDO
memberDO
=
memberMapper
.
selectOne
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getUserName
,
inviteMemberDTO
.
getUserName
())
.
eq
(
MemberDO:
:
getIdCard
,
inviteMemberDTO
.
getIdCard
()));
if
(
null
==
memberDO
)
{
throw
new
HttpException
(
10011
);
}
Integer
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
CompanyMemberMappingDO
>()
.
lambda
()
.
eq
(
CompanyMemberMappingDO:
:
getMemberId
,
memberDO
.
getId
())
.
eq
(
CompanyMemberMappingDO:
:
getMemberStatus
,
1
));
if
(
count
>
0
)
{
throw
new
HttpException
(
10028
);
}
CompanyMemberMappingDO
companyMemberMappingDO
=
new
CompanyMemberMappingDO
();
companyMemberMappingDO
.
setCompanyId
(
inviteMemberDTO
.
getCompanyId
());
companyMemberMappingDO
.
setMemberId
(
memberDO
.
getId
());
companyMemberMappingDO
.
setMemberStatus
(
1
);
this
.
baseMapper
.
insert
(
companyMemberMappingDO
);
MemberDepartmentMappingDO
memberDepartmentMappingDO
=
new
MemberDepartmentMappingDO
();
memberDepartmentMappingDO
.
setDepartmentId
(
inviteMemberDTO
.
getDepartmentId
());
memberDepartmentMappingDO
.
setMemberId
(
memberDO
.
getId
());
memberDepartmentMappingDO
.
setMemberStatus
(
1
);
memberDepartmentMappingMapper
.
insert
(
memberDepartmentMappingDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
}
public
String
cancerMember
(
CancerMemberDTO
cancerMemberDTO
)
{
List
<
Long
>
members
=
cancerMemberDTO
.
getMemberIds
();
for
(
Long
memberId
:
members
)
{
CompanyMemberMappingDO
companyMemberMappingDO1
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
CompanyMemberMappingDO
>()
.
lambda
()
.
eq
(
CompanyMemberMappingDO:
:
getCompanyId
,
cancerMemberDTO
.
getCompanyId
())
.
eq
(
CompanyMemberMappingDO:
:
getMemberId
,
memberId
)
.
eq
(
CompanyMemberMappingDO:
:
getMemberStatus
,
1
));
companyMemberMappingDO1
.
setMemberStatus
(
0
);
this
.
baseMapper
.
updateById
(
companyMemberMappingDO1
);
memberDepartmentMappingMapper
.
cancelMember
(
memberId
);
}
return
ConstantUtils
.
DELETE_SUCCESS
;
}
}
src/main/java/com/subsidy/service/impl/DepartmentDictServiceImpl.java
View file @
f9929fd
...
...
@@ -95,7 +95,8 @@ public class DepartmentDictServiceImpl extends ServiceImpl<DepartmentDictMapper,
Integer
count
=
memberDepartmentMappingMapper
.
selectCount
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getDepartmentId
,
getDepartmentsVO
.
getId
()));
.
eq
(
MemberDepartmentMappingDO:
:
getDepartmentId
,
getDepartmentsVO
.
getId
())
.
eq
(
MemberDepartmentMappingDO:
:
getMemberStatus
,
1
));
getDepartmentsVO
.
setCnt
(
count
);
DepartmentDictDO
departmentDictDO2
=
this
.
baseMapper
.
selectById
(
departmentDictDO1
.
getParentId
());
if
(
null
!=
departmentDictDO2
)
{
...
...
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
View file @
f9929fd
...
...
@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Member
;
import
java.text.SimpleDateFormat
;
import
java.time.Duration
;
import
java.time.LocalDateTime
;
...
...
@@ -115,9 +116,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
private
SmsVerifyCodeMapper
smsVerifyCodeMapper
;
@Autowired
private
ClassHourDictMapper
classHourDictMapper
;
@Autowired
private
QXueYouConfig
qXueYouConfig
;
@Autowired
...
...
@@ -126,6 +124,9 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
@Autowired
private
MemberTokensMapper
memberTokensMapper
;
@Autowired
private
CompanyMemberMappingMapper
companyMemberMappingMapper
;
public
IPage
<
GetAllVO
>
getAll
(
GetAllDTO
getAllDTO
)
{
Page
pager
=
new
Page
(
getAllDTO
.
getPageNum
(),
getAllDTO
.
getPageSize
());
...
...
@@ -176,12 +177,17 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw
new
HttpException
(
20002
);
}
Integer
count
1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
Integer
count
2
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
())
.
eq
(
MemberDO:
:
getCompanyId
,
addMemberDTO
.
getCompanyId
()));
.
eq
(
MemberDO:
:
getIdCard
,
addMemberDTO
.
getIdCard
()));
if
(
count1
>
0
)
{
if
(
count2
>
0
)
{
throw
new
HttpException
(
20002
);
}
List
<
MemberDO
>
memberDOS
=
companyMemberMappingMapper
.
companyAccountMembers
(
addMemberDTO
.
getCompanyId
(),
addMemberDTO
.
getAccountName
());
if
(
memberDOS
.
size
()
>
0
)
{
throw
new
HttpException
(
20002
);
}
...
...
@@ -190,10 +196,13 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
memberDO
.
setPassword
(
"Ykhl123456"
);
memberDO
.
setStatus
(
"启用"
);
memberDO
.
setFirstLogin
(
0
);
//公司赋值
memberDO
.
setCompanyId
(
addMemberDTO
.
getCompanyId
());
this
.
baseMapper
.
insert
(
memberDO
);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_COMPANY_MEMBER_PREFIX + memberDO.getCompanyId() + ":" + memberDO.getAccountName(), memberDO);
//公司赋值
CompanyMemberMappingDO
companyMemberMappingDO
=
new
CompanyMemberMappingDO
();
companyMemberMappingDO
.
setCompanyId
(
addMemberDTO
.
getCompanyId
());
companyMemberMappingDO
.
setMemberId
(
memberDO
.
getId
());
companyMemberMappingMapper
.
insert
(
companyMemberMappingDO
);
if
(
null
!=
addMemberDTO
.
getDepartmentIds
())
{
//部门
...
...
@@ -240,7 +249,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
Integer
count1
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getAccountName
,
addMemberDTO
.
getAccountName
())
.
eq
(
MemberDO:
:
getCompanyId
,
addMemberDTO
.
getCompanyId
())
.
ne
(
MemberDO:
:
getId
,
addMemberDTO
.
getId
()));
if
(
count1
>
0
)
{
...
...
@@ -250,8 +258,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
MemberDO
memberDO
=
new
MemberDO
();
BeanUtils
.
copyProperties
(
addMemberDTO
,
memberDO
);
this
.
baseMapper
.
updateById
(
memberDO
);
//MemberDO memberDO1 = this.baseMapper.selectById(addMemberDTO.getId());
//redisUtil.set(RedisPrefixConstant.SUBSIDY_COMPANY_MEMBER_PREFIX + memberDO.getCompanyId() + ":" + memberDO.getAccountName(), memberDO1);
if
(
null
!=
addMemberDTO
.
getDepartmentIds
())
{
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
...
...
@@ -298,7 +304,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw
new
HttpException
(
10010
);
}
CompanyDictDO
companyDictDO
=
company
DictMapper
.
selectById
(
memberDO
.
getCompany
Id
());
CompanyDictDO
companyDictDO
=
company
MemberMappingMapper
.
memberCompany
(
memberDO
.
get
Id
());
if
(
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
throw
new
HttpException
(
10013
);
...
...
@@ -318,12 +324,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
.
gt
(
SmsVerifyCodeDO:
:
getCreateDate
,
LocalDateTime
.
now
().
minusMinutes
(
30L
)));
if
(
null
==
smsCodeDO
||
!
verifyCodeDTO
.
getVerifyCode
().
equals
(
smsCodeDO
.
getVerifyCode
()))
{
// OprMemDictDO oprMemDictDO = new OprMemDictDO();
// oprMemDictDO.setUserId(memberDO.getId());
// oprMemDictDO.setOprType("登录");
// oprMemDictDO.setResult(0);
// oprMemDictDO.setIpAddress(IpAddressUtil.getIpAddress(request));
// oprMemDictMapper.insert(oprMemDictDO);
throw
new
HttpException
(
70010
);
}
userRoleVO
.
setCompanyId
(
companyDictDO
.
getId
());
...
...
@@ -348,14 +348,13 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
public
MemberVO
passwordLogin
(
PasswordLoginDTO
passwordLoginDTO
,
HttpServletRequest
request
)
{
MemberDO
memberDO
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
MemberDO
>()
.
lambda
()
.
eq
(
MemberDO:
:
getCompanyId
,
passwordLoginDTO
.
getCompanyId
())
.
eq
(
MemberDO:
:
getAccountName
,
passwordLoginDTO
.
getAccountName
()));
if
(
null
==
memberDO
)
{
List
<
MemberDO
>
memberDOS
=
companyMemberMappingMapper
.
companyAccountMembers
(
passwordLoginDTO
.
getCompanyId
(),
passwordLoginDTO
.
getAccountName
());
if
(
memberDOS
.
size
()
==
0
)
{
throw
new
HttpException
(
10017
);
}
MemberDO
memberDO
=
memberDOS
.
get
(
0
);
/**
* 最近5次都输入失败,5分钟后再验证
*/
...
...
@@ -373,7 +372,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw
new
HttpException
(
10016
);
}
CompanyDictDO
companyDictDO
=
company
DictMapper
.
selectById
(
memberDO
.
getCompany
Id
());
CompanyDictDO
companyDictDO
=
company
MemberMappingMapper
.
memberCompany
(
memberDO
.
get
Id
());
if
(
memberDO
.
getPassword
().
equals
(
passwordLoginDTO
.
getPassword
())
&&
1
==
memberDO
.
getFirstLogin
()
&&
!
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
MemberVO
memberVO
=
new
MemberVO
();
BeanUtils
.
copyProperties
(
memberDO
,
memberVO
);
...
...
@@ -514,7 +513,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw
new
HttpException
(
14001
);
}
CompanyDictDO
companyDictDO
=
company
DictMapper
.
selectById
(
memberDO
.
getCompany
Id
());
CompanyDictDO
companyDictDO
=
company
MemberMappingMapper
.
memberCompany
(
memberDO
.
get
Id
());
if
(
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
throw
new
HttpException
(
10013
);
...
...
@@ -570,7 +569,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw
new
HttpException
(
14001
);
}
CompanyDictDO
companyDictDO
=
company
DictMapper
.
selectById
(
memberDO
.
getCompany
Id
());
CompanyDictDO
companyDictDO
=
company
MemberMappingMapper
.
memberCompany
(
memberDO
.
get
Id
());
if
(
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
throw
new
HttpException
(
10013
);
...
...
@@ -624,7 +623,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
throw
new
HttpException
(
14001
);
}
CompanyDictDO
companyDictDO
=
company
DictMapper
.
selectById
(
memberDO
.
getCompany
Id
());
CompanyDictDO
companyDictDO
=
company
MemberMappingMapper
.
memberCompany
(
memberDO
.
get
Id
());
if
(
"冻结"
.
equals
(
memberDO
.
getStatus
()))
{
throw
new
HttpException
(
10013
);
...
...
@@ -984,9 +983,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
//清掉以前的部门
for
(
Long
lg
:
memberIds
)
{
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
.
lambda
()
.
eq
(
MemberDepartmentMappingDO:
:
getMemberId
,
lg
));
memberDepartmentMappingMapper
.
cancelMember
(
lg
);
}
//加入新的部门
...
...
@@ -996,6 +993,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
MemberDepartmentMappingDO
memberDepartmentMappingDO
=
new
MemberDepartmentMappingDO
();
memberDepartmentMappingDO
.
setMemberId
(
lg
);
memberDepartmentMappingDO
.
setDepartmentId
(
depId
);
memberDepartmentMappingDO
.
setMemberStatus
(
1
);
memberDepartmentMappingMapper
.
insert
(
memberDepartmentMappingDO
);
}
}
...
...
src/main/java/com/subsidy/service/impl/PushDataServiceImpl.java
View file @
f9929fd
...
...
@@ -219,7 +219,7 @@ public class PushDataServiceImpl extends ServiceImpl<PushAnsweringDataMapper, Pu
List
<
Long
>
imageList
=
pushImageDataMapper
.
imageList
();
if
(
vodList
.
size
()+
answerList
.
size
()+
examList
.
size
()+
activityList
.
size
()+
imageList
.
size
()>
0
){
List
<
String
>
telephones
=
Arrays
.
asList
(
new
String
[]{
"15201936167"
,
"18201963812"
}
);
List
<
String
>
telephones
=
Arrays
.
asList
(
"15201936167"
,
"18201963812"
);
for
(
String
telephone
:
telephones
)
{
smsUtils
.
sendWarning
(
"SMS_460945631"
,
telephone
,
null
);
}
...
...
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
f9929fd
...
...
@@ -57,25 +57,26 @@ public class RenSheJuServiceImpl implements RenSheJuService {
//查找前一天产生数据的班级
//看视频
List
<
Long
>
vodClassIds
=
renSheJuMapper
.
vodClassIds
(
"0"
);
//考试
List
<
Long
>
examClassIds
=
renSheJuMapper
.
examClassIds
(
"0"
);
//答疑
List
<
Long
>
answerClassIds
=
renSheJuMapper
.
answerClassIds
(
"0"
);
//人脸识别
List
<
Long
>
imageClassIds
=
renSheJuMapper
.
imageClassIds
(
"0"
);
//
//看视频
//
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
//
//
//考试
//
List<Long> examClassIds = renSheJuMapper.examClassIds("0");
//
//
//答疑
//
List<Long> answerClassIds = renSheJuMapper.answerClassIds("0");
//
//
//人脸识别
//
List<Long> imageClassIds = renSheJuMapper.imageClassIds("0");
Set
<
Long
>
classIds
=
new
HashSet
<>();
vodClassIds
.
stream
().
forEach
(
x
->
classIds
.
add
(
x
));
examClassIds
.
stream
().
forEach
(
x
->
classIds
.
add
(
x
));
answerClassIds
.
stream
().
forEach
(
x
->
classIds
.
add
(
x
));
imageClassIds
.
stream
().
forEach
(
x
->
classIds
.
add
(
x
));
//
vodClassIds.stream().forEach(x -> classIds.add(x));
//
examClassIds.stream().forEach(x -> classIds.add(x));
//
answerClassIds.stream().forEach(x -> classIds.add(x));
//
imageClassIds.stream().forEach(x -> classIds.add(x));
classIds
.
add
(
473L
);
try
{
if
(
classIds
.
size
()
>
0
)
{
...
...
@@ -160,12 +161,12 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List
<
ClassHourBasic
>
classHourBasics
=
new
ArrayList
<>();
// 产生视频学习数据的班级
List
<
Long
>
vodClassIds
=
renSheJuMapper
.
vodClassIds
(
"0"
);
//
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
List
<
DailyStudyInfoVO
>
result
=
new
ArrayList
<>();
//
List<Long> vodClassIds = new ArrayList<>();
// vodClassIds.add(477
L);
List
<
Long
>
vodClassIds
=
new
ArrayList
<>();
vodClassIds
.
add
(
473
L
);
try
{
for
(
Long
classId
:
vodClassIds
)
{
...
...
@@ -260,7 +261,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
renshejuHistoryDO
.
setOutputParam
(
RenSheJuConstant
.
PUSH_FAIL
);
renshejuHistoryMapper
.
insert
(
renshejuHistoryDO
);
List
<
String
>
telephones
=
Arrays
.
asList
(
new
String
[]{
"15201936167"
,
"18201963812"
}
);
List
<
String
>
telephones
=
Arrays
.
asList
(
"15201936167"
,
"18201963812"
);
// for (String telephone : telephones) {
// smsUtils.sendWarning("SMS_460945631", telephone, RenSheJuConstant.POST_3);
// }
...
...
src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java
View file @
f9929fd
...
...
@@ -775,7 +775,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
System
.
out
.
println
(
result
.
toString
());
if
(
result
.
size
()
>
0
)
{
List
<
String
>
telephones
=
Arrays
.
asList
(
new
String
[]{
"15201936167"
,
"18201963812"
}
);
List
<
String
>
telephones
=
Arrays
.
asList
(
"15201936167"
,
"18201963812"
);
for
(
String
telephone
:
telephones
)
{
smsUtils
.
sendWarning
(
"SMS_460945631"
,
telephone
,
result
.
toString
());
}
...
...
src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java
View file @
f9929fd
...
...
@@ -21,6 +21,8 @@ public class GetClassBaseInfoVO {
private
Long
courseId
;
private
String
rensheClassType
;
private
Long
classTypeId
;
private
Integer
isOrder
;
...
...
src/main/java/com/subsidy/vo/company/GetCompanyMembersVO.java
View file @
f9929fd
...
...
@@ -36,6 +36,7 @@ public class GetCompanyMembersVO {
@ExcelColumn
(
col
=
9
,
value
=
"最近采集时间"
)
private
String
checkTime
;
private
String
memberStatus
;
}
src/main/java/com/subsidy/vo/member/DownloadFailClassMembers.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
vo
.
member
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
DownloadFailClassMembers
{
private
List
<
DownloadFailClassMembersDTO
>
downloadFailClassMembersDTOS
;
}
src/main/java/com/subsidy/vo/member/DownloadFailClassMembersDTO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
vo
.
member
;
import
com.subsidy.util.excel.ExcelColumn
;
import
lombok.Data
;
@Data
public
class
DownloadFailClassMembersDTO
{
@ExcelColumn
(
value
=
"姓名"
,
col
=
1
)
private
String
userName
;
@ExcelColumn
(
value
=
"身份证"
,
col
=
2
)
private
String
idCard
;
@ExcelColumn
(
value
=
"手机号"
,
col
=
3
)
private
String
telephone
;
@ExcelColumn
(
value
=
"原因"
,
col
=
4
)
private
String
reason
;
}
src/main/java/com/subsidy/vo/member/DownloadFailMembersDTO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
vo
.
member
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
DownloadFailMembersDTO
{
private
List
<
ImportMemberVO
>
importMemberVOS
;
}
src/main/java/com/subsidy/vo/member/ImportClassMemberDTO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
vo
.
member
;
import
com.subsidy.util.excel.ExcelColumnUtil
;
import
lombok.Data
;
@Data
public
class
ImportClassMemberDTO
{
@ExcelColumnUtil
(
value
=
"姓名"
,
col
=
1
)
private
String
userName
;
@ExcelColumnUtil
(
value
=
"身份证"
,
col
=
2
)
private
String
idCard
;
@ExcelColumnUtil
(
value
=
"手机号"
,
col
=
3
)
private
String
telephone
;
private
String
reason
;
}
src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
vo
.
member
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ImportClassMembersVO
{
private
List
<
ImportClassMemberDTO
>
successMembers
;
private
List
<
ImportClassMemberDTO
>
failureMembers
;
}
src/main/java/com/subsidy/vo/member/ImportMemberResultVO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
vo
.
member
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ImportMemberResultVO
{
private
List
<
ImportMemberVO
>
importMemberVOS
;
private
Integer
successCount
;
private
Integer
failCount
;
}
src/main/java/com/subsidy/vo/member/ImportMemberVO.java
0 → 100644
View file @
f9929fd
package
com
.
subsidy
.
vo
.
member
;
import
com.subsidy.util.excel.ExcelColumn
;
import
lombok.Data
;
@Data
public
class
ImportMemberVO
{
@ExcelColumn
(
value
=
"姓名"
,
col
=
1
)
private
String
userName
;
@ExcelColumn
(
value
=
"手机号"
,
col
=
2
)
private
String
telephone
;
@ExcelColumn
(
value
=
"部门"
,
col
=
3
)
private
String
departments
;
@ExcelColumn
(
value
=
"身份证号码"
,
col
=
4
)
private
String
idCard
;
@ExcelColumn
(
value
=
"性别(男/女)"
,
col
=
5
)
private
String
gender
;
@ExcelColumn
(
value
=
"英文名"
,
col
=
6
)
private
String
accountNameEn
;
@ExcelColumn
(
value
=
"邮箱"
,
col
=
7
)
private
String
email
;
@ExcelColumn
(
value
=
"工号"
,
col
=
8
)
private
String
workNo
;
@ExcelColumn
(
value
=
"入职时间"
,
col
=
9
)
private
String
inductionDate
;
@ExcelColumn
(
value
=
"原因"
,
col
=
10
)
private
String
reason
;
}
src/main/resources/code.properties
View file @
f9929fd
...
...
@@ -21,6 +21,7 @@ meishu.code-message[10024]=密码输入错误,您还可以输入4次密码
meishu.code-message[10025]=身份证识别错误
meishu.code-message[10026]=姓名或身份证号格式不正确
meishu.code-message[10027]=该手机号已注册
meishu.code-message[10028]=该成员已在其他公司入职
meishu.code-message[20001]=该课程已存在
...
...
src/main/resources/mapper/AdministerMapper.xml
View file @
f9929fd
...
...
@@ -55,7 +55,8 @@
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id
left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
where t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.class_id = #{classId}
...
...
@@ -76,7 +77,8 @@
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id
left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
where t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.class_id = #{classId}
...
...
@@ -97,7 +99,8 @@
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id
left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
where t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.class_id = #{classId}
...
...
@@ -119,7 +122,8 @@
FROM
answering_question t
LEFT JOIN member t2 ON t.ask_id = t2.id
left join company_dict t3 on t2.company_id = t3.id
left join company_member_mapping t4 on t4.member_id = t2.id and t4.member_status = 1
left join company_dict t3 on t4.company_id = t3.id
WHERE
t.delete_date IS NULL
AND t.class_id = #{classId}
...
...
@@ -131,56 +135,62 @@
<select
id=
"classActivityDetection"
resultType=
"com.subsidy.vo.administer.MemberDetectionRecordVO"
>
SELECT
t
2
.id,
t.id,
t2.user_name,
t2.account_name,
t2.telephone,
t2.id_card,
t4.company_name,
count( t3.id ) as cnt
t.cnt
FROM
(
SELECT
t.member_id AS id,
count( t3.id ) AS cnt
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
LEFT JOIN activity_detection t3 ON t.class_id = t3.class_id
AND t.member_id = t3.member_id and t3.delete_date IS NULL
left join company_dict t4 on t2.company_id = t4.id
where t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.class_id = #{classId}
AND t.member_id = t3.member_id
AND t3.delete_date IS NULL
WHERE
t.delete_date IS NULL
and t2.delete_date IS NULL
and t.class_id = #{classId}
<if
test=
"userName != null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
GROUP BY
t.member_id
order by t2.account_name ASC
) t
LEFT JOIN member t2 ON t.id = t2.id
LEFT JOIN company_member_mapping t6 ON t6.member_id = t2.id
AND t6.member_status = 1
LEFT JOIN company_dict t4 ON t6.company_id = t4.id
ORDER BY
t2.account_name ASC
</select>
<select
id=
"imageCheckDetail"
resultType=
"com.subsidy.vo.administer.ImageCheckDetailVO"
>
SELECT
t1.id,
t
1
.user_name,
t
1
.account_name,
t
1
.telephone,
t
1
.company_name,
t
1
.id_card,
t
6
.user_name,
t
6
.account_name,
t
6
.telephone,
t
4
.company_name,
t
6
.id_card,
cnt,
recentDate
FROM
(
SELECT
t2.id,
t2.user_name,
t2.account_name,
t2.telephone,
t2.id_card,
t4.company_name,
count( t3.id ) AS cnt
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
LEFT JOIN image_check_record t3 ON t.class_id = t3.class_id
AND t.member_id = t3.member_id and t3.delete_date IS NULL
left join company_dict t4 on t2.company_id = t4.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
@@ -189,8 +199,11 @@
</if>
AND t.class_id = #{classId}
GROUP BY
t.
member_
id
t.id
) t1
left join company_member_mapping t5 on t5.member_id = t1.id and t5.member_status = 1
left join company_dict t4 on t5.company_id = t4.id
left join member t6 on t6.id = t1.id
LEFT JOIN (
SELECT
t2.member_id,
...
...
@@ -205,7 +218,7 @@
t2.member_id,
t2.class_id
) t2 ON t1.id = t2.member_id
order by t
1
.account_name ASC
order by t
6
.account_name ASC
</select>
<select
id=
"operators"
parameterType=
"string"
resultType=
"com.subsidy.vo.administer.OperatorsVO"
>
...
...
@@ -289,10 +302,11 @@
AND t5.delete_date IS NULL
) t7 ON t1.vod_id = t7.id
LEFT JOIN member t3 ON t1.member_id = t3.id
left join company_member_mapping t8 on t8.member_id = t3.id and t8.member_status = 1
LEFT JOIN class_member_mapping t6 ON t3.id = t6.member_id
AND t6.class_id = t1.class_id
LEFT JOIN class_dict t4 ON t1.class_id = t4.id
LEFT JOIN company_dict t5 ON t
3
.company_id = t5.id
LEFT JOIN company_dict t5 ON t
8
.company_id = t5.id
WHERE
t6.delete_date IS NULL
ORDER BY
...
...
src/main/resources/mapper/AnsweringQuestionMapper.xml
View file @
f9929fd
...
...
@@ -40,7 +40,8 @@
answering_question t
LEFT JOIN member t2 ON t.ask_id = t2.id
left join administer t3 on t.answer_id = t3.id
left join company_dict t4 on t3.company_id = t4.id
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t4 on t5.company_id = t4.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
src/main/resources/mapper/BusinessScopeDictMapper.xml
View file @
f9929fd
...
...
@@ -2,25 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.BusinessScopeDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.BusinessScopeDictDO"
>
<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=
"parent_id"
property=
"parentId"
/>
<result
column=
"company_id"
property=
"companyId"
/>
<result
column=
"business_scope_name"
property=
"businessScopeName"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, parent_id, company_id, business_scope_name
</sql>
<select
id=
"queryBusinessScopePage"
resultType=
"com.subsidy.vo.businessScope.BusinessScopeDictVO"
>
SELECT * FROM business_scope_dict
<where>
...
...
src/main/resources/mapper/CertCompanyMappingMapper.xml
View file @
f9929fd
...
...
@@ -2,24 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.CertCompanyMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CertCompanyMappingDO"
>
<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=
"company_id"
property=
"companyId"
/>
<result
column=
"cert_id"
property=
"certId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, cert_id
</sql>
<select
id=
"getCompanyCerts"
resultType=
"com.subsidy.model.CertDictDO"
>
SELECT
distinct t.*
...
...
src/main/resources/mapper/CertMemberMappingMapper.xml
View file @
f9929fd
...
...
@@ -62,7 +62,8 @@
</if>
) t4 ON t.id = t4.cert_id
LEFT JOIN member t6 ON t4.member_id = t6.id
LEFT JOIN company_dict t5 ON t6.company_id = t5.id
left join company_member_mapping t8 on t8.member_id = t6.id and t8.member_status = 1
LEFT JOIN company_dict t5 ON t8.company_id = t5.id
WHERE
t.delete_date IS NULL
AND t5.delete_date IS NULL
...
...
@@ -160,7 +161,8 @@
FROM
cert_member_mapping t
LEFT JOIN member t1 ON t.member_id = t1.id
LEFT JOIN company_dict t2 ON t1.company_id = t2.id
left join company_member_mapping t5 on t5.member_id = t1.id and t5.member_status = 1
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
LEFT JOIN cert_dict t3 ON t.cert_id = t.id
WHERE
t.delete_date IS NULL
...
...
src/main/resources/mapper/ClassDictMapper.xml
View file @
f9929fd
...
...
@@ -76,7 +76,7 @@
resultType=
"com.subsidy.model.MemberDO"
>
SELECT
distinct t2.id,
t
2
.company_id,
t
5
.company_id,
t2.user_name,
t2.account_name,
t2.telephone,
...
...
@@ -90,7 +90,8 @@
member t2
LEFT JOIN member_department_mapping t ON t.member_id = t2.id
left join department_dict t3 on t.department_id = t3.id
left join company_dict t4 on t3.company_id = t4.id
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t4 on t5.company_id = t4.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
@@ -111,7 +112,7 @@
<select
id=
"classMembers"
parameterType=
"long"
resultType=
"com.subsidy.model.MemberDO"
>
SELECT
t2.id,
t
2
.company_id,
t
5
.company_id,
t2.user_name,
t2.account_name,
t2.telephone,
...
...
@@ -124,6 +125,8 @@
FROM
class_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t6 on t5.company_id = t6.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
@@ -144,7 +147,8 @@
t.is_fast_play,
t.test_rule,
t2.cover_page,
t.class_code
t.class_code,
t.class_type as rensheClassType
FROM
class_dict t
LEFT JOIN course_dict t2 ON t.course_id = t2.id
...
...
src/main/resources/mapper/ClassMemberMappingMapper.xml
View file @
f9929fd
...
...
@@ -53,7 +53,8 @@
FROM
class_member_mapping t
left join member t2 on t.member_id = t2.id
left join company_dict t3 on t2.company_id = t3.id
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
left join company_dict t3 on t5.company_id = t3.id
WHERE
t.delete_date IS NULL
and t2.delete_date is null
...
...
src/main/resources/mapper/ClassTypeDictMapper.xml
View file @
f9929fd
...
...
@@ -2,22 +2,4 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.ClassTypeDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.ClassTypeDictDO"
>
<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=
"company_id"
property=
"companyId"
/>
<result
column=
"class_type"
property=
"classType"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, class_type
</sql>
</mapper>
src/main/resources/mapper/CompanyDictMapper.xml
View file @
f9929fd
...
...
@@ -78,27 +78,37 @@
</select>
<select
id=
"getCompanyMembers"
resultType=
"com.subsidy.vo.company.GetCompanyMembersVO"
>
SELECT
t.id,
t.user_name,
t.id_card,
ifnull( t.id_card_photo, '尚未完成' ) AS id_card_photo,
t2.company_name,
if(t.first_login =1,'是','否') as first_login,
ifnull( t.check_image, '尚未完成' ) AS check_image,
t.check_time,
t.telephone,
t.account_name
SELECT
t.id,
t.user_name,
t.id_card,
ifnull( t.id_card_photo, '尚未完成' ) AS id_card_photo,
t2.company_name,
if(t.first_login =1,'是','否') as first_login,
ifnull( t.check_image, '尚未完成' ) AS check_image,
t.check_time,
t.telephone,
t.account_name,
t5.member_status
FROM
member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
member t
left join ( SELECT
t2.company_id,t2.member_status,t3.member_id
FROM
( SELECT t.member_id, max( t.id ) AS id FROM company_member_mapping t GROUP BY t.member_id ) t3
LEFT JOIN company_member_mapping t2 ON t3.id = t2.id) t5 on t5.member_id = t.id
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.company_id = #{companyId}
<if
test=
"companyId != null and companyId != ''"
>
and t5.company_id = #{companyId}
</if>
<if
test=
"userName != null and userName != ''"
>
and t.user_name like concat('%',#{userName} ,'%')
and (t.user_name like concat('%',#{userName} ,'%') or t.telephone like concat('%',#{userName} ,'%') )
</if>
<if
test=
"memberStatus != null and memberStatus != ''"
>
and t5.member_status = #{memberStatus}
</if>
</select>
...
...
src/main/resources/mapper/CompanyFieldMappingMapper.xml
View file @
f9929fd
...
...
@@ -2,22 +2,4 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.CompanyFieldMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CompanyFieldMappingDO"
>
<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=
"company_id"
property=
"companyId"
/>
<result
column=
"field_id"
property=
"fieldId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, field_id
</sql>
</mapper>
src/main/resources/mapper/CompanyMemberMappingMapper.xml
0 → 100644
View file @
f9929fd
<?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.CompanyMemberMappingMapper"
>
<select
id=
"companyAuthMembersCount"
parameterType=
"long"
resultType=
"integer"
>
SELECT
count(
DISTINCT ( t2.id ))
FROM
company_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
AND t.member_status = 1
AND t2.first_login IS NOT NULL
</select>
<select
id=
"memberCompany"
parameterType=
"long"
resultType=
"com.subsidy.model.CompanyDictDO"
>
SELECT
t2.*
FROM
company_member_mapping t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.member_status = 1
AND t.member_id = #{memberId}
</select>
<select
id=
"companyMembers"
parameterType=
"long"
resultType=
"string"
>
SELECT
concat(t2.user_name,t2.telephone,t2.id_card)
FROM
company_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
AND t.member_status = 1
</select>
<select
id=
"noCompanyMembers"
resultType=
"com.subsidy.model.MemberDO"
>
SELECT
*
FROM
member t
WHERE
t.delete_date IS NOT NULL
AND t.id NOT IN (
SELECT DISTINCT
( t2.member_id )
FROM
company_member_mapping t2
WHERE
t2.delete_date IS NOT NULL
AND t2.member_status = 1)
and t.user_name like concat('%',#{userName} ,'%')
and t.id_card like concat('%',#{idCard} ,'%')
</select>
<select
id=
"companyAccountMembers"
resultType=
"com.subsidy.model.MemberDO"
>
SELECT
t2.*
FROM
company_member_mapping t
LEFT JOIN member t2 ON t.member_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.company_id = #{companyId}
AND t2.account_name = #{accountName}
AND t.member_status = 1
</select>
</mapper>
src/main/resources/mapper/DudaoMapper.xml
View file @
f9929fd
...
...
@@ -2,15 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.DudaoMapper"
>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, cert_id
</sql>
<select
id=
"vodClassIds"
parameterType=
"string"
resultType=
"long"
>
SELECT
t.id
...
...
@@ -198,7 +189,8 @@
answering_question t1
LEFT JOIN class_dict t2 ON t1.class_id = t2.id
LEFT JOIN member t3 ON t1.ask_id = t3.id
LEFT JOIN company_dict t4 ON t2.company_id = t4.id
left join company_member_mapping t5 on t5.member_id = t3.id and t5.member_status = 1
LEFT JOIN company_dict t4 ON t5.company_id = t4.id
WHERE
DATE_FORMAT( DATE_ADD( t1.update_date,interval 1 day), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND
...
...
src/main/resources/mapper/JobDictMapper.xml
View file @
f9929fd
...
...
@@ -2,25 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.JobDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.JobDictDO"
>
<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=
"company_id"
property=
"companyId"
/>
<result
column=
"job_name"
property=
"jobName"
/>
<result
column=
"order_no"
property=
"orderNo"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, job_name, order_no
</sql>
<select
id=
"queryCourseJobs"
parameterType=
"long"
resultType=
"com.subsidy.model.JobDictDO"
>
SELECT
t2.*
...
...
src/main/resources/mapper/MemberDepartmentMappingMapper.xml
View file @
f9929fd
...
...
@@ -2,19 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.MemberDepartmentMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.MemberDepartmentMappingDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"administer_id"
property=
"administerId"
/>
<result
column=
"department_id"
property=
"departmentId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_time"
property=
"deleteTime"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, administer_id, department_id, create_time, update_time, delete_time
</sql>
<update
id=
"cancelMember"
>
update member_department_mapping t set t.member_status = 0 where t.member_id = #{memberId}
</update>
</mapper>
src/main/resources/mapper/MemberMapper.xml
View file @
f9929fd
...
...
@@ -36,10 +36,11 @@
t.password
FROM
member t
left join company_member_mapping t2 on t.id = t2.member_id
WHERE
t.delete_date IS NULL
AND t.account_name = #{accountName}
AND t.company_id =#{companyId}
AND t
2
.company_id =#{companyId}
</select>
<select
id=
"studyPage"
parameterType=
"com.subsidy.model.MemberDO"
resultType=
"com.subsidy.vo.member.StudyPageVO"
>
...
...
@@ -253,6 +254,7 @@
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.member_status = 1
AND t.member_id = #{memberId}
</select>
...
...
@@ -275,6 +277,7 @@
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.member_status = 1
and t.department_id = #{departmentId}
<if
test=
"userName != null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
...
...
@@ -311,6 +314,7 @@
AND t2.delete_date IS NULL
AND t2.id IS NOT NULL
and t.department_id = #{departmentId}
and t.member_status = 1
<if
test=
"userName != null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
...
...
@@ -340,9 +344,10 @@
t2.induction_date
FROM
member t2
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
WHERE
t2.delete_date IS NULL
and t
2
.company_id = #{companyId}
and t
5
.company_id = #{companyId}
<if
test=
"userName != null and userName !=''"
>
and t2.user_name like concat('%',#{userName} ,'%')
</if>
...
...
@@ -356,6 +361,7 @@
and DATE_FORMAT(t2.induction_date ,'%Y-%m-%d')
<
= DATE_FORMAT(#{endDate}, '%Y-%m-%d')
</if>
</select>
<select
id=
"manageMember"
parameterType=
"string"
resultType=
"com.subsidy.vo.administer.ManageMemberVO"
>
SELECT
t.id,
...
...
@@ -369,7 +375,8 @@
t.first_login
FROM
member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
left join company_member_mapping t5 on t5.member_id = t.id and t5.member_status = 1
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
@@ -377,7 +384,7 @@
AND t.user_name LIKE concat('%',#{userName} ,'%')
</if>
<if
test=
"companyId != null and companyId != ''"
>
and t.company_id = #{companyId}
and t
5
.company_id = #{companyId}
</if>
</select>
...
...
@@ -432,7 +439,8 @@
t2.device_no_record
FROM
member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
left join company_member_mapping t5 on t5.member_id = t.id and t5.member_status = 1
LEFT JOIN company_dict t2 ON t5.company_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
src/main/resources/mapper/OprMemDictMapper.xml
View file @
f9929fd
...
...
@@ -32,7 +32,8 @@
FROM
opr_mem_dict t
LEFT JOIN member t2 ON t.user_id = t2.id
LEFT JOIN company_dict t3 ON t2.company_id = t3.id
left join company_member_mapping t5 on t5.member_id = t2.id and t5.member_status = 1
LEFT JOIN company_dict t3 ON t5.company_id = t3.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
...
...
src/main/resources/mapper/PushImageDataMapper.xml
View file @
f9929fd
...
...
@@ -18,7 +18,7 @@
AND t1.occurred_time = t2.create_date
WHERE
t2.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t2.create_date,
INTERVAL
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND DATE_FORMAT( DATE_ADD( t2.create_date,
interval
1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.id IS NULL
AND t2.result = 1
and t3.class_type = 0
...
...
src/main/resources/mapper/RotationImgDictMapper.xml
View file @
f9929fd
...
...
@@ -2,22 +2,4 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.RotationImgDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.RotationImgDictDO"
>
<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=
"company_id"
property=
"companyId"
/>
<result
column=
"rotation_img"
property=
"rotationImg"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, rotation_img
</sql>
</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