From 0cb59b9a10b7a9b035f35f2c0fcac7cfa3937e1f Mon Sep 17 00:00:00 2001 From: tuyp Date: Fri, 15 Jul 2022 18:33:44 +0800 Subject: [PATCH] 备个份 --- src/main/java/com/subsidy/controller/ActivityDetectionController.java | 9 +++------ src/main/java/com/subsidy/controller/CompanyDictController.java | 7 +++++++ src/main/java/com/subsidy/dto/detection/GetCheckHistoryDTO.java | 17 +++++++++++++++++ src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java | 4 ++++ src/main/java/com/subsidy/model/ClassDictDO.java | 39 +++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/service/ActivityDetectionService.java | 5 +++-- src/main/java/com/subsidy/service/CompanyDictService.java | 3 +++ src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java | 28 +++++++++------------------- src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java | 36 +++++++++++++++++++++++++----------- src/main/java/com/subsidy/vo/activity/GetCheckHistoryVO.java | 14 ++++++++++++++ src/main/java/com/subsidy/vo/company/MemberSummaryVO.java | 15 +++++++++++++++ src/main/resources/mapper/ActivityDetectionMapper.xml | 13 +++++++++++++ 12 files changed, 152 insertions(+), 38 deletions(-) create mode 100644 src/main/java/com/subsidy/dto/detection/GetCheckHistoryDTO.java create mode 100644 src/main/java/com/subsidy/vo/activity/GetCheckHistoryVO.java create mode 100644 src/main/java/com/subsidy/vo/company/MemberSummaryVO.java diff --git a/src/main/java/com/subsidy/controller/ActivityDetectionController.java b/src/main/java/com/subsidy/controller/ActivityDetectionController.java index 85ed646..c175510 100644 --- a/src/main/java/com/subsidy/controller/ActivityDetectionController.java +++ b/src/main/java/com/subsidy/controller/ActivityDetectionController.java @@ -4,8 +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.detection.GetCheckHistoryDTO; import com.subsidy.dto.detection.VerifyDTO; -import com.subsidy.model.ActivityDetectionDO; import com.subsidy.service.ActivityDetectionService; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -43,11 +43,8 @@ public class ActivityDetectionController { @PostMapping("getCheckHistory") @ApiOperation("获取某个人某个课程的活跃度验证详情 memberId classId") - public ResponseVO getCheckHistory(@RequestBody ActivityDetectionDO activityDetectionDO){ - return ResponseData.generateCreatedResponse(0,activityDetectionService.getCheckHistory(activityDetectionDO)); + public ResponseVO getCheckHistory(@RequestBody GetCheckHistoryDTO getCheckHistoryDTO){ + return ResponseData.generateCreatedResponse(0,activityDetectionService.getCheckHistory(getCheckHistoryDTO)); } - - - } diff --git a/src/main/java/com/subsidy/controller/CompanyDictController.java b/src/main/java/com/subsidy/controller/CompanyDictController.java index edace0a..17182ce 100644 --- a/src/main/java/com/subsidy/controller/CompanyDictController.java +++ b/src/main/java/com/subsidy/controller/CompanyDictController.java @@ -77,4 +77,11 @@ public class CompanyDictController { return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO)); } + @PostMapping("memberSummary") + @ApiOperation("学员认证详情 companyId") + @LoginRequired + public ResponseVO memberSummary(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){ + return ResponseData.generateCreatedResponse(0,companyDictService.memberSummary(getCompanyMembersDTO)); + } + } diff --git a/src/main/java/com/subsidy/dto/detection/GetCheckHistoryDTO.java b/src/main/java/com/subsidy/dto/detection/GetCheckHistoryDTO.java new file mode 100644 index 0000000..70c2a30 --- /dev/null +++ b/src/main/java/com/subsidy/dto/detection/GetCheckHistoryDTO.java @@ -0,0 +1,17 @@ +package com.subsidy.dto.detection; + +import lombok.Data; + +@Data +public class GetCheckHistoryDTO { + + private Integer pageSize; + + private Integer pageNum; + + private Long memberId; + + private Long classId; + + +} diff --git a/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java b/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java index caf5e1b..b3682dd 100644 --- a/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java +++ b/src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java @@ -1,7 +1,9 @@ package com.subsidy.mapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.subsidy.model.ActivityDetectionDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.subsidy.vo.activity.GetCheckHistoryVO; import org.springframework.stereotype.Repository; /** @@ -15,4 +17,6 @@ import org.springframework.stereotype.Repository; @Repository public interface ActivityDetectionMapper extends BaseMapper { + IPage getCheckHistory(IPage iPage,Long classId,Long memberId); + } diff --git a/src/main/java/com/subsidy/model/ClassDictDO.java b/src/main/java/com/subsidy/model/ClassDictDO.java index 98cdd7c..20c4ef8 100644 --- a/src/main/java/com/subsidy/model/ClassDictDO.java +++ b/src/main/java/com/subsidy/model/ClassDictDO.java @@ -78,6 +78,45 @@ public class ClassDictDO extends BaseModel { */ private Integer testRule; + /** + * 学习上限时长 + */ + private Integer limitHour; + + /** + * 首次进入班级时人脸验证 + */ + private Integer imageClassCheck; + + /** + * 测试前人脸识别验证 + */ + private Integer imageTestCheck; + + /** + * 活跃度检测开启/关闭 + */ + private Integer activityDetection; + + /** + * 活跃度检测方式 + */ + private Integer activityDetectionMethod; + + /** + * 首次播放允许拖曳 + */ + private Integer firstDragAllowed; + + /** + * 首次播放允许倍速 + */ + private Integer firstSpeedAllowed; + + /** + * 课时抓拍 + */ + private Integer playSnap; diff --git a/src/main/java/com/subsidy/service/ActivityDetectionService.java b/src/main/java/com/subsidy/service/ActivityDetectionService.java index 3a0ab1e..a02bb4c 100644 --- a/src/main/java/com/subsidy/service/ActivityDetectionService.java +++ b/src/main/java/com/subsidy/service/ActivityDetectionService.java @@ -1,12 +1,13 @@ package com.subsidy.service; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.subsidy.dto.detection.GetCheckHistoryDTO; import com.subsidy.dto.detection.VerifyDTO; import com.subsidy.model.ActivityDetectionDO; import com.baomidou.mybatisplus.extension.service.IService; +import com.subsidy.vo.activity.GetCheckHistoryVO; import javax.servlet.http.HttpServletRequest; -import java.util.List; /** *

@@ -20,6 +21,6 @@ public interface ActivityDetectionService extends IService String verify(VerifyDTO verifyDTO, HttpServletRequest request); - IPage getCheckHistory(ActivityDetectionDO activityDetectionDO); + IPage getCheckHistory(GetCheckHistoryDTO getCheckHistoryDTO); } diff --git a/src/main/java/com/subsidy/service/CompanyDictService.java b/src/main/java/com/subsidy/service/CompanyDictService.java index 29b31d1..de47137 100644 --- a/src/main/java/com/subsidy/service/CompanyDictService.java +++ b/src/main/java/com/subsidy/service/CompanyDictService.java @@ -10,6 +10,7 @@ import com.subsidy.model.MemberDO; import com.subsidy.vo.administer.OperatorsVO; import com.subsidy.vo.company.GetAllCompanyVO; import com.subsidy.vo.company.GetCompanyMembersVO; +import com.subsidy.vo.company.MemberSummaryVO; import java.util.List; @@ -35,4 +36,6 @@ public interface CompanyDictService extends IService { IPage getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO); + MemberSummaryVO memberSummary(GetCompanyMembersDTO getCompanyMembersDTO); + } diff --git a/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java b/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java index 48cd2d9..47dc77c 100644 --- a/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ActivityDetectionServiceImpl.java @@ -1,15 +1,18 @@ package com.subsidy.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.subsidy.common.configure.ActivityDetectionConfig; import com.subsidy.common.configure.VODConfig; -import com.subsidy.common.configure.WechatConfig; +import com.subsidy.dto.detection.GetCheckHistoryDTO; import com.subsidy.dto.detection.VerifyDTO; import com.subsidy.model.ActivityDetectionDO; import com.subsidy.mapper.ActivityDetectionMapper; import com.subsidy.service.ActivityDetectionService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.subsidy.util.ConstantUtils; +import com.subsidy.util.IpAddressUtil; +import com.subsidy.vo.activity.GetCheckHistoryVO; import com.tencentcloudapi.captcha.v20190722.CaptchaClient; import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultRequest; import com.tencentcloudapi.captcha.v20190722.models.DescribeCaptchaResultResponse; @@ -56,18 +59,7 @@ public class ActivityDetectionServiceImpl extends ServiceImpl getCheckHistory(ActivityDetectionDO activityDetectionDO){ - - - return null; + public IPage getCheckHistory(GetCheckHistoryDTO getCheckHistoryDTO){ + Page pager = new Page(getCheckHistoryDTO.getPageNum(), getCheckHistoryDTO.getPageSize()); + return this.baseMapper.getCheckHistory(pager,getCheckHistoryDTO.getClassId(),getCheckHistoryDTO.getMemberId()); } } diff --git a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java index 1e709ec..f1abc75 100644 --- a/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java @@ -9,17 +9,7 @@ import com.subsidy.common.exception.HttpException; import com.subsidy.dto.administer.OperatorsDTO; import com.subsidy.dto.company.AddCompanyDTO; import com.subsidy.dto.company.GetCompanyMembersDTO; -import com.subsidy.mapper.AdministerMapper; -import com.subsidy.mapper.ClassHourDictMapper; -import com.subsidy.mapper.ClassTypeDictMapper; -import com.subsidy.mapper.CompanyDictMapper; -import com.subsidy.mapper.CompanyFieldMappingMapper; -import com.subsidy.mapper.DepartmentDictMapper; -import com.subsidy.mapper.FieldDictMapper; -import com.subsidy.mapper.JobDictMapper; -import com.subsidy.mapper.RankDictMapper; -import com.subsidy.mapper.RoleAdministerMappingMapper; -import com.subsidy.mapper.RotationImgDictMapper; +import com.subsidy.mapper.*; import com.subsidy.model.*; import com.subsidy.service.CompanyDictService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -27,6 +17,7 @@ import com.subsidy.util.ConstantUtils; import com.subsidy.vo.administer.OperatorsVO; import com.subsidy.vo.company.GetAllCompanyVO; import com.subsidy.vo.company.GetCompanyMembersVO; +import com.subsidy.vo.company.MemberSummaryVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; @@ -77,6 +68,9 @@ public class CompanyDictServiceImpl extends ServiceImpl operators(OperatorsDTO operatorsDTO) { Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize()); @@ -258,5 +252,25 @@ public class CompanyDictServiceImpl extends ServiceImpl() + .lambda() + .eq(MemberDO::getCompanyId,getCompanyMembersDTO.getCompanyId())); + memberSummaryVO.setTotal(total); + + //短信验证 + Integer smsCnt = memberMapper.selectCount(new QueryWrapper() + .lambda() + .eq(MemberDO::getCompanyId,getCompanyMembersDTO.getCompanyId()) + .isNull(MemberDO::getFirstLogin)); + memberSummaryVO.setSmsCnt(smsCnt); + + memberSummaryVO.setImgCnt(total-smsCnt); + return memberSummaryVO; + } } diff --git a/src/main/java/com/subsidy/vo/activity/GetCheckHistoryVO.java b/src/main/java/com/subsidy/vo/activity/GetCheckHistoryVO.java new file mode 100644 index 0000000..349fd36 --- /dev/null +++ b/src/main/java/com/subsidy/vo/activity/GetCheckHistoryVO.java @@ -0,0 +1,14 @@ +package com.subsidy.vo.activity; + +import lombok.Data; + +@Data +public class GetCheckHistoryVO { + + private Long id; + + private String createDate; + + private Integer status; + +} diff --git a/src/main/java/com/subsidy/vo/company/MemberSummaryVO.java b/src/main/java/com/subsidy/vo/company/MemberSummaryVO.java new file mode 100644 index 0000000..4278ef1 --- /dev/null +++ b/src/main/java/com/subsidy/vo/company/MemberSummaryVO.java @@ -0,0 +1,15 @@ +package com.subsidy.vo.company; + +import lombok.Data; + +@Data +public class MemberSummaryVO { + + + private Integer total; + + private Integer smsCnt; + + private Integer imgCnt; + +} diff --git a/src/main/resources/mapper/ActivityDetectionMapper.xml b/src/main/resources/mapper/ActivityDetectionMapper.xml index 9fc0b42..f8351eb 100644 --- a/src/main/resources/mapper/ActivityDetectionMapper.xml +++ b/src/main/resources/mapper/ActivityDetectionMapper.xml @@ -21,4 +21,17 @@ id, class_id, member_id, status + + -- libgit2 0.25.0