diff --git a/src/main/java/com/subsidy/controller/ActivityDetectionController.java b/src/main/java/com/subsidy/controller/ActivityDetectionController.java index c175510..1f763eb 100644 --- a/src/main/java/com/subsidy/controller/ActivityDetectionController.java +++ b/src/main/java/com/subsidy/controller/ActivityDetectionController.java @@ -42,7 +42,7 @@ public class ActivityDetectionController { } @PostMapping("getCheckHistory") - @ApiOperation("获取某个人某个课程的活跃度验证详情 memberId classId") + @ApiOperation("获取某个人某个课程的活跃度验证详情 memberId classId pageSize pageNum") public ResponseVO getCheckHistory(@RequestBody GetCheckHistoryDTO getCheckHistoryDTO){ return ResponseData.generateCreatedResponse(0,activityDetectionService.getCheckHistory(getCheckHistoryDTO)); } diff --git a/src/main/java/com/subsidy/controller/AdministerController.java b/src/main/java/com/subsidy/controller/AdministerController.java index adea2f3..d476d70 100644 --- a/src/main/java/com/subsidy/controller/AdministerController.java +++ b/src/main/java/com/subsidy/controller/AdministerController.java @@ -254,7 +254,7 @@ public class AdministerController { @PostMapping("importMember") @ApiOperation("导入学生 {companyId 公司id file}") - @LoginRequired +// @LoginRequired public ResponseVO importMember(Long companyId,@RequestParam("file") MultipartFile file)throws Exception{ return ResponseData.generateCreatedResponse(0,administerService.importMember(companyId,file)); } diff --git a/src/main/java/com/subsidy/controller/CertMemberMappingController.java b/src/main/java/com/subsidy/controller/CertMemberMappingController.java index 8cd14e2..92ba942 100644 --- a/src/main/java/com/subsidy/controller/CertMemberMappingController.java +++ b/src/main/java/com/subsidy/controller/CertMemberMappingController.java @@ -4,9 +4,8 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.TimeRequired; -import com.subsidy.dto.cert.GetListDTO; -import com.subsidy.dto.cert.SignManagementDTO; -import com.subsidy.dto.cert.SignUpDTO; +import com.subsidy.dto.cert.*; +import com.subsidy.model.CertClassMemberMappingDO; import com.subsidy.model.CertMemberMappingDO; import com.subsidy.service.CertMemberMappingService; import io.swagger.annotations.Api; @@ -34,7 +33,7 @@ public class CertMemberMappingController { private CertMemberMappingService certMemberMappingService; @PostMapping("signUp") - @ApiOperation("报名 certId memberId files[fileName fileUrl requirementId] ") + @ApiOperation("报名 certId memberId ") public ResponseVO signUp(@RequestBody SignUpDTO signUpDTO){ return ResponseData.generateCreatedResponse(0,certMemberMappingService.signUp(signUpDTO)); } @@ -46,7 +45,7 @@ public class CertMemberMappingController { } @PostMapping("changeStatus") - @ApiOperation("编辑订单状态 id status") + @ApiOperation("编辑订单状态 id status 报名状态 commitPrice 已缴金额") public ResponseVO changeStatus(@RequestBody CertMemberMappingDO certMemberMappingDO){ return ResponseData.generateCreatedResponse(0,certMemberMappingService.changeStatus(certMemberMappingDO)); } @@ -64,6 +63,16 @@ public class CertMemberMappingController { return ResponseData.generateCreatedResponse(0,certMemberMappingService.getSignInfo(certMemberMappingDO)); } + @PostMapping("certSignStatus") + @ApiOperation("手机端---获取证书+报名状态 memberId typeId pageSize pageNum") + public ResponseVO certSignStatus(@RequestBody CertSignStatusDTO certSignStatusDTO){ + return ResponseData.generateCreatedResponse(0,certMemberMappingService.certSignStatus(certSignStatusDTO)); + } + @PostMapping("certSignInfo") + @ApiOperation("证书报名情况 certId status userName pageSize pageNum") + public ResponseVO certSignInfo(@RequestBody CertSignInfoDTO certSignInfoDTO){ + return ResponseData.generateCreatedResponse(0,certMemberMappingService.certSignInfo(certSignInfoDTO)); + } } diff --git a/src/main/java/com/subsidy/controller/ClassDictController.java b/src/main/java/com/subsidy/controller/ClassDictController.java index f3cd871..5e55b50 100644 --- a/src/main/java/com/subsidy/controller/ClassDictController.java +++ b/src/main/java/com/subsidy/controller/ClassDictController.java @@ -111,4 +111,11 @@ public class ClassDictController { public ResponseVO getClassBaseInfo(@RequestBody GetClassBaseInfoDTO getClassBaseInfoDTO){ return ResponseData.generateCreatedResponse(0,classDictService.getClassBaseInfo(getClassBaseInfoDTO)); } + + @PostMapping("email") + @ApiOperation("记录邮箱 memberId classId email") + public ResponseVO email(@RequestBody ClassMemberMappingDO classMemberMappingDO){ + return ResponseData.generateCreatedResponse(0,classDictService.email(classMemberMappingDO)); + } + } diff --git a/src/main/java/com/subsidy/controller/CompanyDictController.java b/src/main/java/com/subsidy/controller/CompanyDictController.java index d580780..a2972e3 100644 --- a/src/main/java/com/subsidy/controller/CompanyDictController.java +++ b/src/main/java/com/subsidy/controller/CompanyDictController.java @@ -94,6 +94,13 @@ public class CompanyDictController { return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO)); } + @PostMapping("exportCompanyMembers") + @ApiOperation("获取公司里的成员 companyId 公司id userName 成员名称") + @LoginRequired + public void exportCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){ + companyDictService.exportCompanyMembers(getCompanyMembersDTO); + } + @PostMapping("memberSummary") @ApiOperation("学员认证详情 companyId") @LoginRequired diff --git a/src/main/java/com/subsidy/controller/DepartmentDictController.java b/src/main/java/com/subsidy/controller/DepartmentDictController.java index bb68374..adcacae 100644 --- a/src/main/java/com/subsidy/controller/DepartmentDictController.java +++ b/src/main/java/com/subsidy/controller/DepartmentDictController.java @@ -70,7 +70,7 @@ public class DepartmentDictController { @PostMapping("getMembers") @ApiOperation("获取成员(树) companyId 公司id startDate endDate ") - @LoginRequired +// @LoginRequired public ResponseVO getMembers(@RequestBody GetDepartmentMembersDTO getDepartmentMembersDTO){ return ResponseData.generateCreatedResponse(0,departmentDictService.getMembers(getDepartmentMembersDTO)); } diff --git a/src/main/java/com/subsidy/controller/MemberController.java b/src/main/java/com/subsidy/controller/MemberController.java index 49d9811..275cfb4 100644 --- a/src/main/java/com/subsidy/controller/MemberController.java +++ b/src/main/java/com/subsidy/controller/MemberController.java @@ -6,6 +6,7 @@ import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.administer.VerifyCodeDTO; import com.subsidy.dto.member.*; +import com.subsidy.mapper.MemberMapper; import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.MemberDO; import com.subsidy.service.MemberService; @@ -191,4 +192,11 @@ public class MemberController { return ResponseData.generateCreatedResponse(0,memberService.qxy(memberDO)); } + @PostMapping("register") + @ApiOperation("注册 companyId userName idCard telephone smsCode ") +// @LoginRequired + public ResponseVO register(@RequestBody RegisterDTO registerDTO){ + return ResponseData.generateCreatedResponse(0,memberService.register(registerDTO)); + } + } diff --git a/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java b/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java index 6c17e9b..e253fdc 100644 --- a/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java +++ b/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java @@ -38,5 +38,13 @@ public class SmsVerifyCodeController { return ResponseData.generateCreatedResponse(0); } + @PostMapping(value = "/sendMsg") + @ApiOperation("发送短信验证码 注册发送 {telephone} ") + @TimeRequired + public ResponseVO sendMsg(@RequestBody SendVerifyCodeDTO sendVerifyCodeDTO ) { + smsVerifyCodeService.sendMsg(sendVerifyCodeDTO); + return ResponseData.generateCreatedResponse(0); + } + } diff --git a/src/main/java/com/subsidy/dto/cert/CertSignInfoDTO.java b/src/main/java/com/subsidy/dto/cert/CertSignInfoDTO.java new file mode 100644 index 0000000..06f3587 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/CertSignInfoDTO.java @@ -0,0 +1,18 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class CertSignInfoDTO { + + private Long certId; + + private String status; + + private String userName; + + private Integer pageSize; + + private Integer pageNum; + +} diff --git a/src/main/java/com/subsidy/dto/cert/CertSignStatusDTO.java b/src/main/java/com/subsidy/dto/cert/CertSignStatusDTO.java new file mode 100644 index 0000000..ab274a6 --- /dev/null +++ b/src/main/java/com/subsidy/dto/cert/CertSignStatusDTO.java @@ -0,0 +1,15 @@ +package com.subsidy.dto.cert; + +import lombok.Data; + +@Data +public class CertSignStatusDTO { + + private Long memberId; + + private Long typeId; + + private Integer pageSize; + + private Integer pageNum; +} diff --git a/src/main/java/com/subsidy/dto/member/RegisterDTO.java b/src/main/java/com/subsidy/dto/member/RegisterDTO.java new file mode 100644 index 0000000..ac987d3 --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/RegisterDTO.java @@ -0,0 +1,19 @@ +package com.subsidy.dto.member; + +import com.subsidy.model.MemberDO; +import lombok.Data; + +@Data +public class RegisterDTO extends MemberDO { + + private Long companyId; + + private String userName; + + private String idCard; + + private String telephone; + + private String smsCode; + +} diff --git a/src/main/java/com/subsidy/mapper/AdministerMapper.java b/src/main/java/com/subsidy/mapper/AdministerMapper.java index 0d07293..aa323d4 100644 --- a/src/main/java/com/subsidy/mapper/AdministerMapper.java +++ b/src/main/java/com/subsidy/mapper/AdministerMapper.java @@ -3,10 +3,7 @@ package com.subsidy.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.subsidy.model.AdministerDO; -import com.subsidy.vo.administer.ExerciseTestVO; -import com.subsidy.vo.administer.ImageCheckDetailVO; -import com.subsidy.vo.administer.MemberDetectionRecordVO; -import com.subsidy.vo.administer.PermissionsVO; +import com.subsidy.vo.administer.*; import com.subsidy.vo.classdict.ClassDetailVO; import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.sign.AnswerRecordVO; @@ -57,4 +54,10 @@ public interface AdministerMapper extends BaseMapper { */ IPage imageCheckDetail(IPage iPage, Long classId, String userName); + /** + * 管理员账号管理 + */ + IPage operators(IPage page, String userName); + + } diff --git a/src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java b/src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java index b08f893..ea5d996 100644 --- a/src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java +++ b/src/main/java/com/subsidy/mapper/CertMemberMappingMapper.java @@ -3,9 +3,7 @@ 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 com.subsidy.vo.cert.*; import org.springframework.stereotype.Repository; /** @@ -36,5 +34,15 @@ public interface CertMemberMappingMapper extends BaseMapper int memberCertStatus(Long memberId,Long certId); + /** + * 手机首页--证书、类型、学生报名情况 + */ + IPage certTypeSignStatus(IPage page, Long memberId, Long TypeId); + + /** + * 查看某个证书的报名情况 + */ + IPage certSignInfo(IPage iPage, Long certId, String status, String userName); + } diff --git a/src/main/java/com/subsidy/model/CertMemberMappingDO.java b/src/main/java/com/subsidy/model/CertMemberMappingDO.java index c20bbd2..58dbf4f 100644 --- a/src/main/java/com/subsidy/model/CertMemberMappingDO.java +++ b/src/main/java/com/subsidy/model/CertMemberMappingDO.java @@ -33,4 +33,6 @@ public class CertMemberMappingDO extends BaseModel { private Long orderNo; + private String commitPrice; + } diff --git a/src/main/java/com/subsidy/model/ClassMemberMappingDO.java b/src/main/java/com/subsidy/model/ClassMemberMappingDO.java index 614000d..0d7bef0 100644 --- a/src/main/java/com/subsidy/model/ClassMemberMappingDO.java +++ b/src/main/java/com/subsidy/model/ClassMemberMappingDO.java @@ -35,5 +35,14 @@ public class ClassMemberMappingDO extends BaseModel { */ private Long classId; + /** + * 邮箱 + */ + private String email; + + /** + * 验证状态 + */ + private Integer emailStatus; } diff --git a/src/main/java/com/subsidy/model/Collection.java b/src/main/java/com/subsidy/model/Collection.java deleted file mode 100644 index abcf13b..0000000 --- a/src/main/java/com/subsidy/model/Collection.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.subsidy.model; - -import lombok.Data; - -@Data - -public class Collection { - - private String _id; - - private String name; - -} diff --git a/src/main/java/com/subsidy/model/OprAdmDictDO.java b/src/main/java/com/subsidy/model/OprAdmDictDO.java index 491f27d..64b633d 100644 --- a/src/main/java/com/subsidy/model/OprAdmDictDO.java +++ b/src/main/java/com/subsidy/model/OprAdmDictDO.java @@ -21,6 +21,7 @@ import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper; @TableName("opr_adm_dict") public class OprAdmDictDO extends BaseModel{ + @TableId(value = "id", type = IdType.AUTO) private Long id; /** diff --git a/src/main/java/com/subsidy/model/OprMemDictDO.java b/src/main/java/com/subsidy/model/OprMemDictDO.java index 0ade304..6cc856f 100644 --- a/src/main/java/com/subsidy/model/OprMemDictDO.java +++ b/src/main/java/com/subsidy/model/OprMemDictDO.java @@ -20,6 +20,7 @@ import lombok.EqualsAndHashCode; @TableName("opr_mem_dict") public class OprMemDictDO extends BaseModel { + @TableId(value = "id", type = IdType.AUTO) private Long id; /** diff --git a/src/main/java/com/subsidy/service/CertMemberMappingService.java b/src/main/java/com/subsidy/service/CertMemberMappingService.java index 202fefe..c14483c 100644 --- a/src/main/java/com/subsidy/service/CertMemberMappingService.java +++ b/src/main/java/com/subsidy/service/CertMemberMappingService.java @@ -1,14 +1,10 @@ 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.dto.cert.*; 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 com.subsidy.vo.cert.*; import java.util.List; @@ -31,4 +27,9 @@ public interface CertMemberMappingService extends IService IPage getList(GetListDTO getListDTO); GetSignInfoVO getSignInfo(CertMemberMappingDO certMemberMappingDO); + + IPage certSignStatus(CertSignStatusDTO certSignStatusDTO); + + IPage certSignInfo(CertSignInfoDTO certSignInfoDTO); + } diff --git a/src/main/java/com/subsidy/service/ClassDictService.java b/src/main/java/com/subsidy/service/ClassDictService.java index 991cbf8..8cab0f5 100644 --- a/src/main/java/com/subsidy/service/ClassDictService.java +++ b/src/main/java/com/subsidy/service/ClassDictService.java @@ -44,4 +44,5 @@ public interface ClassDictService extends IService { GetClassBaseInfoVO getClassBaseInfo(GetClassBaseInfoDTO getClassBaseInfoDTO); + String email(ClassMemberMappingDO classMemberMappingDO); } diff --git a/src/main/java/com/subsidy/service/CompanyDictService.java b/src/main/java/com/subsidy/service/CompanyDictService.java index c1d2c58..4e44e4a 100644 --- a/src/main/java/com/subsidy/service/CompanyDictService.java +++ b/src/main/java/com/subsidy/service/CompanyDictService.java @@ -41,6 +41,8 @@ public interface CompanyDictService extends IService { IPage getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO); + void exportCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO); + MemberSummaryVO memberSummary(GetCompanyMembersDTO getCompanyMembersDTO); DataOverviewVO getCompanyDataOverview(); diff --git a/src/main/java/com/subsidy/service/MemberService.java b/src/main/java/com/subsidy/service/MemberService.java index 32abf7a..7f2251f 100644 --- a/src/main/java/com/subsidy/service/MemberService.java +++ b/src/main/java/com/subsidy/service/MemberService.java @@ -66,4 +66,6 @@ public interface MemberService extends IService { String changeDepartments(ChangeDepartmentsDTO changeDepartmentsDTO); QxyVO qxy(MemberDO memberDO); + + UserRoleVO register(RegisterDTO registerDTO); } diff --git a/src/main/java/com/subsidy/service/SmsVerifyCodeService.java b/src/main/java/com/subsidy/service/SmsVerifyCodeService.java index 706fa89..80cab2c 100644 --- a/src/main/java/com/subsidy/service/SmsVerifyCodeService.java +++ b/src/main/java/com/subsidy/service/SmsVerifyCodeService.java @@ -16,4 +16,6 @@ public interface SmsVerifyCodeService extends IService { void sendVerifyCode(SendVerifyCodeDTO sendVerifyCodeDTO); + void sendMsg(SendVerifyCodeDTO sendVerifyCodeDTO); + } diff --git a/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java b/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java index 5b5ab6d..8670f59 100644 --- a/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java @@ -2,6 +2,7 @@ package com.subsidy.service.impl; 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.detection.GetCheckHistoryDTO; import com.subsidy.dto.detection.VerifyDTO; import com.subsidy.model.ActivityDetectionDO; @@ -30,7 +31,7 @@ public class ActivityDetectionServiceImpl extends ServiceImpl operators(OperatorsDTO operatorsDTO) { Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize()); - IPage operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), null, 1, null); + IPage operatorsVOIPage = this.baseMapper.operators(pager, operatorsDTO.getUserName()); List operatorsVOS = operatorsVOIPage.getRecords(); for (OperatorsVO operatorsVO : operatorsVOS) { @@ -383,7 +384,7 @@ public class AdministerServiceImpl extends ServiceImpl 0) { + //最近一次签到 + SignInRecordDO signInRecordDO = signInRecordDOS.get(signInRecordDOS.size() - 1); + classSignVO.setIpAddress(signInRecordDO.getIpAddress()); + classSignVO.setDeviceNo(signInRecordDO.getDeviceNo()); + } } classSignVOIPage.setRecords(classSignVOS); @@ -684,10 +687,11 @@ public class AdministerServiceImpl extends ServiceImpl 0) { + SignInRecordDO signInRecordDO = signInRecordDOS.get(signInRecordDOS.size() - 1); + classSignVO.setIpAddress(signInRecordDO.getIpAddress()); + classSignVO.setDeviceNo(signInRecordDO.getDeviceNo()); + } } if (classDetailDTO.getFlag()) { @@ -1366,6 +1370,7 @@ public class AdministerServiceImpl extends ServiceImpl getCompanyCertsWithStatus(GetCompanyCertsWithStatusDTO getCompanyCertsDTO){ + public List getCompanyCertsWithStatus(GetCompanyCertsWithStatusDTO getCompanyCertsDTO) { List getCompanyCertsWithStatusVOS = new ArrayList<>(); //查看某个公司所有的证书 - List certDictDOS = this.baseMapper.getCompanyCerts(getCompanyCertsDTO.getCompanyId(),getCompanyCertsDTO.getTypeId()); - for (CertDictDO certDictDO : certDictDOS){ + 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); + BeanUtils.copyProperties(certDictDO, getCompanyCertsWithStatusVO); + + CertMemberMappingDO certMemberMappingDO = certMemberMappingMapper.selectOne(new QueryWrapper() + .lambda() + .eq(CertMemberMappingDO::getCertId, certDictDO.getId()) + .eq(CertMemberMappingDO::getMemberId, getCompanyCertsDTO.getMemberId())); + if (null != certMemberMappingDO){ + getCompanyCertsWithStatusVO.setStatus(certMemberMappingDO.getStatus()); }else { - getCompanyCertsWithStatusVO.setStatus(false); + getCompanyCertsWithStatusVO.setStatus("未报名"); } getCompanyCertsWithStatusVOS.add(getCompanyCertsWithStatusVO); } return getCompanyCertsWithStatusVOS; } - public IPage getCompanyCerts(GetCompanyCertsDTO getCompanyCertsDTO){ + public IPage getCompanyCerts(GetCompanyCertsDTO getCompanyCertsDTO) { Page pager = new Page(getCompanyCertsDTO.getPageNum(), getCompanyCertsDTO.getPageSize()); @@ -79,36 +78,36 @@ public class CertCompanyMappingServiceImpl extends ServiceImpl getCompanyCertsVOS = getCompanyCertsVOIPage.getRecords(); - for (GetCompanyCertsVO getCompanyCertsVO : getCompanyCertsVOS){ + 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())); + .lambda() + .eq(CertCompanyMappingDO::getCertId, getCompanyCertsVO.getId()) + .eq(CertCompanyMappingDO::getCompanyId, getCompanyCertsDTO.getCompanyId())); - if (count>0){ + if (count > 0) { getCompanyCertsVO.setSignStatus(true); - }else { + } else { getCompanyCertsVO.setSignStatus(false); } } return getCompanyCertsVOIPage; } - public String changeCompanyCerts(ChangeCompanyCertsDTO changeCompanyCertsDTO){ + public String changeCompanyCerts(ChangeCompanyCertsDTO changeCompanyCertsDTO) { - if (changeCompanyCertsDTO.getSignStatus()){ + if (changeCompanyCertsDTO.getSignStatus()) { CertCompanyMappingDO certCompanyMappingDO = new CertCompanyMappingDO(); certCompanyMappingDO.setCertId(changeCompanyCertsDTO.getCertId()); certCompanyMappingDO.setCompanyId(changeCompanyCertsDTO.getCompanyId()); this.baseMapper.insert(certCompanyMappingDO); - }else { + } else { this.baseMapper.delete(new QueryWrapper() - .lambda() - .eq(CertCompanyMappingDO::getCertId,changeCompanyCertsDTO.getCertId()) - .eq(CertCompanyMappingDO::getCompanyId,changeCompanyCertsDTO.getCompanyId())); + .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 index 4f625d0..bcb39ff 100644 --- a/src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/CertDictServiceImpl.java @@ -118,12 +118,17 @@ public class CertDictServiceImpl extends ServiceImpl List certTypeDictDOS = certTypeDictMapper.getCertTypes(certDictDO1.getId()); getOneCertVO.setCertTypeDictDOS(certTypeDictDOS); - Integer count = certMemberMappingMapper.memberCertStatus(getOneCertDTO.getUserId(),certDictDO1.getId()); +// Integer count = certMemberMappingMapper.memberCertStatus(getOneCertDTO.getUserId(),certDictDO1.getId()); - if (count > 0){ - getOneCertVO.setStatus(true); + CertMemberMappingDO certMemberMappingDO = certMemberMappingMapper.selectOne(new QueryWrapper() + .lambda() + .eq(CertMemberMappingDO::getCertId,certDictDO1.getId()) + .eq(CertMemberMappingDO::getMemberId,getOneCertDTO.getUserId())); + + if (null != certMemberMappingDO){ + getOneCertVO.setStatus(certMemberMappingDO.getStatus()); }else { - getOneCertVO.setStatus(false); + getOneCertVO.setStatus("未报名"); } return getOneCertVO; diff --git a/src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java index bc076f7..9af4f44 100644 --- a/src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/CertMemberMappingServiceImpl.java @@ -3,9 +3,7 @@ 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.dto.cert.*; import com.subsidy.mapper.CertMemberFileMappingMapper; import com.subsidy.mapper.CertRequirementMapper; import com.subsidy.mapper.CertTypeDictMapper; @@ -18,9 +16,7 @@ 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 com.subsidy.vo.cert.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -63,7 +59,7 @@ public class CertMemberMappingServiceImpl extends ServiceImpl getList(GetListDTO getListDTO) { - Page pager = new Page(getListDTO.getPageNum(), getListDTO.getPageSize()); - return this.baseMapper.getList(pager,getListDTO.getMemberId(),getListDTO.getStatus()); + return this.baseMapper.getList(pager, getListDTO.getMemberId(), getListDTO.getStatus()); + } + + public GetSignInfoVO getSignInfo(CertMemberMappingDO certMemberMappingDO) { + return this.baseMapper.getSignInfo(certMemberMappingDO.getMemberId(), certMemberMappingDO.getCertId()); + } + + public IPage certSignStatus(CertSignStatusDTO certSignStatusDTO) { + Page pager = new Page(certSignStatusDTO.getPageNum(), certSignStatusDTO.getPageSize()); + return this.baseMapper.certTypeSignStatus(pager, certSignStatusDTO.getMemberId(), certSignStatusDTO.getTypeId()); } - public GetSignInfoVO getSignInfo(CertMemberMappingDO certMemberMappingDO){ - return this.baseMapper.getSignInfo(certMemberMappingDO.getMemberId(),certMemberMappingDO.getCertId()); + public IPage certSignInfo(CertSignInfoDTO certSignInfoDTO) { + Page pager = new Page(certSignInfoDTO.getPageNum(), certSignInfoDTO.getPageSize()); + return this.baseMapper.certSignInfo(pager,certSignInfoDTO.getCertId(),certSignInfoDTO.getStatus(),certSignInfoDTO.getUserName()); } } diff --git a/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java index 05e54ef..a21b053 100644 --- a/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java @@ -270,4 +270,19 @@ public class ClassDictServiceImpl extends ServiceImpl() + .lambda() + .eq(ClassMemberMappingDO::getMemberId,classMemberMappingDO.getMemberId()) + .eq(ClassMemberMappingDO::getClassId,classMemberMappingDO.getClassId())); + + if (null != classMemberMappingDO1){ + classMemberMappingDO1.setEmail(classMemberMappingDO.getEmail()); + classMemberMappingDO1.setEmailStatus(classMemberMappingDO.getEmailStatus()); + classMemberMappingMapper.updateById(classMemberMappingDO1); + } + return ConstantUtils.SUCCESS_UPDATE; + } + } diff --git a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java index 839dd22..477d530 100644 --- a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java @@ -36,6 +36,7 @@ import com.subsidy.util.ConstantUtils; import com.subsidy.util.DateFormatUtil; import com.subsidy.util.EhCacheUtil; import com.subsidy.util.VodUtil; +import com.subsidy.util.excel.ExcelUtil; import com.subsidy.util.websocket.WebSocketUtil; import com.subsidy.vo.administer.OperatorsVO; import com.subsidy.vo.classdict.ClassSettingsVO; @@ -296,13 +297,13 @@ public class CompanyDictServiceImpl extends ServiceImpl list = classMemberMappingMapper.getCLassMemberByCompanyId(companyDictDO.getId()); - if(CollectionUtils.isNotEmpty(list)) { + if (CollectionUtils.isNotEmpty(list)) { for (ClassMemberMappingDO classMemberMappingDO : list) { WebSocketSession webSocketSession = WebSocketUtil.webSocketMap.get(classMemberMappingDO.getMemberId()); - if(null != webSocketSession && webSocketSession.isOpen()) { + if (null != webSocketSession && webSocketSession.isOpen()) { try { List classSettings = classDictMapper.getClassSettings(classMemberMappingDO.getMemberId()); systemSettings.setClassSettingsVOS(classSettings); @@ -330,6 +331,12 @@ public class CompanyDictServiceImpl extends ServiceImpl getCompanyMembersVOS = this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName()).getRecords(); + ExcelUtil.writeExcel(getCompanyMembersVOS, GetCompanyMembersVO.class); + } + @Override public DataOverviewVO getCompanyDataOverview() { DataOverviewVO dataOverviewVO = new DataOverviewVO(); @@ -338,7 +345,7 @@ public class CompanyDictServiceImpl extends ServiceImpl memberList = memberMapper.selectList(new QueryWrapper<>()); - if(CollectionUtils.isNotEmpty(memberList)) { + if (CollectionUtils.isNotEmpty(memberList)) { int realNameNum = (int) memberList.stream().filter(m -> StringUtils.isNotBlank(m.getIdCard())).count(); /* 注册人数 */ dataOverviewVO.setRegistrantsNum(memberList.size()); @@ -351,7 +358,7 @@ public class CompanyDictServiceImpl extends ServiceImpl courseList = courseDictMapper.selectList(new QueryWrapper<>()); - if(CollectionUtils.isNotEmpty(courseList)) { + if (CollectionUtils.isNotEmpty(courseList)) { /* 资源数量 */ dataOverviewVO.setCourseNum(courseList.size()); @@ -363,14 +370,14 @@ public class CompanyDictServiceImpl extends ServiceImpl 0) { + if (studyTotal > 0) { dataOverviewVO.setStudyTotal(new BigDecimal(studyTotal).divide(new BigDecimal(Math.pow(60, 2)), 2, BigDecimal.ROUND_UP).doubleValue()); } /* 专项资源时(小时) */ double subsidyStudyTotal = vodPlayHistoryMapper.getSubsidyStudyTotal(); - if(subsidyStudyTotal > 0) { - dataOverviewVO.setSubsidyStudyTotal(new BigDecimal(subsidyStudyTotal).divide(new BigDecimal(Math.pow(60,2)), 2, BigDecimal.ROUND_UP).doubleValue()); + if (subsidyStudyTotal > 0) { + dataOverviewVO.setSubsidyStudyTotal(new BigDecimal(subsidyStudyTotal).divide(new BigDecimal(Math.pow(60, 2)), 2, BigDecimal.ROUND_UP).doubleValue()); } /* 学习过程记录人次 */ @@ -379,7 +386,7 @@ public class CompanyDictServiceImpl extends ServiceImpl data = new ArrayList<>(); - if(EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.BANDWIDTH_CACHE_KEY) != null) { + if (EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.BANDWIDTH_CACHE_KEY) != null) { return (List) EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.BANDWIDTH_CACHE_KEY); } else { - String startDate =LocalDateTime.now().minusDays(6).withNano(0)+"+08:00"; - String endDate = LocalDateTime.now().withNano(0)+"+08:00"; - StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.BANDWIDTH ,startDate, endDate); + String startDate = LocalDateTime.now().minusDays(6).withNano(0) + "+08:00"; + String endDate = LocalDateTime.now().withNano(0) + "+08:00"; + StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.BANDWIDTH, startDate, endDate); for (StatDataItem statDataItem : statDataItems) { CDNStatDetailsVO sd = new CDNStatDetailsVO(); - LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00","")); + LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00", "")); Date date = DateFormatUtil.localDateTimeToDate(localDateTime); sd.setTime(DateFormatUtil.format(date, DateFormatUtil.FMT_sdf_yMd)); BigDecimal bigDecimal = new BigDecimal(statDataItem.getValue()).divide(new BigDecimal(1000000)); @@ -438,15 +445,15 @@ public class CompanyDictServiceImpl extends ServiceImpl data = new ArrayList<>(); - if(EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.FLUX_CACHE_KEY) != null) { + if (EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.FLUX_CACHE_KEY) != null) { return (List) EhCacheUtil.getEhCache(VodConstant.CDN_STAT_DETAILS_CACHE_NAME, VodConstant.FLUX_CACHE_KEY); } else { - String startDate =LocalDateTime.now().minusDays(6).withNano(0)+"+08:00"; - String endDate = LocalDateTime.now().withNano(0)+"+08:00"; - StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.FLUX ,startDate, endDate); + String startDate = LocalDateTime.now().minusDays(6).withNano(0) + "+08:00"; + String endDate = LocalDateTime.now().withNano(0) + "+08:00"; + StatDataItem[] statDataItems = VodUtil.DescribeCDNStatDetails(vodConfig, VodConstant.FLUX, startDate, endDate); for (StatDataItem statDataItem : statDataItems) { CDNStatDetailsVO sd = new CDNStatDetailsVO(); - LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00","")); + LocalDateTime localDateTime = LocalDateTime.parse(statDataItem.getTime().replace("+08:00", "")); Date date = DateFormatUtil.localDateTimeToDate(localDateTime); sd.setTime(DateFormatUtil.format(date, DateFormatUtil.FMT_sdf_yMd)); BigDecimal bigDecimal = new BigDecimal(statDataItem.getValue()).divide(new BigDecimal(Math.pow(1000, 3))); diff --git a/src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java index 566ef07..6c9d685 100644 --- a/src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java @@ -401,6 +401,7 @@ public class CourseDictServiceImpl extends ServiceImpl memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null); - gmv.setMemberDOS(memberDOS1); - getMembersVOS.add(gmv); - }else { - //公司人员 - List memberDOS = memberMapper.selectList(new QueryWrapper() - .lambda() - .eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId())); - gmv.setMemberDOS(memberDOS); - getMembersVOS.add(gmv); - } +// if (dpt.getParentId()!=null){ +// //部门人员 +// List memberDOS1 = memberMapper.getMemberWithoutPage(dpt.getId(),getMembersVO.getUserName(),null,null,null); +// gmv.setMemberDOS(memberDOS1); +// getMembersVOS.add(gmv); +// }else { +// //公司人员 +// List memberDOS = memberMapper.selectList(new QueryWrapper() +// .lambda() +// .eq(MemberDO::getCompanyId,getDepartmentMembersDTO.getCompanyId())); +// gmv.setMemberDOS(memberDOS); +// getMembersVOS.add(gmv); +// } + getMembersVOS.add(gmv); } return getMembersVOS; } @@ -271,7 +272,9 @@ public class DepartmentDictServiceImpl extends ServiceImpl memberDOS = memberMapper.getMemberWithoutPage(dd.getId(),getMembersVO.getUserName(),null,null,null); - gmv.setMemberDOS(memberDOS); + if (memberDOS.size()>0){ + gmv.setMemberDOS(memberDOS); + } getAllDepartmentVOS.add(gmv); } if (departmentDictDOS.size() == 0) { diff --git a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java index 349059d..be42f28 100644 --- a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java @@ -16,6 +16,10 @@ import com.subsidy.util.*; import com.subsidy.vo.administer.UserRoleVO; import com.subsidy.vo.member.*; import com.subsidy.vo.paper.QueryPapersVO; +import net.sourceforge.pinyin4j.PinyinHelper; +import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; @@ -662,9 +666,9 @@ public class MemberServiceImpl extends ServiceImpl imple checkStatusVO.setSMSStatus(false); } - if (StringUtils.isEmpty(memberDO1.getIdCardPhoto())){ + if (StringUtils.isEmpty(memberDO1.getIdCardPhoto())) { checkStatusVO.setIdCardStatus(false); - }else { + } else { checkStatusVO.setIdCardStatus(true); } @@ -696,7 +700,7 @@ public class MemberServiceImpl extends ServiceImpl imple .eq(ImageCheckRecordDO::getCheckPlace, 0) .eq(ImageCheckRecordDO::getResult, 1)); - int checkCnt = imageCheckRecordMapper.checkDailyCount(myCoursesDTO.getMemberId(), myCoursesVO.getClassId(), 1,null); + int checkCnt = imageCheckRecordMapper.checkDailyCount(myCoursesDTO.getMemberId(), myCoursesVO.getClassId(), 1, null); myCoursesVO.setCheckCnt(checkCnt); if (count > 0) { @@ -845,11 +849,11 @@ public class MemberServiceImpl extends ServiceImpl imple .lambda() .eq(ImageCheckRecordDO::getMemberId, contentMemberDTO.getMemberId()) .eq(ImageCheckRecordDO::getClassId, contentMemberDTO.getClassId()) - .eq(ImageCheckRecordDO::getPaperId,queryPapersVO.getId()) + .eq(ImageCheckRecordDO::getPaperId, queryPapersVO.getId()) .eq(ImageCheckRecordDO::getClassPlace, 2) .eq(ImageCheckRecordDO::getResult, 1)); - int checkCnt = imageCheckRecordMapper.checkDailyCount(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), 2,queryPapersVO.getId()); + int checkCnt = imageCheckRecordMapper.checkDailyCount(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), 2, queryPapersVO.getId()); queryPapersVO.setCheckCnt(checkCnt); if (count > 0) { @@ -1004,4 +1008,77 @@ public class MemberServiceImpl extends ServiceImpl imple } return new QxyVO(); } + + @Transactional(rollbackFor = Exception.class) + public UserRoleVO register(RegisterDTO registerDTO) { + + UserRoleVO userRoleVO = new UserRoleVO(); + + //判断手机号是否已经注册 + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(MemberDO::getTelephone, registerDTO.getTelephone())); + if (count > 0) { + throw new HttpException(10027); + } + + SmsVerifyCodeDO smsCodeDO = smsVerifyCodeMapper.selectOne(new QueryWrapper() + .lambda() + .eq(SmsVerifyCodeDO::getTelephone, registerDTO.getTelephone()) + .eq(SmsVerifyCodeDO::getVerifyCode, registerDTO.getSmsCode()) + .gt(SmsVerifyCodeDO::getCreateDate, LocalDateTime.now().minusMinutes(30L))); + + if (null == smsCodeDO) { + throw new HttpException(10003); + } + + //赋值 + MemberDO memberDO = new MemberDO(); + BeanUtils.copyProperties(registerDTO,memberDO); + memberDO.setFirstLogin(1); + memberDO.setStatus("启用"); + HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); + //拼音小写 + format.setCaseType(HanyuPinyinCaseType.LOWERCASE); + //不带声调 + format.setToneType(HanyuPinyinToneType.WITHOUT_TONE); + try { + String accountName = PinyinHelper.toHanYuPinyinString(registerDTO.getUserName(), format, "", true); + memberDO.setAccountName(accountName); + memberDO.setPassword("123456"); + }catch (Exception e){ + e.printStackTrace(); + } + this.baseMapper.insert(memberDO); + + //审计日志 + OprMemDictDO oprMemDictDO = new OprMemDictDO(); + oprMemDictDO.setUserId(memberDO.getId()); + oprMemDictDO.setOprType("登录"); + //oprMemDictDO.setUserName(memberDO.getUserName()); + oprMemDictDO.setResult(1); + //oprMemDictDO.setCreateDate(System.currentTimeMillis() + ""); + //oprMemDictDO.setLoginDateFormat(DateFormatUtil.format(new Date(), "yyyyMMdd")); + //oprMemDictDO.setCompanyId(companyDictDO.getId()); + //oprMemDictDO.setCompanyName(companyDictDO.getCompanyName()); + oprMemDictMapper.insert(oprMemDictDO); + + CompanyDictDO companyDictDO = companyDictMapper.selectById(registerDTO.getCompanyId()); + BeanUtils.copyProperties(memberDO,userRoleVO); + userRoleVO.setCompanyId(companyDictDO.getId()); + userRoleVO.setSuperviseName(companyDictDO.getSuperviseName()); + userRoleVO.setCompanyName(companyDictDO.getCompanyName()); + userRoleVO.setLogo(companyDictDO.getLogo()); + userRoleVO.setQxyStatus(companyDictDO.getQxyStatus()); + List rotationImgDictDOS = rotationImgDictMapper.selectList(new QueryWrapper() + .lambda() + .eq(RotationImgDictDO::getCompanyId, companyDictDO.getId())); + userRoleVO.setRotationImgDictDOS(rotationImgDictDOS); + + String token = JwtUtil.generateToken(memberDO.getId(), ConstantUtils.MOBILE_TERMINATE); + //redisUtil.set(ConstantUtils.MOBILE_TERMINATE + "_" + memberDO.getId(), token); + Localstorage.setUser(memberDO); + userRoleVO.setToken(token); + return userRoleVO; + } } diff --git a/src/main/java/com/subsidy/service/impl/SmsVerifyCodeServiceImpl.java b/src/main/java/com/subsidy/service/impl/SmsVerifyCodeServiceImpl.java index 390731e..ada3051 100644 --- a/src/main/java/com/subsidy/service/impl/SmsVerifyCodeServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/SmsVerifyCodeServiceImpl.java @@ -58,4 +58,19 @@ public class SmsVerifyCodeServiceImpl extends ServiceImpl() + .lambda() + .eq(SmsVerifyCodeDO::getTelephone,sendVerifyCodeDTO.getTelephone())); + + //redisUtil.set(RedisPrefixConstant.SUBSIDY_TELEPHONE_PREFIX + sendVerifyCodeDTO.getTelephone(), code, 30 * 60); + SmsVerifyCodeDO smsCodeDO = new SmsVerifyCodeDO(); + smsCodeDO.setVerifyCode(code); + smsCodeDO.setTelephone(sendVerifyCodeDTO.getTelephone()); + this.baseMapper.insert(smsCodeDO); + } + } diff --git a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java index 611cdec..758c81f 100644 --- a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java @@ -630,7 +630,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl testPlays(VodPlayHistoryDO vodPlayHistoryDO) { - String classIds = "150,151,152,153,165,195,199,200,202,207,209,210,211,212,213,215,227,228,229,233,234,235,240,241,243,244,248,249,250,251,252,253,254,255,256,257,258,261,268,278,280,282,286,287,288,289,292,293,294,295,297,298,300,301,303,304,305,306"; + String classIds = "344"; String[] classIdArr = classIds.split(","); @@ -649,7 +649,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl vodPlayHistoryDOS = this.baseMapper.getVodPlayDay(Long.valueOf(classId), classMemberMappingDO.getMemberId(), vodPlayStateVO.getStartDate()); -// //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推 + //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推 for (int l = 0; l < vodPlayHistoryDOS.size() - 1; l++) { VodPlayHistoryDO vph1 = vodPlayHistoryDOS.get(l); //第一条 if (l==0){ diff --git a/src/main/java/com/subsidy/util/ActivityDetectionUtils.java b/src/main/java/com/subsidy/util/ActivityDetectionUtils.java index 8af65cb..2a2b1f1 100644 --- a/src/main/java/com/subsidy/util/ActivityDetectionUtils.java +++ b/src/main/java/com/subsidy/util/ActivityDetectionUtils.java @@ -19,7 +19,7 @@ public class ActivityDetectionUtils { * @throws Exception */ - public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request, String randstr) throws Exception { + public static DescribeCaptchaResultResponse activityDetection(HttpServletRequest request,String ticket, String randstr) throws Exception { // 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey,此处还需注意密钥对的保密 // 密钥可前往https://console.cloud.tencent.com/cam/capi网站进行获取 @@ -41,6 +41,7 @@ public class ActivityDetectionUtils { req.setCaptchaAppId(ConstantUtils.CAPTCHAAPP_ID); req.setAppSecretKey(ConstantUtils.APP_SECRET_KEY); req.setBusinessId(ConstantUtils.BUSINESS_ID); + req.setTicket(ticket); // 返回的resp是一个DescribeCaptchaResultResponse的实例,与请求对象对应 return client.DescribeCaptchaResult(req); } diff --git a/src/main/java/com/subsidy/vo/cert/CertSignInfoVO.java b/src/main/java/com/subsidy/vo/cert/CertSignInfoVO.java new file mode 100644 index 0000000..69ee2f5 --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/CertSignInfoVO.java @@ -0,0 +1,25 @@ +package com.subsidy.vo.cert; + +import lombok.Data; + +@Data +public class CertSignInfoVO { + + private Long id; + + private String userName; + + private String companyName; + + private String telephone; + + private String idCard; + + private String status; + + private String price; + + private String scribePrice; + + private String commitPrice; +} diff --git a/src/main/java/com/subsidy/vo/cert/CertSignStatusVO.java b/src/main/java/com/subsidy/vo/cert/CertSignStatusVO.java new file mode 100644 index 0000000..7ed7f10 --- /dev/null +++ b/src/main/java/com/subsidy/vo/cert/CertSignStatusVO.java @@ -0,0 +1,11 @@ +package com.subsidy.vo.cert; + +import com.subsidy.model.CertDictDO; +import lombok.Data; + +@Data +public class CertSignStatusVO extends CertDictDO { + + private String status; + +} diff --git a/src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java b/src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java index eb0faac..6091dac 100644 --- a/src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java +++ b/src/main/java/com/subsidy/vo/cert/GetCompanyCertsWithStatusVO.java @@ -6,6 +6,6 @@ import lombok.Data; @Data public class GetCompanyCertsWithStatusVO extends CertDictDO { - private Boolean status; + private String status; } diff --git a/src/main/java/com/subsidy/vo/cert/GetOneCertVO.java b/src/main/java/com/subsidy/vo/cert/GetOneCertVO.java index 6806288..7df285b 100644 --- a/src/main/java/com/subsidy/vo/cert/GetOneCertVO.java +++ b/src/main/java/com/subsidy/vo/cert/GetOneCertVO.java @@ -11,6 +11,6 @@ public class GetOneCertVO extends CertDictDO { private List certTypeDictDOS; - private Boolean status; + private String status; } diff --git a/src/main/java/com/subsidy/vo/classdict/ClassDetailVO.java b/src/main/java/com/subsidy/vo/classdict/ClassDetailVO.java index 9bb46d7..66ba41f 100644 --- a/src/main/java/com/subsidy/vo/classdict/ClassDetailVO.java +++ b/src/main/java/com/subsidy/vo/classdict/ClassDetailVO.java @@ -24,6 +24,11 @@ public class ClassDetailVO{ @ExcelColumn(col = 3,value = "性别") private String gender; + /** + * 邮箱 + */ + private String email; + @ExcelColumn(col = 4,value = "身份证号") private String idCard; diff --git a/src/main/java/com/subsidy/vo/company/GetCompanyMembersVO.java b/src/main/java/com/subsidy/vo/company/GetCompanyMembersVO.java index 4f836c3..7a6f665 100644 --- a/src/main/java/com/subsidy/vo/company/GetCompanyMembersVO.java +++ b/src/main/java/com/subsidy/vo/company/GetCompanyMembersVO.java @@ -1,24 +1,41 @@ package com.subsidy.vo.company; +import com.subsidy.util.excel.ExcelColumn; import lombok.Data; @Data public class GetCompanyMembersVO { + @ExcelColumn(col = 1,value = "ID") private Long id; + @ExcelColumn(col = 2,value = "用户名称") private String userName; - private String idCard; + @ExcelColumn(col = 3,value = "手机号") + private String telephone; - private String idCardPhoto; + @ExcelColumn(col = 3,value = "身份证号") + private String idCard; + @ExcelColumn(col = 4,value = "所属企业") private String companyName; - private Integer firstLogin; + @ExcelColumn(col = 5,value = "企业账号") + private String accountName; + + @ExcelColumn(col = 6,value = "手机短信验证") + private String firstLogin; + @ExcelColumn(col = 7,value = "身份证验证") + private String idCardPhoto; + + @ExcelColumn(col = 8,value = "人脸图像采集") private String checkImage; + @ExcelColumn(col = 9,value = "最近采集时间") private String checkTime; + + } diff --git a/src/main/java/com/subsidy/vo/member/MyCoursesVO.java b/src/main/java/com/subsidy/vo/member/MyCoursesVO.java index 7c7562c..0b22235 100644 --- a/src/main/java/com/subsidy/vo/member/MyCoursesVO.java +++ b/src/main/java/com/subsidy/vo/member/MyCoursesVO.java @@ -36,5 +36,7 @@ public class MyCoursesVO { private Integer checkCnt; + private Integer emailStatus; + private List fieldDictDOS; } diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 602d9bb..927e329 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -2,7 +2,7 @@ spring.server.port=23459 # 数据源配置 -spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy_new?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=ykadmin_new diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 559f4ed..50ca700 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ # 环境配置 -spring.profiles.active=dev +spring.profiles.active=prod #和CPU数 spring.server.acceptorThreadCount=600 spring.server.minSpareThreads=100 diff --git a/src/main/resources/code.properties b/src/main/resources/code.properties index 65379cb..16b0958 100644 --- a/src/main/resources/code.properties +++ b/src/main/resources/code.properties @@ -19,6 +19,7 @@ meishu.code-message[10023]=密码输入错误,您还可以输入3次密码 meishu.code-message[10024]=密码输入错误,您还可以输入4次密码 meishu.code-message[10025]=身份证识别错误 meishu.code-message[10026]=姓名或身份证号格式不正确 +meishu.code-message[10027]=该手机号已注册 meishu.code-message[20001]=该课程已存在 @@ -71,4 +72,4 @@ meishu.code-message[17001]=系统不支持00:00:00~06:00:00学习 meishu.code-message[18001]=已超过当日验证次数上线 - +meishu.code-message[19001]=验证失败 \ No newline at end of file diff --git a/src/main/resources/mapper/AdministerMapper.xml b/src/main/resources/mapper/AdministerMapper.xml index ab76a16..2c31312 100644 --- a/src/main/resources/mapper/AdministerMapper.xml +++ b/src/main/resources/mapper/AdministerMapper.xml @@ -50,7 +50,8 @@ t2.gender, t2.id_card, t2.account_name, - t2.telephone + t2.telephone, + t.email FROM class_member_mapping t LEFT JOIN member t2 ON t.member_id = t2.id @@ -60,7 +61,7 @@ and t2.user_name like concat('%',#{userName} ,'%') - order by t2.id + order by t2.account_name + + diff --git a/src/main/resources/mapper/CertMemberMappingMapper.xml b/src/main/resources/mapper/CertMemberMappingMapper.xml index 3499548..3a4b7da 100644 --- a/src/main/resources/mapper/CertMemberMappingMapper.xml +++ b/src/main/resources/mapper/CertMemberMappingMapper.xml @@ -121,8 +121,58 @@ AND t.member_id = #{memberId} AND t.cert_id = #{certId} AND ( - t.`status` = "等待确认" + t.`status` = "已报名" OR t.`status` = "等待支付" OR t.`status` = "有效订单") + + + + diff --git a/src/main/resources/mapper/ClassDictMapper.xml b/src/main/resources/mapper/ClassDictMapper.xml index eb8b15c..b1ead21 100644 --- a/src/main/resources/mapper/ClassDictMapper.xml +++ b/src/main/resources/mapper/ClassDictMapper.xml @@ -200,6 +200,7 @@ diff --git a/src/main/resources/mapper/MemberMapper.xml b/src/main/resources/mapper/MemberMapper.xml index 96a4f06..1f6f57e 100644 --- a/src/main/resources/mapper/MemberMapper.xml +++ b/src/main/resources/mapper/MemberMapper.xml @@ -73,6 +73,7 @@ t6.ttlMember, t2.is_order, t2.is_fast_play, + t.email_status, if( TIMESTAMPDIFF( DAY,