From 2db33758907d06b922c02f2a68ce7d8dce1a8b30 Mon Sep 17 00:00:00 2001 From: typ Date: Wed, 18 May 2022 17:17:37 +0800 Subject: [PATCH] 定时器表有点问题 --- src/main/java/com/subsidy/controller/CertCompanyMappingController.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/controller/CertDictController.java | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/controller/CertMemberFileMappingController.java | 26 ++++++++++++++++++++++++++ src/main/java/com/subsidy/controller/CertMemberMappingController.java | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/controller/CertRequirementController.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/controller/CertTypeDictController.java | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/controller/CertTypeMappingController.java | 25 +++++++++++++++++++++++++ src/main/java/com/subsidy/controller/MemberController.java | 2 +- src/main/java/com/subsidy/dto/cert/AddCertDTO.java | 13 +++++++++++++ src/main/java/com/subsidy/dto/cert/ChangeCompanyCertsDTO.java | 14 ++++++++++++++ src/main/java/com/subsidy/dto/cert/GetAllCertsDTO.java | 17 +++++++++++++++++ src/main/java/com/subsidy/dto/cert/GetAllTypeDTO.java | 12 ++++++++++++ src/main/java/com/subsidy/dto/cert/GetCompanyCertsDTO.java | 14 ++++++++++++++ src/main/java/com/subsidy/dto/cert/GetCompanyCertsWithStatusDTO.java | 15 +++++++++++++++ src/main/java/com/subsidy/dto/cert/GetListDTO.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/dto/cert/SignManagementDTO.java | 24 ++++++++++++++++++++++++ src/main/java/com/subsidy/dto/cert/SignUpDTO.java | 17 +++++++++++++++++ src/main/java/com/subsidy/mapper/CertCompanyMappingMapper.java | 29 +++++++++++++++++++++++++++++ src/main/java/com/subsidy/mapper/CertDictMapper.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/mapper/CertMemberFileMappingMapper.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java | 38 ++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/mapper/CertRequirementMapper.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/mapper/CertTypeDictMapper.java | 30 ++++++++++++++++++++++++++++++ src/main/java/com/subsidy/mapper/CertTypeMappingMapper.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/model/CertCompanyMappingDO.java | 39 +++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/CertDictDO.java | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/CertMemberFileMappingDO.java | 39 +++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/CertMemberMappingDO.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/CertRequirementDO.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/CertTypeDictDO.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/CertTypeMappingDO.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/CertCompanyMappingService.java | 30 ++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/CertDictService.java | 36 ++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/CertMemberFileMappingService.java | 16 ++++++++++++++++ src/main/java/com/subsidy/service/CertMemberMappingService.java | 34 ++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/CertRequirementService.java | 26 ++++++++++++++++++++++++++ src/main/java/com/subsidy/service/CertTypeDictService.java | 30 ++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/CertTypeMappingService.java | 16 ++++++++++++++++ src/main/java/com/subsidy/service/impl/CertCompanyMappingServiceImpl.java | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/impl/CertMemberFileMappingServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/impl/CertRequirementServiceImpl.java | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/impl/CertTypeDictServiceImpl.java | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/impl/CertTypeMappingServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/subsidy/service/impl/VodDictServiceImpl.java | 2 -- src/main/java/com/subsidy/vo/cert/GetAllCertsVO.java | 14 ++++++++++++++ src/main/java/com/subsidy/vo/cert/GetAllCertsWithoutTypeVO.java | 12 ++++++++++++ src/main/java/com/subsidy/vo/cert/GetCompanyCertsVO.java | 16 ++++++++++++++++ src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java | 11 +++++++++++ src/main/java/com/subsidy/vo/cert/GetListVO.java | 7 +++++++ src/main/java/com/subsidy/vo/cert/GetOneCertVO.java | 14 ++++++++++++++ src/main/java/com/subsidy/vo/cert/GetSignInfoVO.java | 12 ++++++++++++ src/main/java/com/subsidy/vo/cert/SignManagementVO.java | 34 ++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java | 4 ++++ src/main/java/com/subsidy/vo/member/MemberVodVO.java | 2 +- src/main/resources/application.properties | 4 ++-- src/main/resources/code.properties | 5 +++++ src/main/resources/mapper/CertCompanyMappingMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/CertDictMapper.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/CertMemberFileMappingMapper.xml | 24 ++++++++++++++++++++++++ src/main/resources/mapper/CertMemberMappingMapper.xml | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/CertRequirementMapper.xml | 23 +++++++++++++++++++++++ src/main/resources/mapper/CertTypeDictMapper.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/CertTypeMappingMapper.xml | 23 +++++++++++++++++++++++ src/main/resources/mapper/ClassDictMapper.xml | 3 ++- src/main/resources/mapper/CourseContentMapper.xml | 2 +- 67 files changed, 2206 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/subsidy/controller/CertCompanyMappingController.java create mode 100644 src/main/java/com/subsidy/controller/CertDictController.java create mode 100644 src/main/java/com/subsidy/controller/CertMemberFileMappingController.java create mode 100644 src/main/java/com/subsidy/controller/CertMemberMappingController.java create mode 100644 src/main/java/com/subsidy/controller/CertRequirementController.java create mode 100644 src/main/java/com/subsidy/controller/CertTypeDictController.java create mode 100644 src/main/java/com/subsidy/controller/CertTypeMappingController.java create mode 100644 src/main/java/com/subsidy/dto/cert/AddCertDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/ChangeCompanyCertsDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/GetAllCertsDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/GetAllTypeDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/GetCompanyCertsDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/GetCompanyCertsWithStatusDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/GetListDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/SignManagementDTO.java create mode 100644 src/main/java/com/subsidy/dto/cert/SignUpDTO.java create mode 100644 src/main/java/com/subsidy/mapper/CertCompanyMappingMapper.java create mode 100644 src/main/java/com/subsidy/mapper/CertDictMapper.java create mode 100644 src/main/java/com/subsidy/mapper/CertMemberFileMappingMapper.java create mode 100644 src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java create mode 100644 src/main/java/com/subsidy/mapper/CertRequirementMapper.java create mode 100644 src/main/java/com/subsidy/mapper/CertTypeDictMapper.java create mode 100644 src/main/java/com/subsidy/mapper/CertTypeMappingMapper.java create mode 100644 src/main/java/com/subsidy/model/CertCompanyMappingDO.java create mode 100644 src/main/java/com/subsidy/model/CertDictDO.java create mode 100644 src/main/java/com/subsidy/model/CertMemberFileMappingDO.java create mode 100644 src/main/java/com/subsidy/model/CertMemberMappingDO.java create mode 100644 src/main/java/com/subsidy/model/CertRequirementDO.java create mode 100644 src/main/java/com/subsidy/model/CertTypeDictDO.java create mode 100644 src/main/java/com/subsidy/model/CertTypeMappingDO.java create mode 100644 src/main/java/com/subsidy/service/CertCompanyMappingService.java create mode 100644 src/main/java/com/subsidy/service/CertDictService.java create mode 100644 src/main/java/com/subsidy/service/CertMemberFileMappingService.java create mode 100644 src/main/java/com/subsidy/service/CertMemberMappingService.java create mode 100644 src/main/java/com/subsidy/service/CertRequirementService.java create mode 100644 src/main/java/com/subsidy/service/CertTypeDictService.java create mode 100644 src/main/java/com/subsidy/service/CertTypeMappingService.java create mode 100644 src/main/java/com/subsidy/service/impl/CertCompanyMappingServiceImpl.java create mode 100644 src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java create mode 100644 src/main/java/com/subsidy/service/impl/CertMemberFileMappingServiceImpl.java create mode 100644 src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java create mode 100644 src/main/java/com/subsidy/service/impl/CertRequirementServiceImpl.java create mode 100644 src/main/java/com/subsidy/service/impl/CertTypeDictServiceImpl.java create mode 100644 src/main/java/com/subsidy/service/impl/CertTypeMappingServiceImpl.java create mode 100644 src/main/java/com/subsidy/vo/cert/GetAllCertsVO.java create mode 100644 src/main/java/com/subsidy/vo/cert/GetAllCertsWithoutTypeVO.java create mode 100644 src/main/java/com/subsidy/vo/cert/GetCompanyCertsVO.java create mode 100644 src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java create mode 100644 src/main/java/com/subsidy/vo/cert/GetListVO.java create mode 100644 src/main/java/com/subsidy/vo/cert/GetOneCertVO.java create mode 100644 src/main/java/com/subsidy/vo/cert/GetSignInfoVO.java create mode 100644 src/main/java/com/subsidy/vo/cert/SignManagementVO.java create mode 100644 src/main/resources/mapper/CertCompanyMappingMapper.xml create mode 100644 src/main/resources/mapper/CertDictMapper.xml create mode 100644 src/main/resources/mapper/CertMemberFileMappingMapper.xml create mode 100644 src/main/resources/mapper/CertMemberMappingMapper.xml create mode 100644 src/main/resources/mapper/CertRequirementMapper.xml create mode 100644 src/main/resources/mapper/CertTypeDictMapper.xml create mode 100644 src/main/resources/mapper/CertTypeMappingMapper.xml diff --git a/src/main/java/com/subsidy/controller/CertCompanyMappingController.java b/src/main/java/com/subsidy/controller/CertCompanyMappingController.java new file mode 100644 index 0000000..3ff8543 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertCompanyMappingController.java @@ -0,0 +1,54 @@ +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; + +/** + *

+ * 证书-公司映射表 前端控制器 + *

+ * + * @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)); + } + + + + +} diff --git a/src/main/java/com/subsidy/controller/CertDictController.java b/src/main/java/com/subsidy/controller/CertDictController.java new file mode 100644 index 0000000..40d6d39 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertDictController.java @@ -0,0 +1,71 @@ +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; + +/** + *

+ * 证书字典表 前端控制器 + *

+ * + * @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()); + } + +} diff --git a/src/main/java/com/subsidy/controller/CertMemberFileMappingController.java b/src/main/java/com/subsidy/controller/CertMemberFileMappingController.java new file mode 100644 index 0000000..e566ab4 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertMemberFileMappingController.java @@ -0,0 +1,26 @@ +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; + +/** + *

+ * 前端控制器 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@RestController +@Api(tags = "学生报名材料 映射表") +@RequestMapping("/certMemberFileMapping") +public class CertMemberFileMappingController { + + +} diff --git a/src/main/java/com/subsidy/controller/CertMemberMappingController.java b/src/main/java/com/subsidy/controller/CertMemberMappingController.java new file mode 100644 index 0000000..32e3e3b --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertMemberMappingController.java @@ -0,0 +1,65 @@ +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; + +/** + *

+ * 学生报名证书表 前端控制器 + *

+ * + * @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)); + } + +} diff --git a/src/main/java/com/subsidy/controller/CertRequirementController.java b/src/main/java/com/subsidy/controller/CertRequirementController.java new file mode 100644 index 0000000..929e538 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertRequirementController.java @@ -0,0 +1,59 @@ +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; + +/** + *

+ * 报名条件表 前端控制器 + *

+ * + * @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)); + } + +} diff --git a/src/main/java/com/subsidy/controller/CertTypeDictController.java b/src/main/java/com/subsidy/controller/CertTypeDictController.java new file mode 100644 index 0000000..e542010 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertTypeDictController.java @@ -0,0 +1,65 @@ +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; + +/** + *

+ * 证书类目字典表 前端控制器 + *

+ * + * @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)); + } + + +} diff --git a/src/main/java/com/subsidy/controller/CertTypeMappingController.java b/src/main/java/com/subsidy/controller/CertTypeMappingController.java new file mode 100644 index 0000000..03b3196 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertTypeMappingController.java @@ -0,0 +1,25 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *

+ * 证书-类型映射表 前端控制器 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@RestController +@Api(tags = "证书-类型映射表") +@RequestMapping("/certTypeMapping") +public class CertTypeMappingController { + + + + +} diff --git a/src/main/java/com/subsidy/controller/MemberController.java b/src/main/java/com/subsidy/controller/MemberController.java index 2ca87e6..cfa723b 100644 --- a/src/main/java/com/subsidy/controller/MemberController.java +++ b/src/main/java/com/subsidy/controller/MemberController.java @@ -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)); } diff --git a/src/main/java/com/subsidy/dto/cert/AddCertDTO.java b/src/main/java/com/subsidy/dto/cert/AddCertDTO.java new file mode 100644 index 0000000..f216892 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/AddCertDTO.java @@ -0,0 +1,13 @@ +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 typeIds; + +} diff --git a/src/main/java/com/subsidy/dto/cert/ChangeCompanyCertsDTO.java b/src/main/java/com/subsidy/dto/cert/ChangeCompanyCertsDTO.java new file mode 100644 index 0000000..c10dec0 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/ChangeCompanyCertsDTO.java @@ -0,0 +1,14 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class ChangeCompanyCertsDTO { + + private Long companyId; + + private Long certId; + + private Boolean signStatus; + +} diff --git a/src/main/java/com/subsidy/dto/cert/GetAllCertsDTO.java b/src/main/java/com/subsidy/dto/cert/GetAllCertsDTO.java new file mode 100644 index 0000000..b510252 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/GetAllCertsDTO.java @@ -0,0 +1,17 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class GetAllCertsDTO { + + + private Integer pageSize; + + private Integer pageNum; + + private Long certTypeId; + + private String certName; + +} diff --git a/src/main/java/com/subsidy/dto/cert/GetAllTypeDTO.java b/src/main/java/com/subsidy/dto/cert/GetAllTypeDTO.java new file mode 100644 index 0000000..4f8e555 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/GetAllTypeDTO.java @@ -0,0 +1,12 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class GetAllTypeDTO { + + private Integer pageSize; + + private Integer pageNum; + +} diff --git a/src/main/java/com/subsidy/dto/cert/GetCompanyCertsDTO.java b/src/main/java/com/subsidy/dto/cert/GetCompanyCertsDTO.java new file mode 100644 index 0000000..1c70b64 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/GetCompanyCertsDTO.java @@ -0,0 +1,14 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class GetCompanyCertsDTO { + + private Long companyId; + + private Integer pageSize; + + private Integer pageNum; + +} diff --git a/src/main/java/com/subsidy/dto/cert/GetCompanyCertsWithStatusDTO.java b/src/main/java/com/subsidy/dto/cert/GetCompanyCertsWithStatusDTO.java new file mode 100644 index 0000000..c7093fe --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/GetCompanyCertsWithStatusDTO.java @@ -0,0 +1,15 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class GetCompanyCertsWithStatusDTO { + + private Long companyId; + + private Long typeId; + + private Long memberId; + + +} diff --git a/src/main/java/com/subsidy/dto/cert/GetListDTO.java b/src/main/java/com/subsidy/dto/cert/GetListDTO.java new file mode 100644 index 0000000..af2aff9 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/GetListDTO.java @@ -0,0 +1,18 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class GetListDTO { + + + private Integer pageSize; + + private Integer pageNum; + + private String status; + + private Long memberId; + + +} diff --git a/src/main/java/com/subsidy/dto/cert/SignManagementDTO.java b/src/main/java/com/subsidy/dto/cert/SignManagementDTO.java new file mode 100644 index 0000000..507d65f --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/SignManagementDTO.java @@ -0,0 +1,24 @@ +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; + +} diff --git a/src/main/java/com/subsidy/dto/cert/SignUpDTO.java b/src/main/java/com/subsidy/dto/cert/SignUpDTO.java new file mode 100644 index 0000000..abc4a25 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/SignUpDTO.java @@ -0,0 +1,17 @@ +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 files; + +} diff --git a/src/main/java/com/subsidy/mapper/CertCompanyMappingMapper.java b/src/main/java/com/subsidy/mapper/CertCompanyMappingMapper.java new file mode 100644 index 0000000..3c22363 --- /dev/null +++ b/src/main/java/com/subsidy/mapper/CertCompanyMappingMapper.java @@ -0,0 +1,29 @@ +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; + +/** + *

+ * 证书-公司映射表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Repository +public interface CertCompanyMappingMapper extends BaseMapper { + + //获取某个公司的某个类型下的证书 companyId typeId + List getCompanyCerts(Long CompanyId, Long typeId); + + //获取全部证书公司映射情况 分页 包含企业状态 + IPage getCompanyCertStatus(IPage page); + +} diff --git a/src/main/java/com/subsidy/mapper/CertDictMapper.java b/src/main/java/com/subsidy/mapper/CertDictMapper.java new file mode 100644 index 0000000..c9762c5 --- /dev/null +++ b/src/main/java/com/subsidy/mapper/CertDictMapper.java @@ -0,0 +1,33 @@ +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; + +/** + *

+ * 证书字典表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Repository +public interface CertDictMapper extends BaseMapper { + + /** + * 获取所有证书 + */ + IPage getAllCerts(IPage iPage, Long typeId, String certName); + + /** + * 获取所有证书 下拉列表 不分页 + */ + List getAllCertsWithoutType(); + +} diff --git a/src/main/java/com/subsidy/mapper/CertMemberFileMappingMapper.java b/src/main/java/com/subsidy/mapper/CertMemberFileMappingMapper.java new file mode 100644 index 0000000..b100415 --- /dev/null +++ b/src/main/java/com/subsidy/mapper/CertMemberFileMappingMapper.java @@ -0,0 +1,18 @@ +package com.subsidy.mapper; + +import com.subsidy.model.CertMemberFileMappingDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ + @Repository +public interface CertMemberFileMappingMapper extends BaseMapper { + +} diff --git a/src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java b/src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java new file mode 100644 index 0000000..c5544cc --- /dev/null +++ b/src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java @@ -0,0 +1,38 @@ +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; + +/** + *

+ * 学生报名证书表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Repository +public interface CertMemberMappingMapper extends BaseMapper { + + /** + * 报名管理 + */ + IPage signManagement(IPage page,String status,Long typeId,Long certId,String item,String startDate,String endDate); + + /** + * 查看学生报了几个证书 + */ + IPage getList(IPage page,Long memberId,String status); + + /** + * 获取某个学生 某个证书报名信息 + */ + GetSignInfoVO getSignInfo(Long memberId,Long certId); + +} + diff --git a/src/main/java/com/subsidy/mapper/CertRequirementMapper.java b/src/main/java/com/subsidy/mapper/CertRequirementMapper.java new file mode 100644 index 0000000..23ade9a --- /dev/null +++ b/src/main/java/com/subsidy/mapper/CertRequirementMapper.java @@ -0,0 +1,18 @@ +package com.subsidy.mapper; + +import com.subsidy.model.CertRequirementDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 报名条件表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-05-12 + */ + @Repository +public interface CertRequirementMapper extends BaseMapper { + +} diff --git a/src/main/java/com/subsidy/mapper/CertTypeDictMapper.java b/src/main/java/com/subsidy/mapper/CertTypeDictMapper.java new file mode 100644 index 0000000..1eaddd3 --- /dev/null +++ b/src/main/java/com/subsidy/mapper/CertTypeDictMapper.java @@ -0,0 +1,30 @@ +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; + +/** + *

+ * 证书类目字典表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Repository +public interface CertTypeDictMapper extends BaseMapper { + + /** + * 获取某个公司的所有证书类型 + */ + List getCompanyCertTypes(Long companyId); + + /** + * 查看证书的所有证书类型 + */ + List getCertTypes(Long certId); + +} diff --git a/src/main/java/com/subsidy/mapper/CertTypeMappingMapper.java b/src/main/java/com/subsidy/mapper/CertTypeMappingMapper.java new file mode 100644 index 0000000..fffa683 --- /dev/null +++ b/src/main/java/com/subsidy/mapper/CertTypeMappingMapper.java @@ -0,0 +1,18 @@ +package com.subsidy.mapper; + +import com.subsidy.model.CertTypeMappingDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 证书-类型映射表 Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ + @Repository +public interface CertTypeMappingMapper extends BaseMapper { + +} diff --git a/src/main/java/com/subsidy/model/CertCompanyMappingDO.java b/src/main/java/com/subsidy/model/CertCompanyMappingDO.java new file mode 100644 index 0000000..c90288f --- /dev/null +++ b/src/main/java/com/subsidy/model/CertCompanyMappingDO.java @@ -0,0 +1,39 @@ +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; + +/** + *

+ * 证书-公司映射表 + *

+ * + * @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; + + +} diff --git a/src/main/java/com/subsidy/model/CertDictDO.java b/src/main/java/com/subsidy/model/CertDictDO.java new file mode 100644 index 0000000..acbf111 --- /dev/null +++ b/src/main/java/com/subsidy/model/CertDictDO.java @@ -0,0 +1,89 @@ +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; + +/** + *

+ * 证书字典表 + *

+ * + * @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; + +} diff --git a/src/main/java/com/subsidy/model/CertMemberFileMappingDO.java b/src/main/java/com/subsidy/model/CertMemberFileMappingDO.java new file mode 100644 index 0000000..f5aa2b1 --- /dev/null +++ b/src/main/java/com/subsidy/model/CertMemberFileMappingDO.java @@ -0,0 +1,39 @@ +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; + +/** + *

+ * + *

+ * + * @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; + + +} diff --git a/src/main/java/com/subsidy/model/CertMemberMappingDO.java b/src/main/java/com/subsidy/model/CertMemberMappingDO.java new file mode 100644 index 0000000..c20bbd2 --- /dev/null +++ b/src/main/java/com/subsidy/model/CertMemberMappingDO.java @@ -0,0 +1,36 @@ +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; + +/** + *

+ * 学生报名证书表 + *

+ * + * @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; + +} diff --git a/src/main/java/com/subsidy/model/CertRequirementDO.java b/src/main/java/com/subsidy/model/CertRequirementDO.java new file mode 100644 index 0000000..ea3d05a --- /dev/null +++ b/src/main/java/com/subsidy/model/CertRequirementDO.java @@ -0,0 +1,44 @@ +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; + +/** + *

+ * 报名条件表 + *

+ * + * @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; + + +} diff --git a/src/main/java/com/subsidy/model/CertTypeDictDO.java b/src/main/java/com/subsidy/model/CertTypeDictDO.java new file mode 100644 index 0000000..e09acb1 --- /dev/null +++ b/src/main/java/com/subsidy/model/CertTypeDictDO.java @@ -0,0 +1,31 @@ +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; + +/** + *

+ * 证书类目字典表 + *

+ * + * @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; + + +} diff --git a/src/main/java/com/subsidy/model/CertTypeMappingDO.java b/src/main/java/com/subsidy/model/CertTypeMappingDO.java new file mode 100644 index 0000000..b343e32 --- /dev/null +++ b/src/main/java/com/subsidy/model/CertTypeMappingDO.java @@ -0,0 +1,33 @@ +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; + +/** + *

+ * 证书-类型映射表 + *

+ * + * @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; + + +} diff --git a/src/main/java/com/subsidy/service/CertCompanyMappingService.java b/src/main/java/com/subsidy/service/CertCompanyMappingService.java new file mode 100644 index 0000000..312cc2e --- /dev/null +++ b/src/main/java/com/subsidy/service/CertCompanyMappingService.java @@ -0,0 +1,30 @@ +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; + +/** + *

+ * 证书-公司映射表 服务类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +public interface CertCompanyMappingService extends IService { + + + List getCompanyCertsWithStatus(GetCompanyCertsWithStatusDTO getCompanyCertsDTO); + + IPage getCompanyCerts(GetCompanyCertsDTO getCompanyCertsDTO); + + String changeCompanyCerts(ChangeCompanyCertsDTO changeCompanyCertsDTO); +} diff --git a/src/main/java/com/subsidy/service/CertDictService.java b/src/main/java/com/subsidy/service/CertDictService.java new file mode 100644 index 0000000..f26b182 --- /dev/null +++ b/src/main/java/com/subsidy/service/CertDictService.java @@ -0,0 +1,36 @@ +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; + +/** + *

+ * 证书字典表 服务类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +public interface CertDictService extends IService { + + String addCert(AddCertDTO addCertDTO); + + String deleteCert(CertDictDO certDictDO); + + String updateCert(AddCertDTO addCertDTO); + + GetOneCertVO getOneCert(CertDictDO certDictDO); + + IPage getAllCerts(GetAllCertsDTO getAllCertsDTO); + + List getAllCertsWithoutType(); + +} diff --git a/src/main/java/com/subsidy/service/CertMemberFileMappingService.java b/src/main/java/com/subsidy/service/CertMemberFileMappingService.java new file mode 100644 index 0000000..5a09aca --- /dev/null +++ b/src/main/java/com/subsidy/service/CertMemberFileMappingService.java @@ -0,0 +1,16 @@ +package com.subsidy.service; + +import com.subsidy.model.CertMemberFileMappingDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +public interface CertMemberFileMappingService extends IService { + +} diff --git a/src/main/java/com/subsidy/service/CertMemberMappingService.java b/src/main/java/com/subsidy/service/CertMemberMappingService.java new file mode 100644 index 0000000..202fefe --- /dev/null +++ b/src/main/java/com/subsidy/service/CertMemberMappingService.java @@ -0,0 +1,34 @@ +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; + +/** + *

+ * 学生报名证书表 服务类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +public interface CertMemberMappingService extends IService { + + String signUp(SignUpDTO signUpDTO); + + IPage signManagement(SignManagementDTO signManagementDTO); + + String changeStatus(CertMemberMappingDO certMemberMappingDO); + + IPage getList(GetListDTO getListDTO); + + GetSignInfoVO getSignInfo(CertMemberMappingDO certMemberMappingDO); +} diff --git a/src/main/java/com/subsidy/service/CertRequirementService.java b/src/main/java/com/subsidy/service/CertRequirementService.java new file mode 100644 index 0000000..5ad6157 --- /dev/null +++ b/src/main/java/com/subsidy/service/CertRequirementService.java @@ -0,0 +1,26 @@ +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; + +/** + *

+ * 报名条件表 服务类 + *

+ * + * @author DengMin + * @since 2022-05-12 + */ +public interface CertRequirementService extends IService { + + List getRequirements(CertRequirementDO certRequirementDO); + + String deleteRequirement(CertRequirementDO certRequirementDO); + + String addRequirement(CertRequirementDO certRequirementDO); + + String updateRequirement(CertRequirementDO certRequirementDO); +} diff --git a/src/main/java/com/subsidy/service/CertTypeDictService.java b/src/main/java/com/subsidy/service/CertTypeDictService.java new file mode 100644 index 0000000..047ca6c --- /dev/null +++ b/src/main/java/com/subsidy/service/CertTypeDictService.java @@ -0,0 +1,30 @@ +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; + +/** + *

+ * 证书类目字典表 服务类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +public interface CertTypeDictService extends IService { + + List getCompanyCertTypes(CertCompanyMappingDO certCompanyMappingDO); + + String addType(CertTypeDictDO certTypeDictDO); + + String deleteType(CertTypeDictDO certTypeDictDO); + + String updateType(CertTypeDictDO certTypeDictDO); + + IPage getAllType(GetAllTypeDTO getAllTypeDTO); +} diff --git a/src/main/java/com/subsidy/service/CertTypeMappingService.java b/src/main/java/com/subsidy/service/CertTypeMappingService.java new file mode 100644 index 0000000..53cd0dc --- /dev/null +++ b/src/main/java/com/subsidy/service/CertTypeMappingService.java @@ -0,0 +1,16 @@ +package com.subsidy.service; + +import com.subsidy.model.CertTypeMappingDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 证书-类型映射表 服务类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +public interface CertTypeMappingService extends IService { + +} diff --git a/src/main/java/com/subsidy/service/impl/CertCompanyMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertCompanyMappingServiceImpl.java new file mode 100644 index 0000000..75cd0f6 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/CertCompanyMappingServiceImpl.java @@ -0,0 +1,116 @@ +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; + +/** + *

+ * 证书-公司映射表 服务实现类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Service +public class CertCompanyMappingServiceImpl extends ServiceImpl implements CertCompanyMappingService { + + @Autowired + private CertMemberMappingMapper certMemberMappingMapper; + + @Autowired + private CertTypeDictMapper certTypeDictMapper; + + @Autowired + private CertCompanyMappingMapper certCompanyMappingMapper; + + public List getCompanyCertsWithStatus(GetCompanyCertsWithStatusDTO getCompanyCertsDTO){ + + List getCompanyCertsWithStatusVOS = new ArrayList<>(); + + //查看某个公司所有的证书 + List 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() + .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 getCompanyCerts(GetCompanyCertsDTO getCompanyCertsDTO){ + + Page pager = new Page(getCompanyCertsDTO.getPageNum(), getCompanyCertsDTO.getPageSize()); + + IPage getCompanyCertsVOIPage = this.baseMapper.getCompanyCertStatus(pager); + + List getCompanyCertsVOS = getCompanyCertsVOIPage.getRecords(); + + for (GetCompanyCertsVO getCompanyCertsVO : getCompanyCertsVOS){ + List certTypeDictDOS = certTypeDictMapper.getCertTypes(getCompanyCertsVO.getId()); + getCompanyCertsVO.setCertTypeDictDOS(certTypeDictDOS); + + int count = certCompanyMappingMapper.selectCount(new QueryWrapper() + .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() + .lambda() + .eq(CertCompanyMappingDO::getCertId,changeCompanyCertsDTO.getCertId()) + .eq(CertCompanyMappingDO::getCompanyId,changeCompanyCertsDTO.getCompanyId())); + } + return ConstantUtils.SET_SUCCESS; + } + +} diff --git a/src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java new file mode 100644 index 0000000..627f5d0 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java @@ -0,0 +1,139 @@ +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; + +/** + *

+ * 证书字典表 服务实现类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Service +public class CertDictServiceImpl extends ServiceImpl 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 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() + .lambda() + .eq(CertTypeMappingDO::getCertId,certDictDO.getId())); + + //删除证书相关条件 + certRequirementMapper.delete(new QueryWrapper() + .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() + .lambda() + .eq(CertTypeMappingDO::getCertId, addCertDTO.getId())); + + List 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 certTypeDictDOS = certTypeDictMapper.getCertTypes(certDictDO.getId()); + getOneCertVO.setCertTypeDictDOS(certTypeDictDOS); + + return getOneCertVO; + } + + public IPage getAllCerts(GetAllCertsDTO getAllCertsDTO) { + + Page pager = new Page(getAllCertsDTO.getPageNum(), getAllCertsDTO.getPageSize()); + IPage getAllCertsVOIPage = this.baseMapper.getAllCerts(pager,getAllCertsDTO.getCertTypeId(),getAllCertsDTO.getCertName()); + + List getAllCertsVOS = getAllCertsVOIPage.getRecords(); + for (GetAllCertsVO gav : getAllCertsVOS){ + List certTypeDictDOS = certTypeDictMapper.getCertTypes(gav.getId()); + gav.setCertTypeDictDOS(certTypeDictDOS); + } + return getAllCertsVOIPage; + } + + public List getAllCertsWithoutType(){ + return this.baseMapper.getAllCertsWithoutType(); + } + +} diff --git a/src/main/java/com/subsidy/service/impl/CertMemberFileMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertMemberFileMappingServiceImpl.java new file mode 100644 index 0000000..aaf35e7 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/CertMemberFileMappingServiceImpl.java @@ -0,0 +1,20 @@ +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; + +/** + *

+ * 服务实现类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Service +public class CertMemberFileMappingServiceImpl extends ServiceImpl implements CertMemberFileMappingService { + +} diff --git a/src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java new file mode 100644 index 0000000..1dc40f6 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java @@ -0,0 +1,111 @@ +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; + +/** + *

+ * 学生报名证书表 服务实现类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Service +public class CertMemberMappingServiceImpl extends ServiceImpl implements CertMemberMappingService { + + @Autowired + private CertMemberFileMappingMapper certMemberFileMappingMapper; + + @Autowired + private CertTypeDictMapper certTypeDictMapper; + + @Autowired + private CertRequirementMapper certRequirementMapper; + + public String signUp(SignUpDTO signUpDTO) { + + List 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 signManagement(SignManagementDTO signManagementDTO) { + + Page pager = new Page(signManagementDTO.getPageNum(), signManagementDTO.getPageSize()); + + //获取报名订单 + IPage signManagementVOIPage = this.baseMapper.signManagement(pager, signManagementDTO.getStatus(), signManagementDTO.getTypeId(), signManagementDTO.getCertId(), signManagementDTO.getItem(), signManagementDTO.getStartDate(), signManagementDTO.getEndDate()); + + List signManagementVOS = signManagementVOIPage.getRecords(); + for (SignManagementVO signManagementVO : signManagementVOS) { + signManagementVO.setCnt("1"); + //类目 + List certTypeDictDOS = certTypeDictMapper.getCertTypes(signManagementVO.getCertId()); + signManagementVO.setCertTypeDictDOS(certTypeDictDOS); + + //附件 + List certRequirementDOS = certRequirementMapper.selectList(new QueryWrapper() + .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 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()); + } + +} diff --git a/src/main/java/com/subsidy/service/impl/CertRequirementServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertRequirementServiceImpl.java new file mode 100644 index 0000000..0dd84a5 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/CertRequirementServiceImpl.java @@ -0,0 +1,82 @@ +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; + +/** + *

+ * 报名条件表 服务实现类 + *

+ * + * @author DengMin + * @since 2022-05-12 + */ +@Service +public class CertRequirementServiceImpl extends ServiceImpl implements CertRequirementService { + + @Autowired + private CertMemberFileMappingMapper certMemberFileMappingMapper; + + public List getRequirements(CertRequirementDO certRequirementDO) { + return this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(CertRequirementDO::getCertId, certRequirementDO.getCertId())); + } + + public String deleteRequirement(CertRequirementDO certRequirementDO) { + + //删除条件 + this.baseMapper.deleteById(certRequirementDO.getId()); + + //删除这个条件下的证书关联 + certMemberFileMappingMapper.delete(new QueryWrapper() + .lambda() + .eq(CertMemberFileMappingDO::getRequirementId, certRequirementDO.getCertId())); + return ConstantUtils.DELETE_SUCCESS; + } + + public String addRequirement(CertRequirementDO certRequirementDO) { + + //判断该条件是否已存在 + int count = this.baseMapper.selectCount(new QueryWrapper() + .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() + .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; + } + +} diff --git a/src/main/java/com/subsidy/service/impl/CertTypeDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertTypeDictServiceImpl.java new file mode 100644 index 0000000..0f77607 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/CertTypeDictServiceImpl.java @@ -0,0 +1,78 @@ +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; + +/** + *

+ * 证书类目字典表 服务实现类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Service +public class CertTypeDictServiceImpl extends ServiceImpl implements CertTypeDictService { + + @Autowired + private CertTypeMappingMapper certTypeMappingMapper; + + + public List getCompanyCertTypes(CertCompanyMappingDO certCompanyMappingDO) { + return this.baseMapper.getCompanyCertTypes(certCompanyMappingDO.getCompanyId()); + } + + public String addType(CertTypeDictDO certTypeDictDO) { + + int count = this.baseMapper.selectCount(new QueryWrapper() + .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() + .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 getAllType(GetAllTypeDTO getAllTypeDTO){ + Page pager = new Page(getAllTypeDTO.getPageNum(), getAllTypeDTO.getPageSize()); + return this.baseMapper.selectPage(pager,null); + } +} diff --git a/src/main/java/com/subsidy/service/impl/CertTypeMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertTypeMappingServiceImpl.java new file mode 100644 index 0000000..151eea2 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/CertTypeMappingServiceImpl.java @@ -0,0 +1,20 @@ +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; + +/** + *

+ * 证书-类型映射表 服务实现类 + *

+ * + * @author DengMin + * @since 2022-05-11 + */ +@Service +public class CertTypeMappingServiceImpl extends ServiceImpl implements CertTypeMappingService { + +} diff --git a/src/main/java/com/subsidy/service/impl/VodDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodDictServiceImpl.java index 1fec985..c901400 100644 --- a/src/main/java/com/subsidy/service/impl/VodDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodDictServiceImpl.java @@ -1,8 +1,6 @@ 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; diff --git a/src/main/java/com/subsidy/vo/cert/GetAllCertsVO.java b/src/main/java/com/subsidy/vo/cert/GetAllCertsVO.java new file mode 100644 index 0000000..71beea8 --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/GetAllCertsVO.java @@ -0,0 +1,14 @@ +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 certTypeDictDOS; + +} diff --git a/src/main/java/com/subsidy/vo/cert/GetAllCertsWithoutTypeVO.java b/src/main/java/com/subsidy/vo/cert/GetAllCertsWithoutTypeVO.java new file mode 100644 index 0000000..c225b0b --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/GetAllCertsWithoutTypeVO.java @@ -0,0 +1,12 @@ +package com.subsidy.vo.cert; + +import lombok.Data; + +@Data +public class GetAllCertsWithoutTypeVO { + + private Long id; + + private String certName; + +} diff --git a/src/main/java/com/subsidy/vo/cert/GetCompanyCertsVO.java b/src/main/java/com/subsidy/vo/cert/GetCompanyCertsVO.java new file mode 100644 index 0000000..f29107b --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/GetCompanyCertsVO.java @@ -0,0 +1,16 @@ +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 certTypeDictDOS; + + private Boolean signStatus; + +} diff --git a/src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java b/src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java new file mode 100644 index 0000000..eb0faac --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java @@ -0,0 +1,11 @@ +package com.subsidy.vo.cert; + +import com.subsidy.model.CertDictDO; +import lombok.Data; + +@Data +public class GetCompanyCertsWithStatusVO extends CertDictDO { + + private Boolean status; + +} diff --git a/src/main/java/com/subsidy/vo/cert/GetListVO.java b/src/main/java/com/subsidy/vo/cert/GetListVO.java new file mode 100644 index 0000000..4d7a00a --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/GetListVO.java @@ -0,0 +1,7 @@ +package com.subsidy.vo.cert; + +import lombok.Data; + +@Data +public class GetListVO { +} diff --git a/src/main/java/com/subsidy/vo/cert/GetOneCertVO.java b/src/main/java/com/subsidy/vo/cert/GetOneCertVO.java new file mode 100644 index 0000000..a7225c7 --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/GetOneCertVO.java @@ -0,0 +1,14 @@ +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 certTypeDictDOS; + +} diff --git a/src/main/java/com/subsidy/vo/cert/GetSignInfoVO.java b/src/main/java/com/subsidy/vo/cert/GetSignInfoVO.java new file mode 100644 index 0000000..7fb3892 --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/GetSignInfoVO.java @@ -0,0 +1,12 @@ +package com.subsidy.vo.cert; + +import lombok.Data; + +@Data +public class GetSignInfoVO { + + private Long memberId; + + private Long certId; + +} diff --git a/src/main/java/com/subsidy/vo/cert/SignManagementVO.java b/src/main/java/com/subsidy/vo/cert/SignManagementVO.java new file mode 100644 index 0000000..6211b58 --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/SignManagementVO.java @@ -0,0 +1,34 @@ +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 certTypeDictDOS; + + private List certRequirementDOS; +} diff --git a/src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java b/src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java index cd6d309..b325aa5 100644 --- a/src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java +++ b/src/main/java/com/subsidy/vo/classdict/GetClassBaseInfoVO.java @@ -29,4 +29,8 @@ public class GetClassBaseInfoVO { private Boolean testFlag; + private String coverPage; + + + } diff --git a/src/main/java/com/subsidy/vo/member/MemberVodVO.java b/src/main/java/com/subsidy/vo/member/MemberVodVO.java index 6111ef4..090c120 100644 --- a/src/main/java/com/subsidy/vo/member/MemberVodVO.java +++ b/src/main/java/com/subsidy/vo/member/MemberVodVO.java @@ -22,6 +22,6 @@ public class MemberVodVO { private Integer playRecord; - private Integer leftLength; + private String leftLength; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 37ce64a..a62a220 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,7 @@ # 环境配置 -spring.profiles.active=prod +spring.profiles.active=dev # 端口号 -spring.server.port=23459 +spring.server.port=23457 #嵌入tomcat配置 #和CPU数 spring.server.acceptorThreadCount=600 diff --git a/src/main/resources/code.properties b/src/main/resources/code.properties index e4e8c04..6ed905b 100644 --- a/src/main/resources/code.properties +++ b/src/main/resources/code.properties @@ -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]=该条件已存在 + diff --git a/src/main/resources/mapper/CertCompanyMappingMapper.xml b/src/main/resources/mapper/CertCompanyMappingMapper.xml new file mode 100644 index 0000000..927079c --- /dev/null +++ b/src/main/resources/mapper/CertCompanyMappingMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, company_id, cert_id + + + + + + diff --git a/src/main/resources/mapper/CertDictMapper.xml b/src/main/resources/mapper/CertDictMapper.xml new file mode 100644 index 0000000..66f3357 --- /dev/null +++ b/src/main/resources/mapper/CertDictMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + create_date, + update_date, + id, cert_name, price, cover_page, end_date + + + + + + diff --git a/src/main/resources/mapper/CertMemberFileMappingMapper.xml b/src/main/resources/mapper/CertMemberFileMappingMapper.xml new file mode 100644 index 0000000..1fdc518 --- /dev/null +++ b/src/main/resources/mapper/CertMemberFileMappingMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, cert_id, file_name, file_url + + + diff --git a/src/main/resources/mapper/CertMemberMappingMapper.xml b/src/main/resources/mapper/CertMemberMappingMapper.xml new file mode 100644 index 0000000..ffb25d0 --- /dev/null +++ b/src/main/resources/mapper/CertMemberMappingMapper.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, member_id, cert_id + + + + + + + + diff --git a/src/main/resources/mapper/CertRequirementMapper.xml b/src/main/resources/mapper/CertRequirementMapper.xml new file mode 100644 index 0000000..07c9272 --- /dev/null +++ b/src/main/resources/mapper/CertRequirementMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, cert_id, cert_requirement + + + diff --git a/src/main/resources/mapper/CertTypeDictMapper.xml b/src/main/resources/mapper/CertTypeDictMapper.xml new file mode 100644 index 0000000..b410e4c --- /dev/null +++ b/src/main/resources/mapper/CertTypeDictMapper.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, type_name + + + + + + + diff --git a/src/main/resources/mapper/CertTypeMappingMapper.xml b/src/main/resources/mapper/CertTypeMappingMapper.xml new file mode 100644 index 0000000..41f6fa6 --- /dev/null +++ b/src/main/resources/mapper/CertTypeMappingMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, cert_id, type_id + + + diff --git a/src/main/resources/mapper/ClassDictMapper.xml b/src/main/resources/mapper/ClassDictMapper.xml index 12bb5da..bcfdc4e 100644 --- a/src/main/resources/mapper/ClassDictMapper.xml +++ b/src/main/resources/mapper/ClassDictMapper.xml @@ -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 diff --git a/src/main/resources/mapper/CourseContentMapper.xml b/src/main/resources/mapper/CourseContentMapper.xml index 9a9ae4f..691a4c3 100644 --- a/src/main/resources/mapper/CourseContentMapper.xml +++ b/src/main/resources/mapper/CourseContentMapper.xml @@ -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 ( -- libgit2 0.25.0