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 2db33758
authored
May 18, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时器表有点问题
1 parent
be81e3f1
Show whitespace changes
Inline
Side-by-side
Showing
67 changed files
with
2206 additions
and
8 deletions
src/main/java/com/subsidy/controller/CertCompanyMappingController.java
src/main/java/com/subsidy/controller/CertDictController.java
src/main/java/com/subsidy/controller/CertMemberFileMappingController.java
src/main/java/com/subsidy/controller/CertMemberMappingController.java
src/main/java/com/subsidy/controller/CertRequirementController.java
src/main/java/com/subsidy/controller/CertTypeDictController.java
src/main/java/com/subsidy/controller/CertTypeMappingController.java
src/main/java/com/subsidy/controller/MemberController.java
src/main/java/com/subsidy/dto/cert/AddCertDTO.java
src/main/java/com/subsidy/dto/cert/ChangeCompanyCertsDTO.java
src/main/java/com/subsidy/dto/cert/GetAllCertsDTO.java
src/main/java/com/subsidy/dto/cert/GetAllTypeDTO.java
src/main/java/com/subsidy/dto/cert/GetCompanyCertsDTO.java
src/main/java/com/subsidy/dto/cert/GetCompanyCertsWithStatusDTO.java
src/main/java/com/subsidy/dto/cert/GetListDTO.java
src/main/java/com/subsidy/dto/cert/SignManagementDTO.java
src/main/java/com/subsidy/dto/cert/SignUpDTO.java
src/main/java/com/subsidy/mapper/CertCompanyMappingMapper.java
src/main/java/com/subsidy/mapper/CertDictMapper.java
src/main/java/com/subsidy/mapper/CertMemberFileMappingMapper.java
src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java
src/main/java/com/subsidy/mapper/CertRequirementMapper.java
src/main/java/com/subsidy/mapper/CertTypeDictMapper.java
src/main/java/com/subsidy/mapper/CertTypeMappingMapper.java
src/main/java/com/subsidy/model/CertCompanyMappingDO.java
src/main/java/com/subsidy/model/CertDictDO.java
src/main/java/com/subsidy/model/CertMemberFileMappingDO.java
src/main/java/com/subsidy/model/CertMemberMappingDO.java
src/main/java/com/subsidy/model/CertRequirementDO.java
src/main/java/com/subsidy/model/CertTypeDictDO.java
src/main/java/com/subsidy/model/CertTypeMappingDO.java
src/main/java/com/subsidy/service/CertCompanyMappingService.java
src/main/java/com/subsidy/service/CertDictService.java
src/main/java/com/subsidy/service/CertMemberFileMappingService.java
src/main/java/com/subsidy/service/CertMemberMappingService.java
src/main/java/com/subsidy/service/CertRequirementService.java
src/main/java/com/subsidy/service/CertTypeDictService.java
src/main/java/com/subsidy/service/CertTypeMappingService.java
src/main/java/com/subsidy/service/impl/CertCompanyMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CertMemberFileMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/CertRequirementServiceImpl.java
src/main/java/com/subsidy/service/impl/CertTypeDictServiceImpl.java
src/main/java/com/subsidy/service/impl/CertTypeMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/VodDictServiceImpl.java
src/main/java/com/subsidy/vo/cert/GetAllCertsVO.java
src/main/java/com/subsidy/vo/cert/GetAllCertsWithoutTypeVO.java
src/main/java/com/subsidy/vo/cert/GetCompanyCertsVO.java
src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java
src/main/java/com/subsidy/vo/cert/GetListVO.java
src/main/java/com/subsidy/vo/cert/GetOneCertVO.java
src/main/java/com/subsidy/vo/cert/GetSignInfoVO.java
src/main/java/com/subsidy/vo/cert/SignManagementVO.java
src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java
src/main/java/com/subsidy/vo/member/MemberVodVO.java
src/main/resources/application.properties
src/main/resources/code.properties
src/main/resources/mapper/CertCompanyMappingMapper.xml
src/main/resources/mapper/CertDictMapper.xml
src/main/resources/mapper/CertMemberFileMappingMapper.xml
src/main/resources/mapper/CertMemberMappingMapper.xml
src/main/resources/mapper/CertRequirementMapper.xml
src/main/resources/mapper/CertTypeDictMapper.xml
src/main/resources/mapper/CertTypeMappingMapper.xml
src/main/resources/mapper/ClassDictMapper.xml
src/main/resources/mapper/CourseContentMapper.xml
src/main/java/com/subsidy/controller/CertCompanyMappingController.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.dto.cert.ChangeCompanyCertsDTO
;
import
com.subsidy.dto.cert.GetCompanyCertsDTO
;
import
com.subsidy.dto.cert.GetCompanyCertsWithStatusDTO
;
import
com.subsidy.service.CertCompanyMappingService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.swagger.annotations.Api
;
import
sun.security.provider.certpath.ResponderId
;
/**
* <p>
* 证书-公司映射表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@RestController
@Api
(
tags
=
"证书-公司映射表"
)
@RequestMapping
(
"/certCompanyMapping"
)
public
class
CertCompanyMappingController
{
@Autowired
private
CertCompanyMappingService
certCompanyMappingService
;
@PostMapping
(
"getCompanyCertsWithStatus"
)
@ApiOperation
(
"获取某个公司的项目证书(返回学生报名状态) companyId 公司id typeId 类型id(查全部传空) memberId 学生id"
)
public
ResponseVO
getCompanyCertsWithStatus
(
@RequestParam
GetCompanyCertsWithStatusDTO
getCompanyCertsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certCompanyMappingService
.
getCompanyCertsWithStatus
(
getCompanyCertsDTO
));
}
@PostMapping
(
"getCompanyCerts"
)
@ApiOperation
(
"获取某个公司的证书情况 companyId pageSize pageNum"
)
public
ResponseVO
getCompanyCerts
(
@RequestBody
GetCompanyCertsDTO
getCompanyCertsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certCompanyMappingService
.
getCompanyCerts
(
getCompanyCertsDTO
));
}
@PostMapping
(
"changeCompanyCerts"
)
@ApiOperation
(
"开启/关闭权限 companyId certId signStatus"
)
public
ResponseVO
changeCompanyCerts
(
@RequestBody
ChangeCompanyCertsDTO
changeCompanyCertsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certCompanyMappingService
.
changeCompanyCerts
(
changeCompanyCertsDTO
));
}
}
src/main/java/com/subsidy/controller/CertDictController.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.dto.cert.AddCertDTO
;
import
com.subsidy.dto.cert.GetAllCertsDTO
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.service.CertDictService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 证书字典表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@RestController
@Api
(
tags
=
"证书字典表"
)
@RequestMapping
(
"/certDict"
)
public
class
CertDictController
{
@Autowired
private
CertDictService
certDictService
;
@PostMapping
(
"addCert"
)
@ApiOperation
(
"添加证书 certName price coverPage title副标题 scribePrice 划线价格 detail chargeAndSubsidy 学费和补贴 serviceProcess服务流程 refundGuarantee 退费流程 typeIds[] 类型id requirementDesc 条件说明 submitDesc 提交说明"
)
public
ResponseVO
addCert
(
@RequestBody
AddCertDTO
addCertDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certDictService
.
addCert
(
addCertDTO
));
}
@PostMapping
(
"deleteCert"
)
@ApiOperation
(
"删除证书 id "
)
public
ResponseVO
deleteCert
(
@RequestBody
CertDictDO
certDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certDictService
.
deleteCert
(
certDictDO
));
}
@PostMapping
(
"updateCert"
)
@ApiOperation
(
"编辑证书 id certName price coverPage title副标题 scribePrice 划线价格 划线价格 detail chargeAndSubsidy 学费和补贴 serviceProcess服务流程 refundGuarantee 退费流程 typeId 类型id requirementDesc 条件说明 submitDesc 提交说明"
)
public
ResponseVO
updateCert
(
@RequestBody
AddCertDTO
addCertDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certDictService
.
updateCert
(
addCertDTO
));
}
@PostMapping
(
"getOneCert"
)
@ApiOperation
(
"获取一个证书 id"
)
public
ResponseVO
getOneCert
(
@RequestBody
CertDictDO
certDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certDictService
.
getOneCert
(
certDictDO
));
}
@PostMapping
(
"getAllCerts"
)
@ApiOperation
(
"获取全部的证书(包含项目类型) typeId certName pageSize pageNum "
)
public
ResponseVO
getAllCerts
(
@RequestBody
GetAllCertsDTO
getAllCertsDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certDictService
.
getAllCerts
(
getAllCertsDTO
));
}
@PostMapping
(
"getAllCertsWithoutType"
)
@ApiOperation
(
"获取所有证书(下拉列表用)"
)
public
ResponseVO
getAllCertsWithoutType
(){
return
ResponseData
.
generateCreatedResponse
(
0
,
certDictService
.
getAllCertsWithoutType
());
}
}
src/main/java/com/subsidy/controller/CertMemberFileMappingController.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
controller
;
import
com.subsidy.service.CertMemberFileMappingService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
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-05-11
*/
@RestController
@Api
(
tags
=
"学生报名材料 映射表"
)
@RequestMapping
(
"/certMemberFileMapping"
)
public
class
CertMemberFileMappingController
{
}
src/main/java/com/subsidy/controller/CertMemberMappingController.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.dto.cert.GetListDTO
;
import
com.subsidy.dto.cert.SignManagementDTO
;
import
com.subsidy.dto.cert.SignUpDTO
;
import
com.subsidy.model.CertMemberMappingDO
;
import
com.subsidy.service.CertMemberMappingService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 学生报名证书表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@RestController
@Api
(
tags
=
"学生报名证书表"
)
@RequestMapping
(
"/certMemberMapping"
)
public
class
CertMemberMappingController
{
@Autowired
private
CertMemberMappingService
certMemberMappingService
;
@PostMapping
(
"signUp"
)
@ApiOperation
(
"报名 certId memberId files[fileName fileUrl requirementId] "
)
public
ResponseVO
signUp
(
@RequestBody
SignUpDTO
signUpDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certMemberMappingService
.
signUp
(
signUpDTO
));
}
@PostMapping
(
"signManagement"
)
@ApiOperation
(
"报名管理 typeId 类目id certId 证书id startDate 开始时间 endDate 结束时间 item 搜索字段 pageSize pageNum"
)
public
ResponseVO
signManagement
(
@RequestBody
SignManagementDTO
signManagementDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certMemberMappingService
.
signManagement
(
signManagementDTO
));
}
@PostMapping
(
"changeStatus"
)
@ApiOperation
(
"编辑订单状态 id status"
)
public
ResponseVO
changeStatus
(
@RequestBody
CertMemberMappingDO
certMemberMappingDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certMemberMappingService
.
changeStatus
(
certMemberMappingDO
));
}
@PostMapping
(
"getList"
)
@ApiOperation
(
"手机端---获取全部订单 memberId status pageSize pageNum"
)
public
ResponseVO
getList
(
@RequestBody
GetListDTO
getListDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certMemberMappingService
.
getList
(
getListDTO
));
}
@PostMapping
(
"getSignInfo"
)
@ApiOperation
(
"获取某人某个证书报名信息 memberId certId "
)
public
ResponseVO
getSignInfo
(
@RequestBody
CertMemberMappingDO
certMemberMappingDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certMemberMappingService
.
getSignInfo
(
certMemberMappingDO
));
}
}
src/main/java/com/subsidy/controller/CertRequirementController.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.model.CertRequirementDO
;
import
com.subsidy.service.CertRequirementService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 报名条件表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-05-12
*/
@RestController
@Api
(
tags
=
"报名条件表"
)
@RequestMapping
(
"/certRequirement"
)
public
class
CertRequirementController
{
@Autowired
private
CertRequirementService
certRequirementService
;
@PostMapping
(
"getRequirements"
)
@ApiOperation
(
"获取证书报名条件 certId"
)
public
ResponseVO
getRequirements
(
@RequestBody
CertRequirementDO
certRequirementDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certRequirementService
.
getRequirements
(
certRequirementDO
));
}
@PostMapping
(
"deleteRequirement"
)
@ApiOperation
(
"删除条件 id"
)
public
ResponseVO
deleteRequirement
(
@RequestBody
CertRequirementDO
certRequirementDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certRequirementService
.
deleteRequirement
(
certRequirementDO
));
}
@PostMapping
(
"addRequirement"
)
@ApiOperation
(
"添加条件 certId certRequirement status:true 必填 false 非必填"
)
public
ResponseVO
addRequirement
(
@RequestBody
CertRequirementDO
certRequirementDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certRequirementService
.
addRequirement
(
certRequirementDO
));
}
@PostMapping
(
"updateRequirement"
)
@ApiOperation
(
"编辑条件 id certId certRequirement status:true 必填 false 非必填"
)
public
ResponseVO
updateRequirement
(
@RequestBody
CertRequirementDO
certRequirementDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certRequirementService
.
updateRequirement
(
certRequirementDO
));
}
}
src/main/java/com/subsidy/controller/CertTypeDictController.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.dto.cert.GetAllTypeDTO
;
import
com.subsidy.mapper.CertTypeDictMapper
;
import
com.subsidy.model.CertCompanyMappingDO
;
import
com.subsidy.model.CertRequirementDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
com.subsidy.service.CertTypeDictService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 证书类目字典表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@RestController
@Api
(
tags
=
"证书类目字典表"
)
@RequestMapping
(
"/certTypeDict"
)
public
class
CertTypeDictController
{
@Autowired
private
CertTypeDictService
certTypeDictService
;
@PostMapping
(
"getCompanyCertTypes"
)
@ApiOperation
(
"(手机端)获取某个公司所有的证书类型 companyId"
)
public
ResponseVO
getCompanyCertTypes
(
@RequestParam
CertCompanyMappingDO
certCompanyMappingDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certTypeDictService
.
getCompanyCertTypes
(
certCompanyMappingDO
));
}
@PostMapping
(
"addType"
)
@ApiOperation
(
"添加类型 typeName "
)
public
ResponseVO
addType
(
@RequestBody
CertTypeDictDO
certTypeDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certTypeDictService
.
addType
(
certTypeDictDO
));
}
@PostMapping
(
"deleteType"
)
@ApiOperation
(
"删除类型 id "
)
public
ResponseVO
deleteType
(
@RequestBody
CertTypeDictDO
certTypeDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certTypeDictService
.
deleteType
(
certTypeDictDO
));
}
@PostMapping
(
"updateType"
)
@ApiOperation
(
"修改类型 id typeName"
)
public
ResponseVO
updateType
(
@RequestBody
CertTypeDictDO
certTypeDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certTypeDictService
.
updateType
(
certTypeDictDO
));
}
@PostMapping
(
"getAllType"
)
@ApiOperation
(
"获取所有类型 pageSize pageNum"
)
public
ResponseVO
getAllType
(
@RequestBody
GetAllTypeDTO
getAllTypeDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
certTypeDictService
.
getAllType
(
getAllTypeDTO
));
}
}
src/main/java/com/subsidy/controller/CertTypeMappingController.java
0 → 100644
View file @
2db3375
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-05-11
*/
@RestController
@Api
(
tags
=
"证书-类型映射表"
)
@RequestMapping
(
"/certTypeMapping"
)
public
class
CertTypeMappingController
{
}
src/main/java/com/subsidy/controller/MemberController.java
View file @
2db3375
...
...
@@ -107,7 +107,7 @@ public class MemberController {
@PostMapping
(
"contentVod"
)
@ApiOperation
(
"手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id"
)
@LoginRequired
//
@LoginRequired
public
ResponseVO
contentVod
(
@RequestBody
ContentMemberDTO
contentVodDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
memberService
.
contentVod
(
contentVodDTO
));
}
...
...
src/main/java/com/subsidy/dto/cert/AddCertDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
com.subsidy.model.CertDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AddCertDTO
extends
CertDictDO
{
private
List
<
Long
>
typeIds
;
}
src/main/java/com/subsidy/dto/cert/ChangeCompanyCertsDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
lombok.Data
;
@Data
public
class
ChangeCompanyCertsDTO
{
private
Long
companyId
;
private
Long
certId
;
private
Boolean
signStatus
;
}
src/main/java/com/subsidy/dto/cert/GetAllCertsDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
lombok.Data
;
@Data
public
class
GetAllCertsDTO
{
private
Integer
pageSize
;
private
Integer
pageNum
;
private
Long
certTypeId
;
private
String
certName
;
}
src/main/java/com/subsidy/dto/cert/GetAllTypeDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
lombok.Data
;
@Data
public
class
GetAllTypeDTO
{
private
Integer
pageSize
;
private
Integer
pageNum
;
}
src/main/java/com/subsidy/dto/cert/GetCompanyCertsDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
lombok.Data
;
@Data
public
class
GetCompanyCertsDTO
{
private
Long
companyId
;
private
Integer
pageSize
;
private
Integer
pageNum
;
}
src/main/java/com/subsidy/dto/cert/GetCompanyCertsWithStatusDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
lombok.Data
;
@Data
public
class
GetCompanyCertsWithStatusDTO
{
private
Long
companyId
;
private
Long
typeId
;
private
Long
memberId
;
}
src/main/java/com/subsidy/dto/cert/GetListDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
lombok.Data
;
@Data
public
class
GetListDTO
{
private
Integer
pageSize
;
private
Integer
pageNum
;
private
String
status
;
private
Long
memberId
;
}
src/main/java/com/subsidy/dto/cert/SignManagementDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
lombok.Data
;
@Data
public
class
SignManagementDTO
{
private
Integer
pageSize
;
private
Integer
pageNum
;
private
Long
typeId
;
private
Long
certId
;
private
String
startDate
;
private
String
endDate
;
private
String
item
;
private
String
status
;
}
src/main/java/com/subsidy/dto/cert/SignUpDTO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
dto
.
cert
;
import
com.subsidy.model.CertMemberFileMappingDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
SignUpDTO
{
private
Long
certId
;
private
Long
memberId
;
private
List
<
CertMemberFileMappingDO
>
files
;
}
src/main/java/com/subsidy/mapper/CertCompanyMappingMapper.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.model.CertCompanyMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.vo.cert.GetCompanyCertsVO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 证书-公司映射表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Repository
public
interface
CertCompanyMappingMapper
extends
BaseMapper
<
CertCompanyMappingDO
>
{
//获取某个公司的某个类型下的证书 companyId typeId
List
<
CertDictDO
>
getCompanyCerts
(
Long
CompanyId
,
Long
typeId
);
//获取全部证书公司映射情况 分页 包含企业状态
IPage
<
GetCompanyCertsVO
>
getCompanyCertStatus
(
IPage
page
);
}
src/main/java/com/subsidy/mapper/CertDictMapper.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.model.CertDictDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.vo.cert.GetAllCertsVO
;
import
com.subsidy.vo.cert.GetAllCertsWithoutTypeVO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 证书字典表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Repository
public
interface
CertDictMapper
extends
BaseMapper
<
CertDictDO
>
{
/**
* 获取所有证书
*/
IPage
<
GetAllCertsVO
>
getAllCerts
(
IPage
iPage
,
Long
typeId
,
String
certName
);
/**
* 获取所有证书 下拉列表 不分页
*/
List
<
GetAllCertsWithoutTypeVO
>
getAllCertsWithoutType
();
}
src/main/java/com/subsidy/mapper/CertMemberFileMappingMapper.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CertMemberFileMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Repository
public
interface
CertMemberFileMappingMapper
extends
BaseMapper
<
CertMemberFileMappingDO
>
{
}
src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.model.CertMemberMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.subsidy.vo.cert.GetListVO
;
import
com.subsidy.vo.cert.GetSignInfoVO
;
import
com.subsidy.vo.cert.SignManagementVO
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 学生报名证书表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Repository
public
interface
CertMemberMappingMapper
extends
BaseMapper
<
CertMemberMappingDO
>
{
/**
* 报名管理
*/
IPage
<
SignManagementVO
>
signManagement
(
IPage
page
,
String
status
,
Long
typeId
,
Long
certId
,
String
item
,
String
startDate
,
String
endDate
);
/**
* 查看学生报了几个证书
*/
IPage
<
GetListVO
>
getList
(
IPage
page
,
Long
memberId
,
String
status
);
/**
* 获取某个学生 某个证书报名信息
*/
GetSignInfoVO
getSignInfo
(
Long
memberId
,
Long
certId
);
}
src/main/java/com/subsidy/mapper/CertRequirementMapper.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CertRequirementDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 报名条件表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-05-12
*/
@Repository
public
interface
CertRequirementMapper
extends
BaseMapper
<
CertRequirementDO
>
{
}
src/main/java/com/subsidy/mapper/CertTypeDictMapper.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CertTypeDictDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 证书类目字典表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Repository
public
interface
CertTypeDictMapper
extends
BaseMapper
<
CertTypeDictDO
>
{
/**
* 获取某个公司的所有证书类型
*/
List
<
CertTypeDictDO
>
getCompanyCertTypes
(
Long
companyId
);
/**
* 查看证书的所有证书类型
*/
List
<
CertTypeDictDO
>
getCertTypes
(
Long
certId
);
}
src/main/java/com/subsidy/mapper/CertTypeMappingMapper.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CertTypeMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 证书-类型映射表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Repository
public
interface
CertTypeMappingMapper
extends
BaseMapper
<
CertTypeMappingDO
>
{
}
src/main/java/com/subsidy/model/CertCompanyMappingDO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 证书-公司映射表
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"cert_company_mapping"
)
public
class
CertCompanyMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 公司id
*/
private
Long
companyId
;
/**
* 证书id
*/
private
Long
certId
;
}
src/main/java/com/subsidy/model/CertDictDO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.time.LocalDateTime
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 证书字典表
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"cert_dict"
)
public
class
CertDictDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 证书名称
*/
private
String
certName
;
/**
* 副标题
*/
private
String
title
;
/**
* 证书价格
*/
private
String
price
;
/**
* 划线价格
*/
private
String
scribePrice
;
/**
* 证书简介
*/
private
String
certDesc
;
/**
* 证书封面
*/
private
String
coverPage
;
/**
* 详情
*/
private
String
detail
;
/**
* 学费和补贴
*/
private
String
chargeAndSubsidy
;
/**
* 服务流程
*/
private
String
serviceProcess
;
/**
* 退费流程
*/
private
String
refundGuarantee
;
/**
* 条件说明
*/
private
String
requirementDesc
;
/**
* 提交说明
*/
private
String
submitDesc
;
}
src/main/java/com/subsidy/model/CertMemberFileMappingDO.java
0 → 100644
View file @
2db3375
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-05-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"cert_member_file_mapping"
)
public
class
CertMemberFileMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
certId
;
private
Long
memberId
;
private
String
fileName
;
private
String
fileUrl
;
private
Long
requirementId
;
}
src/main/java/com/subsidy/model/CertMemberMappingDO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 学生报名证书表
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"cert_member_mapping"
)
public
class
CertMemberMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
memberId
;
private
Long
certId
;
private
String
status
;
private
Long
orderNo
;
}
src/main/java/com/subsidy/model/CertRequirementDO.java
0 → 100644
View file @
2db3375
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-05-12
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"cert_requirement"
)
public
class
CertRequirementDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 正式id
*/
private
Long
certId
;
/**
* 条件说明
*/
private
String
certRequirement
;
/**
* 必填非必填
*/
private
Boolean
status
;
}
src/main/java/com/subsidy/model/CertTypeDictDO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 证书类目字典表
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"cert_type_dict"
)
public
class
CertTypeDictDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
String
typeName
;
}
src/main/java/com/subsidy/model/CertTypeMappingDO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 证书-类型映射表
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"cert_type_mapping"
)
public
class
CertTypeMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
certId
;
private
Long
typeId
;
}
src/main/java/com/subsidy/service/CertCompanyMappingService.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.cert.ChangeCompanyCertsDTO
;
import
com.subsidy.dto.cert.GetCompanyCertsDTO
;
import
com.subsidy.dto.cert.GetCompanyCertsWithStatusDTO
;
import
com.subsidy.model.CertCompanyMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.subsidy.vo.cert.GetCompanyCertsVO
;
import
com.subsidy.vo.cert.GetCompanyCertsWithStatusVO
;
import
java.util.List
;
/**
* <p>
* 证书-公司映射表 服务类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
public
interface
CertCompanyMappingService
extends
IService
<
CertCompanyMappingDO
>
{
List
<
GetCompanyCertsWithStatusVO
>
getCompanyCertsWithStatus
(
GetCompanyCertsWithStatusDTO
getCompanyCertsDTO
);
IPage
<
GetCompanyCertsVO
>
getCompanyCerts
(
GetCompanyCertsDTO
getCompanyCertsDTO
);
String
changeCompanyCerts
(
ChangeCompanyCertsDTO
changeCompanyCertsDTO
);
}
src/main/java/com/subsidy/service/CertDictService.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.cert.AddCertDTO
;
import
com.subsidy.dto.cert.GetAllCertsDTO
;
import
com.subsidy.model.CertDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.subsidy.vo.cert.GetAllCertsVO
;
import
com.subsidy.vo.cert.GetAllCertsWithoutTypeVO
;
import
com.subsidy.vo.cert.GetOneCertVO
;
import
java.util.List
;
/**
* <p>
* 证书字典表 服务类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
public
interface
CertDictService
extends
IService
<
CertDictDO
>
{
String
addCert
(
AddCertDTO
addCertDTO
);
String
deleteCert
(
CertDictDO
certDictDO
);
String
updateCert
(
AddCertDTO
addCertDTO
);
GetOneCertVO
getOneCert
(
CertDictDO
certDictDO
);
IPage
<
GetAllCertsVO
>
getAllCerts
(
GetAllCertsDTO
getAllCertsDTO
);
List
<
GetAllCertsWithoutTypeVO
>
getAllCertsWithoutType
();
}
src/main/java/com/subsidy/service/CertMemberFileMappingService.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
;
import
com.subsidy.model.CertMemberFileMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
public
interface
CertMemberFileMappingService
extends
IService
<
CertMemberFileMappingDO
>
{
}
src/main/java/com/subsidy/service/CertMemberMappingService.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.cert.GetListDTO
;
import
com.subsidy.dto.cert.SignManagementDTO
;
import
com.subsidy.dto.cert.SignUpDTO
;
import
com.subsidy.model.CertMemberMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.subsidy.vo.cert.GetListVO
;
import
com.subsidy.vo.cert.GetSignInfoVO
;
import
com.subsidy.vo.cert.SignManagementVO
;
import
java.util.List
;
/**
* <p>
* 学生报名证书表 服务类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
public
interface
CertMemberMappingService
extends
IService
<
CertMemberMappingDO
>
{
String
signUp
(
SignUpDTO
signUpDTO
);
IPage
<
SignManagementVO
>
signManagement
(
SignManagementDTO
signManagementDTO
);
String
changeStatus
(
CertMemberMappingDO
certMemberMappingDO
);
IPage
<
GetListVO
>
getList
(
GetListDTO
getListDTO
);
GetSignInfoVO
getSignInfo
(
CertMemberMappingDO
certMemberMappingDO
);
}
src/main/java/com/subsidy/service/CertRequirementService.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.model.CertRequirementDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 报名条件表 服务类
* </p>
*
* @author DengMin
* @since 2022-05-12
*/
public
interface
CertRequirementService
extends
IService
<
CertRequirementDO
>
{
List
<
CertRequirementDO
>
getRequirements
(
CertRequirementDO
certRequirementDO
);
String
deleteRequirement
(
CertRequirementDO
certRequirementDO
);
String
addRequirement
(
CertRequirementDO
certRequirementDO
);
String
updateRequirement
(
CertRequirementDO
certRequirementDO
);
}
src/main/java/com/subsidy/service/CertTypeDictService.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.subsidy.dto.cert.GetAllTypeDTO
;
import
com.subsidy.model.CertCompanyMappingDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 证书类目字典表 服务类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
public
interface
CertTypeDictService
extends
IService
<
CertTypeDictDO
>
{
List
<
CertTypeDictDO
>
getCompanyCertTypes
(
CertCompanyMappingDO
certCompanyMappingDO
);
String
addType
(
CertTypeDictDO
certTypeDictDO
);
String
deleteType
(
CertTypeDictDO
certTypeDictDO
);
String
updateType
(
CertTypeDictDO
certTypeDictDO
);
IPage
<
CertTypeDictDO
>
getAllType
(
GetAllTypeDTO
getAllTypeDTO
);
}
src/main/java/com/subsidy/service/CertTypeMappingService.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
;
import
com.subsidy.model.CertTypeMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 证书-类型映射表 服务类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
public
interface
CertTypeMappingService
extends
IService
<
CertTypeMappingDO
>
{
}
src/main/java/com/subsidy/service/impl/CertCompanyMappingServiceImpl.java
0 → 100644
View file @
2db3375
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.dto.cert.ChangeCompanyCertsDTO
;
import
com.subsidy.dto.cert.GetCompanyCertsDTO
;
import
com.subsidy.dto.cert.GetCompanyCertsWithStatusDTO
;
import
com.subsidy.mapper.CertMemberMappingMapper
;
import
com.subsidy.mapper.CertTypeDictMapper
;
import
com.subsidy.model.CertCompanyMappingDO
;
import
com.subsidy.mapper.CertCompanyMappingMapper
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.model.CertMemberMappingDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
com.subsidy.service.CertCompanyMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.vo.cert.GetCompanyCertsVO
;
import
com.subsidy.vo.cert.GetCompanyCertsWithStatusVO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* <p>
* 证书-公司映射表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Service
public
class
CertCompanyMappingServiceImpl
extends
ServiceImpl
<
CertCompanyMappingMapper
,
CertCompanyMappingDO
>
implements
CertCompanyMappingService
{
@Autowired
private
CertMemberMappingMapper
certMemberMappingMapper
;
@Autowired
private
CertTypeDictMapper
certTypeDictMapper
;
@Autowired
private
CertCompanyMappingMapper
certCompanyMappingMapper
;
public
List
<
GetCompanyCertsWithStatusVO
>
getCompanyCertsWithStatus
(
GetCompanyCertsWithStatusDTO
getCompanyCertsDTO
){
List
<
GetCompanyCertsWithStatusVO
>
getCompanyCertsWithStatusVOS
=
new
ArrayList
<>();
//查看某个公司所有的证书
List
<
CertDictDO
>
certDictDOS
=
this
.
baseMapper
.
getCompanyCerts
(
getCompanyCertsDTO
.
getCompanyId
(),
getCompanyCertsDTO
.
getTypeId
());
for
(
CertDictDO
certDictDO
:
certDictDOS
){
GetCompanyCertsWithStatusVO
getCompanyCertsWithStatusVO
=
new
GetCompanyCertsWithStatusVO
();
BeanUtils
.
copyProperties
(
certDictDO
,
getCompanyCertsWithStatusVO
);
int
count
=
certMemberMappingMapper
.
selectCount
(
new
QueryWrapper
<
CertMemberMappingDO
>()
.
lambda
()
.
eq
(
CertMemberMappingDO:
:
getCertId
,
certDictDO
.
getId
())
.
eq
(
CertMemberMappingDO:
:
getMemberId
,
getCompanyCertsDTO
.
getMemberId
()));
if
(
count
>
0
){
getCompanyCertsWithStatusVO
.
setStatus
(
true
);
}
else
{
getCompanyCertsWithStatusVO
.
setStatus
(
false
);
}
getCompanyCertsWithStatusVOS
.
add
(
getCompanyCertsWithStatusVO
);
}
return
getCompanyCertsWithStatusVOS
;
}
public
IPage
<
GetCompanyCertsVO
>
getCompanyCerts
(
GetCompanyCertsDTO
getCompanyCertsDTO
){
Page
pager
=
new
Page
(
getCompanyCertsDTO
.
getPageNum
(),
getCompanyCertsDTO
.
getPageSize
());
IPage
<
GetCompanyCertsVO
>
getCompanyCertsVOIPage
=
this
.
baseMapper
.
getCompanyCertStatus
(
pager
);
List
<
GetCompanyCertsVO
>
getCompanyCertsVOS
=
getCompanyCertsVOIPage
.
getRecords
();
for
(
GetCompanyCertsVO
getCompanyCertsVO
:
getCompanyCertsVOS
){
List
<
CertTypeDictDO
>
certTypeDictDOS
=
certTypeDictMapper
.
getCertTypes
(
getCompanyCertsVO
.
getId
());
getCompanyCertsVO
.
setCertTypeDictDOS
(
certTypeDictDOS
);
int
count
=
certCompanyMappingMapper
.
selectCount
(
new
QueryWrapper
<
CertCompanyMappingDO
>()
.
lambda
()
.
eq
(
CertCompanyMappingDO:
:
getCertId
,
getCompanyCertsVO
.
getId
())
.
eq
(
CertCompanyMappingDO:
:
getCompanyId
,
getCompanyCertsDTO
.
getCompanyId
()));
if
(
count
>
0
){
getCompanyCertsVO
.
setSignStatus
(
true
);
}
else
{
getCompanyCertsVO
.
setSignStatus
(
false
);
}
}
return
getCompanyCertsVOIPage
;
}
public
String
changeCompanyCerts
(
ChangeCompanyCertsDTO
changeCompanyCertsDTO
){
if
(
changeCompanyCertsDTO
.
getSignStatus
()){
CertCompanyMappingDO
certCompanyMappingDO
=
new
CertCompanyMappingDO
();
certCompanyMappingDO
.
setCertId
(
changeCompanyCertsDTO
.
getCertId
());
certCompanyMappingDO
.
setCompanyId
(
changeCompanyCertsDTO
.
getCompanyId
());
this
.
baseMapper
.
insert
(
certCompanyMappingDO
);
}
else
{
this
.
baseMapper
.
delete
(
new
QueryWrapper
<
CertCompanyMappingDO
>()
.
lambda
()
.
eq
(
CertCompanyMappingDO:
:
getCertId
,
changeCompanyCertsDTO
.
getCertId
())
.
eq
(
CertCompanyMappingDO:
:
getCompanyId
,
changeCompanyCertsDTO
.
getCompanyId
()));
}
return
ConstantUtils
.
SET_SUCCESS
;
}
}
src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java
0 → 100644
View file @
2db3375
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.dto.cert.AddCertDTO
;
import
com.subsidy.dto.cert.GetAllCertsDTO
;
import
com.subsidy.mapper.CertRequirementMapper
;
import
com.subsidy.mapper.CertTypeDictMapper
;
import
com.subsidy.mapper.CertTypeMappingMapper
;
import
com.subsidy.model.*
;
import
com.subsidy.mapper.CertDictMapper
;
import
com.subsidy.service.CertDictService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.service.CertTypeDictService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.vo.cert.GetAllCertsVO
;
import
com.subsidy.vo.cert.GetAllCertsWithoutTypeVO
;
import
com.subsidy.vo.cert.GetOneCertVO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* <p>
* 证书字典表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Service
public
class
CertDictServiceImpl
extends
ServiceImpl
<
CertDictMapper
,
CertDictDO
>
implements
CertDictService
{
@Autowired
private
CertTypeMappingMapper
certTypeMappingMapper
;
@Autowired
private
CertTypeDictMapper
certTypeDictMapper
;
@Autowired
private
CertRequirementMapper
certRequirementMapper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
addCert
(
AddCertDTO
addCertDTO
)
{
CertDictDO
certDictDO
=
new
CertDictDO
();
BeanUtils
.
copyProperties
(
addCertDTO
,
certDictDO
);
this
.
baseMapper
.
insert
(
certDictDO
);
List
<
Long
>
list
=
addCertDTO
.
getTypeIds
();
for
(
Long
lg
:
list
)
{
CertTypeMappingDO
certTypeMappingDO
=
new
CertTypeMappingDO
();
certTypeMappingDO
.
setCertId
(
certDictDO
.
getId
());
certTypeMappingDO
.
setTypeId
(
lg
);
certTypeMappingMapper
.
insert
(
certTypeMappingDO
);
}
return
ConstantUtils
.
ADD_SUCCESS
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
deleteCert
(
CertDictDO
certDictDO
)
{
//删除证书
this
.
baseMapper
.
deleteById
(
certDictDO
.
getId
());
//删除证书类目映射关系
certTypeMappingMapper
.
delete
(
new
QueryWrapper
<
CertTypeMappingDO
>()
.
lambda
()
.
eq
(
CertTypeMappingDO:
:
getCertId
,
certDictDO
.
getId
()));
//删除证书相关条件
certRequirementMapper
.
delete
(
new
QueryWrapper
<
CertRequirementDO
>()
.
lambda
()
.
eq
(
CertRequirementDO:
:
getCertId
,
certDictDO
.
getId
()));
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
String
updateCert
(
AddCertDTO
addCertDTO
)
{
CertDictDO
certDictDO
=
new
CertDictDO
();
BeanUtils
.
copyProperties
(
addCertDTO
,
certDictDO
);
this
.
baseMapper
.
updateById
(
certDictDO
);
if
(
addCertDTO
.
getTypeIds
().
size
()
>
0
)
{
certTypeMappingMapper
.
delete
(
new
QueryWrapper
<
CertTypeMappingDO
>()
.
lambda
()
.
eq
(
CertTypeMappingDO:
:
getCertId
,
addCertDTO
.
getId
()));
List
<
Long
>
list
=
addCertDTO
.
getTypeIds
();
for
(
Long
lg
:
list
)
{
CertTypeMappingDO
certTypeMappingDO
=
new
CertTypeMappingDO
();
certTypeMappingDO
.
setCertId
(
certDictDO
.
getId
());
certTypeMappingDO
.
setTypeId
(
lg
);
certTypeMappingMapper
.
insert
(
certTypeMappingDO
);
}
}
return
ConstantUtils
.
SET_SUCCESS
;
}
public
GetOneCertVO
getOneCert
(
CertDictDO
certDictDO
)
{
GetOneCertVO
getOneCertVO
=
new
GetOneCertVO
();
CertDictDO
certDictDO1
=
this
.
baseMapper
.
selectById
(
certDictDO
.
getId
());
BeanUtils
.
copyProperties
(
certDictDO1
,
getOneCertVO
);
//查看证书有哪些类型
List
<
CertTypeDictDO
>
certTypeDictDOS
=
certTypeDictMapper
.
getCertTypes
(
certDictDO
.
getId
());
getOneCertVO
.
setCertTypeDictDOS
(
certTypeDictDOS
);
return
getOneCertVO
;
}
public
IPage
<
GetAllCertsVO
>
getAllCerts
(
GetAllCertsDTO
getAllCertsDTO
)
{
Page
pager
=
new
Page
(
getAllCertsDTO
.
getPageNum
(),
getAllCertsDTO
.
getPageSize
());
IPage
<
GetAllCertsVO
>
getAllCertsVOIPage
=
this
.
baseMapper
.
getAllCerts
(
pager
,
getAllCertsDTO
.
getCertTypeId
(),
getAllCertsDTO
.
getCertName
());
List
<
GetAllCertsVO
>
getAllCertsVOS
=
getAllCertsVOIPage
.
getRecords
();
for
(
GetAllCertsVO
gav
:
getAllCertsVOS
){
List
<
CertTypeDictDO
>
certTypeDictDOS
=
certTypeDictMapper
.
getCertTypes
(
gav
.
getId
());
gav
.
setCertTypeDictDOS
(
certTypeDictDOS
);
}
return
getAllCertsVOIPage
;
}
public
List
<
GetAllCertsWithoutTypeVO
>
getAllCertsWithoutType
(){
return
this
.
baseMapper
.
getAllCertsWithoutType
();
}
}
src/main/java/com/subsidy/service/impl/CertMemberFileMappingServiceImpl.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.CertMemberFileMappingDO
;
import
com.subsidy.mapper.CertMemberFileMappingMapper
;
import
com.subsidy.service.CertMemberFileMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Service
public
class
CertMemberFileMappingServiceImpl
extends
ServiceImpl
<
CertMemberFileMappingMapper
,
CertMemberFileMappingDO
>
implements
CertMemberFileMappingService
{
}
src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java
0 → 100644
View file @
2db3375
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.dto.cert.GetListDTO
;
import
com.subsidy.dto.cert.SignManagementDTO
;
import
com.subsidy.dto.cert.SignUpDTO
;
import
com.subsidy.mapper.CertMemberFileMappingMapper
;
import
com.subsidy.mapper.CertRequirementMapper
;
import
com.subsidy.mapper.CertTypeDictMapper
;
import
com.subsidy.model.CertMemberFileMappingDO
;
import
com.subsidy.model.CertMemberMappingDO
;
import
com.subsidy.mapper.CertMemberMappingMapper
;
import
com.subsidy.model.CertRequirementDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
com.subsidy.service.CertMemberFileMappingService
;
import
com.subsidy.service.CertMemberMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.vo.cert.GetListVO
;
import
com.subsidy.vo.cert.GetSignInfoVO
;
import
com.subsidy.vo.cert.SignManagementVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* <p>
* 学生报名证书表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Service
public
class
CertMemberMappingServiceImpl
extends
ServiceImpl
<
CertMemberMappingMapper
,
CertMemberMappingDO
>
implements
CertMemberMappingService
{
@Autowired
private
CertMemberFileMappingMapper
certMemberFileMappingMapper
;
@Autowired
private
CertTypeDictMapper
certTypeDictMapper
;
@Autowired
private
CertRequirementMapper
certRequirementMapper
;
public
String
signUp
(
SignUpDTO
signUpDTO
)
{
List
<
CertMemberFileMappingDO
>
certMemberFileMappingDOS
=
signUpDTO
.
getFiles
();
for
(
CertMemberFileMappingDO
certMemberFileMappingDO
:
certMemberFileMappingDOS
)
{
certMemberFileMappingDO
.
setCertId
(
signUpDTO
.
getCertId
());
certMemberFileMappingDO
.
setMemberId
(
signUpDTO
.
getMemberId
());
certMemberFileMappingMapper
.
insert
(
certMemberFileMappingDO
);
}
CertMemberMappingDO
certMemberMappingDO
=
new
CertMemberMappingDO
();
certMemberMappingDO
.
setCertId
(
signUpDTO
.
getCertId
());
certMemberMappingDO
.
setMemberId
(
signUpDTO
.
getMemberId
());
certMemberMappingDO
.
setOrderNo
(
System
.
currentTimeMillis
());
certMemberMappingDO
.
setStatus
(
"报名成功"
);
this
.
baseMapper
.
insert
(
certMemberMappingDO
);
//生成订单逻辑 TODO
return
ConstantUtils
.
ADD_SUCCESS
;
}
public
IPage
<
SignManagementVO
>
signManagement
(
SignManagementDTO
signManagementDTO
)
{
Page
pager
=
new
Page
(
signManagementDTO
.
getPageNum
(),
signManagementDTO
.
getPageSize
());
//获取报名订单
IPage
<
SignManagementVO
>
signManagementVOIPage
=
this
.
baseMapper
.
signManagement
(
pager
,
signManagementDTO
.
getStatus
(),
signManagementDTO
.
getTypeId
(),
signManagementDTO
.
getCertId
(),
signManagementDTO
.
getItem
(),
signManagementDTO
.
getStartDate
(),
signManagementDTO
.
getEndDate
());
List
<
SignManagementVO
>
signManagementVOS
=
signManagementVOIPage
.
getRecords
();
for
(
SignManagementVO
signManagementVO
:
signManagementVOS
)
{
signManagementVO
.
setCnt
(
"1"
);
//类目
List
<
CertTypeDictDO
>
certTypeDictDOS
=
certTypeDictMapper
.
getCertTypes
(
signManagementVO
.
getCertId
());
signManagementVO
.
setCertTypeDictDOS
(
certTypeDictDOS
);
//附件
List
<
CertRequirementDO
>
certRequirementDOS
=
certRequirementMapper
.
selectList
(
new
QueryWrapper
<
CertRequirementDO
>()
.
lambda
()
.
eq
(
CertRequirementDO:
:
getCertId
,
signManagementVO
.
getCertId
()));
signManagementVO
.
setCertRequirementDOS
(
certRequirementDOS
);
}
return
signManagementVOIPage
;
}
public
String
changeStatus
(
CertMemberMappingDO
certMemberMappingDO
)
{
CertMemberMappingDO
certMemberMappingDO1
=
this
.
baseMapper
.
selectById
(
certMemberMappingDO
.
getId
());
certMemberMappingDO1
.
setStatus
(
certMemberMappingDO
.
getStatus
());
this
.
baseMapper
.
updateById
(
certMemberMappingDO
);
return
ConstantUtils
.
SET_SUCCESS
;
}
public
IPage
<
GetListVO
>
getList
(
GetListDTO
getListDTO
)
{
Page
pager
=
new
Page
(
getListDTO
.
getPageNum
(),
getListDTO
.
getPageSize
());
return
this
.
baseMapper
.
getList
(
pager
,
getListDTO
.
getMemberId
(),
getListDTO
.
getStatus
());
}
public
GetSignInfoVO
getSignInfo
(
CertMemberMappingDO
certMemberMappingDO
){
return
this
.
baseMapper
.
getSignInfo
(
certMemberMappingDO
.
getMemberId
(),
certMemberMappingDO
.
getCertId
());
}
}
src/main/java/com/subsidy/service/impl/CertRequirementServiceImpl.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.subsidy.common.exception.HttpException
;
import
com.subsidy.mapper.CertMemberFileMappingMapper
;
import
com.subsidy.model.CertMemberFileMappingDO
;
import
com.subsidy.model.CertRequirementDO
;
import
com.subsidy.mapper.CertRequirementMapper
;
import
com.subsidy.service.CertRequirementService
;
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.List
;
/**
* <p>
* 报名条件表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-05-12
*/
@Service
public
class
CertRequirementServiceImpl
extends
ServiceImpl
<
CertRequirementMapper
,
CertRequirementDO
>
implements
CertRequirementService
{
@Autowired
private
CertMemberFileMappingMapper
certMemberFileMappingMapper
;
public
List
<
CertRequirementDO
>
getRequirements
(
CertRequirementDO
certRequirementDO
)
{
return
this
.
baseMapper
.
selectList
(
new
QueryWrapper
<
CertRequirementDO
>()
.
lambda
()
.
eq
(
CertRequirementDO:
:
getCertId
,
certRequirementDO
.
getCertId
()));
}
public
String
deleteRequirement
(
CertRequirementDO
certRequirementDO
)
{
//删除条件
this
.
baseMapper
.
deleteById
(
certRequirementDO
.
getId
());
//删除这个条件下的证书关联
certMemberFileMappingMapper
.
delete
(
new
QueryWrapper
<
CertMemberFileMappingDO
>()
.
lambda
()
.
eq
(
CertMemberFileMappingDO:
:
getRequirementId
,
certRequirementDO
.
getCertId
()));
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
String
addRequirement
(
CertRequirementDO
certRequirementDO
)
{
//判断该条件是否已存在
int
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
CertRequirementDO
>()
.
lambda
()
.
eq
(
CertRequirementDO:
:
getCertId
,
certRequirementDO
.
getCertId
())
.
eq
(
CertRequirementDO:
:
getCertRequirement
,
certRequirementDO
.
getCertRequirement
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
16001
);
}
this
.
baseMapper
.
insert
(
certRequirementDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
}
public
String
updateRequirement
(
CertRequirementDO
certRequirementDO
)
{
//判断该条件是否已存在
int
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
CertRequirementDO
>()
.
lambda
()
.
eq
(
CertRequirementDO:
:
getCertId
,
certRequirementDO
.
getCertId
())
.
eq
(
CertRequirementDO:
:
getCertRequirement
,
certRequirementDO
.
getCertRequirement
())
.
ne
(
CertRequirementDO:
:
getId
,
certRequirementDO
.
getId
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
16001
);
}
this
.
baseMapper
.
updateById
(
certRequirementDO
);
return
ConstantUtils
.
SET_SUCCESS
;
}
}
src/main/java/com/subsidy/service/impl/CertTypeDictServiceImpl.java
0 → 100644
View file @
2db3375
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.cert.GetAllTypeDTO
;
import
com.subsidy.mapper.CertTypeMappingMapper
;
import
com.subsidy.model.CertCompanyMappingDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
com.subsidy.mapper.CertTypeDictMapper
;
import
com.subsidy.model.CertTypeMappingDO
;
import
com.subsidy.service.CertTypeDictService
;
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.List
;
/**
* <p>
* 证书类目字典表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Service
public
class
CertTypeDictServiceImpl
extends
ServiceImpl
<
CertTypeDictMapper
,
CertTypeDictDO
>
implements
CertTypeDictService
{
@Autowired
private
CertTypeMappingMapper
certTypeMappingMapper
;
public
List
<
CertTypeDictDO
>
getCompanyCertTypes
(
CertCompanyMappingDO
certCompanyMappingDO
)
{
return
this
.
baseMapper
.
getCompanyCertTypes
(
certCompanyMappingDO
.
getCompanyId
());
}
public
String
addType
(
CertTypeDictDO
certTypeDictDO
)
{
int
count
=
this
.
baseMapper
.
selectCount
(
new
QueryWrapper
<
CertTypeDictDO
>()
.
lambda
()
.
eq
(
CertTypeDictDO:
:
getTypeName
,
certTypeDictDO
.
getTypeName
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
15001
);
}
this
.
baseMapper
.
insert
(
certTypeDictDO
);
return
ConstantUtils
.
ADD_SUCCESS
;
}
public
String
deleteType
(
CertTypeDictDO
certTypeDictDO
)
{
int
count
=
certTypeMappingMapper
.
selectCount
(
new
QueryWrapper
<
CertTypeMappingDO
>()
.
lambda
()
.
eq
(
CertTypeMappingDO:
:
getTypeId
,
certTypeDictDO
.
getId
()));
if
(
count
>
0
)
{
throw
new
HttpException
(
15002
);
}
this
.
baseMapper
.
deleteById
(
certTypeDictDO
.
getId
());
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
String
updateType
(
CertTypeDictDO
certTypeDictDO
)
{
this
.
baseMapper
.
updateById
(
certTypeDictDO
);
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
IPage
<
CertTypeDictDO
>
getAllType
(
GetAllTypeDTO
getAllTypeDTO
){
Page
pager
=
new
Page
(
getAllTypeDTO
.
getPageNum
(),
getAllTypeDTO
.
getPageSize
());
return
this
.
baseMapper
.
selectPage
(
pager
,
null
);
}
}
src/main/java/com/subsidy/service/impl/CertTypeMappingServiceImpl.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.CertTypeMappingDO
;
import
com.subsidy.mapper.CertTypeMappingMapper
;
import
com.subsidy.service.CertTypeMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 证书-类型映射表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-05-11
*/
@Service
public
class
CertTypeMappingServiceImpl
extends
ServiceImpl
<
CertTypeMappingMapper
,
CertTypeMappingDO
>
implements
CertTypeMappingService
{
}
src/main/java/com/subsidy/service/impl/VodDictServiceImpl.java
View file @
2db3375
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.common.configure.VODConfig
;
import
com.subsidy.common.exception.HttpException
;
...
...
src/main/java/com/subsidy/vo/cert/GetAllCertsVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
GetAllCertsVO
extends
CertDictDO
{
private
List
<
CertTypeDictDO
>
certTypeDictDOS
;
}
src/main/java/com/subsidy/vo/cert/GetAllCertsWithoutTypeVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
lombok.Data
;
@Data
public
class
GetAllCertsWithoutTypeVO
{
private
Long
id
;
private
String
certName
;
}
src/main/java/com/subsidy/vo/cert/GetCompanyCertsVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
GetCompanyCertsVO
extends
CertDictDO
{
List
<
CertTypeDictDO
>
certTypeDictDOS
;
private
Boolean
signStatus
;
}
src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
com.subsidy.model.CertDictDO
;
import
lombok.Data
;
@Data
public
class
GetCompanyCertsWithStatusVO
extends
CertDictDO
{
private
Boolean
status
;
}
src/main/java/com/subsidy/vo/cert/GetListVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
lombok.Data
;
@Data
public
class
GetListVO
{
}
src/main/java/com/subsidy/vo/cert/GetOneCertVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
com.subsidy.model.CertDictDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
GetOneCertVO
extends
CertDictDO
{
private
List
<
CertTypeDictDO
>
certTypeDictDOS
;
}
src/main/java/com/subsidy/vo/cert/GetSignInfoVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
lombok.Data
;
@Data
public
class
GetSignInfoVO
{
private
Long
memberId
;
private
Long
certId
;
}
src/main/java/com/subsidy/vo/cert/SignManagementVO.java
0 → 100644
View file @
2db3375
package
com
.
subsidy
.
vo
.
cert
;
import
com.subsidy.model.CertRequirementDO
;
import
com.subsidy.model.CertTypeDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
SignManagementVO
{
private
Long
id
;
private
Long
certId
;
private
String
createDate
;
private
String
certName
;
private
String
price
;
private
String
userName
;
private
String
companyName
;
private
String
status
;
private
String
cnt
;
private
List
<
CertTypeDictDO
>
certTypeDictDOS
;
private
List
<
CertRequirementDO
>
certRequirementDOS
;
}
src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java
View file @
2db3375
...
...
@@ -29,4 +29,8 @@ public class GetClassBaseInfoVO {
private
Boolean
testFlag
;
private
String
coverPage
;
}
src/main/java/com/subsidy/vo/member/MemberVodVO.java
View file @
2db3375
...
...
@@ -22,6 +22,6 @@ public class MemberVodVO {
private
Integer
playRecord
;
private
Integer
leftLength
;
private
String
leftLength
;
}
src/main/resources/application.properties
View file @
2db3375
# 环境配置
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 @
2db3375
...
...
@@ -57,5 +57,10 @@ meishu.code-message[13001]=已达到当日最大时长
meishu.code-message[14001]=认证失败,签名不通过
meishu.code-message[14002]=认证失败,签名已过期
meishu.code-message[15001]=类型已存在
meishu.code-message[15002]=类型已存在证书,删除失败
meishu.code-message[16001]=该条件已存在
src/main/resources/mapper/CertCompanyMappingMapper.xml
0 → 100644
View file @
2db3375
<?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.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
t2.*
FROM
cert_company_mapping t
LEFT JOIN cert_type_mapping t3 ON t.cert_id = t3.cert_id
LEFT JOIN cert_dict t2 ON t.cert_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t.company_id = #{companyId}
<if
test=
"typeId != null and typeId !=''"
>
AND t3.type_id = #{typeId}
</if>
</select>
<select
id=
"getCompanyCertStatus"
resultType=
"com.subsidy.vo.cert.GetCompanyCertsVO"
>
select * from cert_dict t where t.delete_date is null
</select>
</mapper>
src/main/resources/mapper/CertDictMapper.xml
0 → 100644
View file @
2db3375
<?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.CertDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CertDictDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"update_date"
property=
"updateDate"
/>
<result
column=
"cert_name"
property=
"certName"
/>
<result
column=
"price"
property=
"price"
/>
<result
column=
"cover_page"
property=
"coverPage"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
id, cert_name, price, cover_page, end_date
</sql>
<select
id=
"getAllCerts"
resultType=
"com.subsidy.vo.cert.GetAllCertsVO"
>
SELECT DISTINCT
t.*
FROM
cert_dict t
LEFT JOIN cert_type_mapping t2 ON t.id = t2.cert_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
<if
test=
"typeId != null and typeId != ''"
>
and t2.type_id = #{typeId}
</if>
<if
test=
"certName != null and certName != ''"
>
and t.cert_name like concat('%',#{certName} ,'%')
</if>
</select>
<select
id=
"getAllCertsWithoutType"
resultType=
"com.subsidy.vo.cert.GetAllCertsWithoutTypeVO"
>
select id,cert_name from cert_dict t where t.delete_date is null
</select>
</mapper>
src/main/resources/mapper/CertMemberFileMappingMapper.xml
0 → 100644
View file @
2db3375
<?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.CertMemberFileMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CertMemberFileMappingDO"
>
<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=
"cert_id"
property=
"certId"
/>
<result
column=
"file_name"
property=
"fileName"
/>
<result
column=
"file_url"
property=
"fileUrl"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, cert_id, file_name, file_url
</sql>
</mapper>
src/main/resources/mapper/CertMemberMappingMapper.xml
0 → 100644
View file @
2db3375
<?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.CertMemberMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CertMemberMappingDO"
>
<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=
"member_id"
property=
"memberId"
/>
<result
column=
"cert_id"
property=
"certId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, member_id, cert_id
</sql>
<select
id=
"signManagement"
resultType=
"com.subsidy.vo.cert.SignManagementVO"
>
SELECT
t.id as certId,
t4.id,
t4.create_date,
t.cert_name,
t.price,
t6.user_name,
t5.company_name,
t4.`status`
FROM
cert_dict t
LEFT JOIN (
SELECT DISTINCT
t.id,
t.cert_id,
t.member_id,
t.create_date,
t.`status`
FROM
cert_member_mapping t
LEFT JOIN cert_type_mapping t3 ON t.cert_id = t3.cert_id
WHERE
t.delete_date IS NULL
AND t3.delete_date IS NULL
<if
test=
"status != null and status != ''"
>
AND t.`status` = #{status}
</if>
<if
test=
" typeId != null and typeId != ''"
>
AND t3.type_id = #{typeId}
</if>
<if
test=
" certId != null and certId != ''"
>
AND t.cert_id = #{certId}
</if>
<if
test=
"startDate != null and start != ''"
>
and DATE_FORMAT(t.create_date ,'%Y-%m-%d')>= DATE_FORMAT(#{startDate}, '%Y-%m-%d')
</if>
<if
test=
"endDate != null and endDate != ''"
>
and DATE_FORMAT(t.create_date ,'%Y-%m-%d')
<
= DATE_FORMAT(#{endDate}, '%Y-%m-%d')
</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
WHERE
t.delete_date IS NULL
AND t5.delete_date IS NULL
AND t6.delete_date IS NULL
<if
test=
"item != null and item != ''"
>
AND (t.cert_name LIKE concat('%',#{item} ,'%')
AND t5.company_name LIKE concat('%',#{item} ,'%'))
</if>
</select>
<select
id=
"getList"
resultType=
"com.subsidy.vo.cert.GetListVO"
>
SELECT
t.id,
t2.cert_name,
t2.id AS cert_id,
t2.cover_page,
t.create_date
FROM
cert_member_mapping t
LEFT JOIN cert_dict t2 ON t.cert_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.member_id = #{memberId}
<if
test=
"status != null and status !=''"
>
and t.status = #{status}
</if>
</select>
<select
id=
"getSignInfo"
resultType=
"com.subsidy.vo.cert.GetSignInfoVO"
>
SELECT
t2.user_name,
t.order_no
FROM
cert_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.cert_id =#{certId}
and t.member_id = #{memberId}
</select>
</mapper>
src/main/resources/mapper/CertRequirementMapper.xml
0 → 100644
View file @
2db3375
<?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.CertRequirementMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CertRequirementDO"
>
<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=
"cert_id"
property=
"certId"
/>
<result
column=
"cert_requirement"
property=
"certRequirement"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, cert_id, cert_requirement
</sql>
</mapper>
src/main/resources/mapper/CertTypeDictMapper.xml
0 → 100644
View file @
2db3375
<?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.CertTypeDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CertTypeDictDO"
>
<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=
"type_name"
property=
"typeName"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, type_name
</sql>
<select
id=
"getCompanyCertTypes"
parameterType=
"long"
resultType=
"com.subsidy.model.CertTypeDictDO"
>
SELECT DISTINCT
t3.*
FROM
cert_company_mapping t
LEFT JOIN cert_type_mapping t2 ON t.cert_id = t2.cert_id
LEFT JOIN cert_type_dict t3 ON t2.type_id = t3.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t.company_id = #{companyId}
</select>
<select
id=
"getCertTypes"
parameterType=
"long"
resultType=
"com.subsidy.model.CertTypeDictDO"
>
SELECT
t2.*
FROM
cert_type_mapping t
LEFT JOIN cert_type_dict t2 ON t.type_id = t2.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
AND t.cert_id = #{certId}
</select>
</mapper>
src/main/resources/mapper/CertTypeMappingMapper.xml
0 → 100644
View file @
2db3375
<?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.CertTypeMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CertTypeMappingDO"
>
<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=
"cert_id"
property=
"certId"
/>
<result
column=
"type_id"
property=
"typeId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, cert_id, type_id
</sql>
</mapper>
src/main/resources/mapper/ClassDictMapper.xml
View file @
2db3375
...
...
@@ -136,7 +136,8 @@
t3.id as classTypeId,
t.is_order,
t.is_fast_play,
t.test_rule
t.test_rule,
t2.cover_page
FROM
class_dict t
LEFT JOIN course_dict t2 ON t.course_id = t2.id
...
...
src/main/resources/mapper/CourseContentMapper.xml
View file @
2db3375
...
...
@@ -51,7 +51,7 @@
t3.vod_type,
t3.vod_length,
t3.play_record,
if(t3.vod_length - t3.sumPlay > 0,
t3.vod_length - t3.sumPlay
, 0 ) AS leftLength,
if(t3.vod_length - t3.sumPlay > 0,
TRUNCATE(t3.vod_length - t3.sumPlay,0)
, 0 ) AS leftLength,
if(TRUNCATE( t3.sumPlay * 100 / t3.vod_length,2)
<
100,TRUNCATE( t3.sumPlay * 100 / t3.vod_length, 2),100) AS percent
FROM
(
...
...
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