Commit 2db05a18 by 涂亚平

行业领域

1 parent 0879ca0d
Showing with 457 additions and 149 deletions
...@@ -5,10 +5,7 @@ import com.subsidy.common.ResponseData; ...@@ -5,10 +5,7 @@ import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO; import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.administer.*; import com.subsidy.dto.administer.*;
import com.subsidy.model.AdministerDO; import com.subsidy.model.*;
import com.subsidy.model.ExerciseDoneHistoryDO;
import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.AdministerService; import com.subsidy.service.AdministerService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -91,7 +88,7 @@ public class AdministerController { ...@@ -91,7 +88,7 @@ public class AdministerController {
@PostMapping("classSummary") @PostMapping("classSummary")
@ApiOperation("班级详情--数据概览 id 班级id ") @ApiOperation("班级详情--数据概览 id 班级id ")
@LoginRequired // @LoginRequired
public ResponseVO classSummary(@RequestBody ClassDetailDTO classDetailDTO){ public ResponseVO classSummary(@RequestBody ClassDetailDTO classDetailDTO){
return ResponseData.generateCreatedResponse(0,administerService.classSummary(classDetailDTO)); return ResponseData.generateCreatedResponse(0,administerService.classSummary(classDetailDTO));
} }
...@@ -233,6 +230,12 @@ public class AdministerController { ...@@ -233,6 +230,12 @@ public class AdministerController {
return ResponseData.generateCreatedResponse(0,administerService.imageCheckDetail(classDetailDTO)); return ResponseData.generateCreatedResponse(0,administerService.imageCheckDetail(classDetailDTO));
} }
@PostMapping("getMemberCheckDetail")
@ApiOperation("查看某个学生的验证详情 memberId 学员id classId")
@LoginRequired
public ResponseVO getMemberCheckDetail(@RequestBody ImageCheckRecordDO imageCheckRecordDO){
return ResponseData.generateCreatedResponse(0,administerService.getMemberCheckDetail(imageCheckRecordDO));
}
@PostMapping("exportZip") @PostMapping("exportZip")
@ApiOperation("下载压缩包 id 班级id") @ApiOperation("下载压缩包 id 班级id")
...@@ -257,9 +260,17 @@ public class AdministerController { ...@@ -257,9 +260,17 @@ public class AdministerController {
} }
@PostMapping("manageMember") @PostMapping("manageMember")
@ApiOperation("用户管理 {pageSize pageNum userName:名字 【废弃】}") @ApiOperation("用户管理 {pageSize pageNum userName:名字 }")
@LoginRequired @LoginRequired
public ResponseVO manageMember(@RequestBody ManageMemberDTO manageMemberDTO){ public ResponseVO manageMember(@RequestBody ManageMemberDTO manageMemberDTO){
return ResponseData.generateCreatedResponse(0,administerService.manageMember(manageMemberDTO)); return ResponseData.generateCreatedResponse(0,administerService.manageMember(manageMemberDTO));
} }
@PostMapping("exportManageMember")
@ApiOperation("导出认证信息 {pageSize pageNum userName:名字 } ")
@LoginRequired
public void exportManageMember(@RequestBody ManageMemberDTO manageMemberDTO){
administerService.exportManageMember(manageMemberDTO);
}
} }
...@@ -10,6 +10,7 @@ import com.subsidy.service.AnsweringQuestionService; ...@@ -10,6 +10,7 @@ import com.subsidy.service.AnsweringQuestionService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -41,6 +42,7 @@ public class AnsweringQuestionController { ...@@ -41,6 +42,7 @@ public class AnsweringQuestionController {
@PostMapping("addQuestion") @PostMapping("addQuestion")
@ApiOperation("新增答疑 {classId askId title}") @ApiOperation("新增答疑 {classId askId title}")
@LoginRequired @LoginRequired
@CachePut(value = "ResultData" ,key = "'classId_'+#answeringQuestionDO.getClassId()")
public ResponseVO addQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){ public ResponseVO addQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){
return ResponseData.generateCreatedResponse(0,answeringQuestionService.addQuestion(answeringQuestionDO)); return ResponseData.generateCreatedResponse(0,answeringQuestionService.addQuestion(answeringQuestionDO));
} }
...@@ -48,6 +50,7 @@ public class AnsweringQuestionController { ...@@ -48,6 +50,7 @@ public class AnsweringQuestionController {
@PostMapping("deleteQuestion") @PostMapping("deleteQuestion")
@ApiOperation(" 删除答疑 {id}") @ApiOperation(" 删除答疑 {id}")
@LoginRequired @LoginRequired
@CachePut(value = "ResultData" ,key = "'classId_'+#answeringQuestionDO.getClassId()")
public ResponseVO deleteQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){ public ResponseVO deleteQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){
return ResponseData.generateCreatedResponse(0,answeringQuestionService.deleteQuestion(answeringQuestionDO)); return ResponseData.generateCreatedResponse(0,answeringQuestionService.deleteQuestion(answeringQuestionDO));
} }
...@@ -55,6 +58,7 @@ public class AnsweringQuestionController { ...@@ -55,6 +58,7 @@ public class AnsweringQuestionController {
@PostMapping("updateQuestion") @PostMapping("updateQuestion")
@ApiOperation("编辑答疑 {id answerId answer}") @ApiOperation("编辑答疑 {id answerId answer}")
@LoginRequired @LoginRequired
@CachePut(value = "ResultData" ,key = "'classId_'+#answeringQuestionDO.getClassId()")
public ResponseVO updateQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){ public ResponseVO updateQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){
return ResponseData.generateCreatedResponse(0, answeringQuestionService.updateQuestion(answeringQuestionDO)); return ResponseData.generateCreatedResponse(0, answeringQuestionService.updateQuestion(answeringQuestionDO));
} }
......
...@@ -8,6 +8,7 @@ import com.subsidy.dto.category.GetCategoriesDTO; ...@@ -8,6 +8,7 @@ import com.subsidy.dto.category.GetCategoriesDTO;
import com.subsidy.model.CategoryDO; import com.subsidy.model.CategoryDO;
import com.subsidy.service.CategoryService; import com.subsidy.service.CategoryService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.catagory.GetCategoriesVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -25,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -25,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
* @since 2021-10-11 * @since 2021-10-11
*/ */
@RestController @RestController
@Api(tags = "类目") @Api(tags = "行业领域")
@RequestMapping("/category") @RequestMapping("/category")
public class CategoryController { public class CategoryController {
...@@ -33,37 +34,37 @@ public class CategoryController { ...@@ -33,37 +34,37 @@ public class CategoryController {
private CategoryService categoryService; private CategoryService categoryService;
@PostMapping("getCategories") @PostMapping("getCategories")
@ApiOperation("查询类目 name 类目名称 companyId pageSize pageNum") @ApiOperation("查询行业领域 name 类目名称 companyId pageSize pageNum")
@LoginRequired @LoginRequired
public ResponseVO getCategories(@RequestBody GetCategoriesDTO getCategoriesDTO){ public ResponseVO getCategories(@RequestBody GetCategoriesDTO getCategoriesDTO){
return ResponseData.generateCreatedResponse(0,categoryService.getCategories(getCategoriesDTO)); return ResponseData.generateCreatedResponse(0,categoryService.getCategories(getCategoriesDTO));
} }
@PostMapping("getAll") @PostMapping("getAll")
@ApiOperation("查询所有类目 companyId") @ApiOperation("查询所有类目【是否还有用?】 companyId")
public ResponseVO getAll(@RequestBody GetCategoriesDTO getCategoriesDTO){ public ResponseVO getAll(@RequestBody GetCategoriesDTO getCategoriesDTO){
return ResponseData.generateCreatedResponse(0,categoryService.getAll(getCategoriesDTO)); return ResponseData.generateCreatedResponse(0,categoryService.getAll(getCategoriesDTO));
} }
@PostMapping("addCategory") @PostMapping("addCategory")
@ApiOperation("新增类目 name companyId") @ApiOperation("新增行业领域 name companyId categoryDOS[name 行业领域名称]")
@LoginRequired @LoginRequired
public ResponseVO addCategory(@RequestBody CategoryDO categoryDO){ public ResponseVO addCategory(@RequestBody GetCategoriesVO getCategoriesVO){
return ResponseData.generateCreatedResponse(0,categoryService.addCategory(categoryDO)); return ResponseData.generateCreatedResponse(0,categoryService.addCategory(getCategoriesVO));
} }
@PostMapping("deleteCategory") @PostMapping("deleteCategory")
@ApiOperation("删除类目 id") @ApiOperation("删除一级行业领域 id")
@LoginRequired @LoginRequired
public ResponseVO deleteCategory(@RequestBody CategoryDO categoryDO){ public ResponseVO deleteCategory(@RequestBody CategoryDO categoryDO){
return ResponseData.generateCreatedResponse(0,categoryService.deleteCategory(categoryDO)); return ResponseData.generateCreatedResponse(0,categoryService.deleteCategory(categoryDO));
} }
@PostMapping("updateCategory") @PostMapping("updateCategory")
@ApiOperation("修改类目 id name companyId") @ApiOperation("修改行业领域 id name companyId categoryDOS[name 行业领域名称]")
@LoginRequired @LoginRequired
public ResponseVO updateCategory(@RequestBody CategoryDO categoryDO){ public ResponseVO updateCategory(@RequestBody GetCategoriesVO getCategoriesVO){
return ResponseData.generateCreatedResponse(0,categoryService.updateCategory(categoryDO)); return ResponseData.generateCreatedResponse(0,categoryService.updateCategory(getCategoriesVO));
} }
} }
...@@ -16,6 +16,7 @@ import com.subsidy.util.ConstantUtils; ...@@ -16,6 +16,7 @@ import com.subsidy.util.ConstantUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -59,7 +60,10 @@ public class ClassDictController { ...@@ -59,7 +60,10 @@ public class ClassDictController {
} }
@PostMapping("updateClass") @PostMapping("updateClass")
@ApiOperation("修改班级 id companyId className classTypeId startDate endDate") @ApiOperation("修改班级 id className classTypeId startDate endDate isOrder 是否按顺序播放 isFastPlay 是否允许快进 " +
"testRule:测试规则 limitHour 学习上限时长 imageClassCheck:首次进入班级时人脸验证 imageTestCheck:测试前人脸识别验证" +
"activityDetection:活跃度检测开启/关闭 activityDetectionMethod:活跃度检测方式 firstDragAllowed:首次播放允许拖曳" +
"firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 ")
@LoginRequired @LoginRequired
public ResponseVO updateClass(@RequestBody ClassDictDO classDictDO){ public ResponseVO updateClass(@RequestBody ClassDictDO classDictDO){
return ResponseData.generateCreatedResponse(0,classDictService.updateClass(classDictDO)); return ResponseData.generateCreatedResponse(0,classDictService.updateClass(classDictDO));
......
...@@ -57,12 +57,28 @@ public class CompanyDictController { ...@@ -57,12 +57,28 @@ public class CompanyDictController {
} }
@PostMapping("updateCompany") @PostMapping("updateCompany")
@ApiOperation("修改企业 id superviseName 第三方监管名称 accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员") @ApiOperation("修改企业 id superviseName 第三方监管名称 accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 " +
"banner:标语 field[]:领域 role 1:超级管理员 2:普通成员 ")
@LoginRequired @LoginRequired
public ResponseVO updateAdminister(@RequestBody AddCompanyDTO addCompanyDTO){ public ResponseVO updateAdminister(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.updateAdminister(addCompanyDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.updateAdminister(addCompanyDTO));
} }
@PostMapping("updateCompanySettings")
@ApiOperation("修改企业设置 id timeLimit:上课时间不晚于23:30,不早于6:30" +
"ipAddressRecord: 签到时记录IP地址 deviceNoRecord: 设备类型")
@LoginRequired
public ResponseVO updateCompanySettings(@RequestBody CompanyDictDO companyDictDO){
return ResponseData.generateCreatedResponse(0,companyDictService.updateCompanySettings(companyDictDO));
}
@PostMapping("getCompanyInfo")
@ApiOperation("获取公司配置信息 id ")
@LoginRequired
public ResponseVO getCompanyInfo(@RequestBody CompanyDictDO companyDictDO){
return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyInfo(companyDictDO));
}
@PostMapping("getAllCompany") @PostMapping("getAllCompany")
@ApiOperation("获取全部企业 {companyName}") @ApiOperation("获取全部企业 {companyName}")
@LoginRequired @LoginRequired
......
...@@ -15,6 +15,7 @@ import com.subsidy.util.ConstantUtils; ...@@ -15,6 +15,7 @@ import com.subsidy.util.ConstantUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -61,6 +62,7 @@ public class ExerciseDictController { ...@@ -61,6 +62,7 @@ public class ExerciseDictController {
@ApiOperation("提交答案 {paperId 卷子id memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ] length:做题时长} ") @ApiOperation("提交答案 {paperId 卷子id memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ] length:做题时长} ")
@LoginRequired @LoginRequired
@TimeRequired @TimeRequired
@CachePut(value = "ResultData" ,key = "'classId_'+#submitDTO.getClassId()")
public ResponseVO submit(@RequestBody SubmitDTO submitDTO){ public ResponseVO submit(@RequestBody SubmitDTO submitDTO){
return ResponseData.generateCreatedResponse(0,exerciseDictService.submit(submitDTO)); return ResponseData.generateCreatedResponse(0,exerciseDictService.submit(submitDTO));
} }
......
...@@ -4,6 +4,7 @@ package com.subsidy.controller; ...@@ -4,6 +4,7 @@ package com.subsidy.controller;
import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO; import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.image.CheckResultDTO; import com.subsidy.dto.image.CheckResultDTO;
import com.subsidy.dto.image.ImageCheckDTO; import com.subsidy.dto.image.ImageCheckDTO;
import com.subsidy.model.ImageCheckRecordDO; import com.subsidy.model.ImageCheckRecordDO;
...@@ -42,24 +43,37 @@ public class ImageCheckRecordController { ...@@ -42,24 +43,37 @@ public class ImageCheckRecordController {
} }
@PostMapping("imageCheck") @PostMapping("imageCheck")
@ApiOperation("启动人身核验 PC端 id 用户id ") @ApiOperation("课程/测评人身核验(权威库:身份证) PC端 id 用户id classId 班级id ")
@TimeRequired
public ResponseVO imageCheck(@RequestBody ImageCheckDTO imageCheckDTO) throws Exception { public ResponseVO imageCheck(@RequestBody ImageCheckDTO imageCheckDTO) throws Exception {
return ResponseData.generateCreatedResponse(0, imageCheckRecordService.imageCheck(imageCheckDTO)); return ResponseData.generateCreatedResponse(0, imageCheckRecordService.imageCheck(imageCheckDTO));
} }
@PostMapping("h5CheckResult") @PostMapping("h5ImageCheck")
@ApiOperation("启动人脸核验 微信浮层H5 id 用户id") @ApiOperation("课程/测评人脸核验(权威库:身份证) 微信浮层H5 id 用户id classId 班级id")
@TimeRequired
public ResponseVO h5CheckResult(@RequestBody ImageCheckDTO imageCheckDTO)throws Exception{ public ResponseVO h5CheckResult(@RequestBody ImageCheckDTO imageCheckDTO)throws Exception{
return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5CheckResult(imageCheckDTO)); return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5CheckResult(imageCheckDTO));
} }
@PostMapping("checkResult") @PostMapping("loginCheck")
@ApiOperation("人脸验证结果 memberId orderNo ") @ApiOperation("签到页做人脸核验 (权威库:身份证) PC端 id 用户id")
public void checkResult(@RequestBody CheckResultDTO checkResultDTO)throws Exception{ @TimeRequired
imageCheckRecordService.checkResult(checkResultDTO); public ResponseVO loginCheck(@RequestBody ImageCheckDTO imageCheckDTO)throws Exception{
return ResponseData.generateCreatedResponse(0,imageCheckRecordService.loginCheck(imageCheckDTO));
} }
@PostMapping("h5LoginCheck")
@ApiOperation("签到页做人脸核验 (权威库:身份证) PC端 id 用户id")
@TimeRequired
public ResponseVO h5LoginCheck(@RequestBody ImageCheckDTO imageCheckDTO)throws Exception{
return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5LoginCheck(imageCheckDTO));
}
@PostMapping("checkResult")
@ApiOperation("人脸验证结果 存图片 id 订单号 ")
public ResponseVO checkResult(@RequestBody CheckResultDTO checkResultDTO)throws Exception{
return ResponseData.generateCreatedResponse(0,imageCheckRecordService.checkResult(checkResultDTO));
}
} }
...@@ -110,7 +110,7 @@ public class MemberController { ...@@ -110,7 +110,7 @@ public class MemberController {
@PostMapping("myCourses") @PostMapping("myCourses")
@ApiOperation("手机端:我的学习--课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 ") @ApiOperation("手机端:我的学习--课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 ")
// @LoginRequired @LoginRequired
@TimeRequired @TimeRequired
public ResponseVO myCourses(@RequestBody MyCoursesDTO myCoursesDTO){ public ResponseVO myCourses(@RequestBody MyCoursesDTO myCoursesDTO){
return ResponseData.generateCreatedResponse(0,memberService.myCourses(myCoursesDTO)); return ResponseData.generateCreatedResponse(0,memberService.myCourses(myCoursesDTO));
...@@ -118,7 +118,7 @@ public class MemberController { ...@@ -118,7 +118,7 @@ public class MemberController {
@PostMapping("contentVod") @PostMapping("contentVod")
@ApiOperation("手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id") @ApiOperation("手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id")
// @LoginRequired @LoginRequired
@TimeRequired @TimeRequired
public ResponseVO contentVod(@RequestBody ContentMemberDTO contentVodDTO){ public ResponseVO contentVod(@RequestBody ContentMemberDTO contentVodDTO){
return ResponseData.generateCreatedResponse(0,memberService.contentVod(contentVodDTO)); return ResponseData.generateCreatedResponse(0,memberService.contentVod(contentVodDTO));
......
...@@ -13,6 +13,7 @@ import com.subsidy.util.ConstantUtils; ...@@ -13,6 +13,7 @@ import com.subsidy.util.ConstantUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -35,16 +36,17 @@ public class SignInRecordController { ...@@ -35,16 +36,17 @@ public class SignInRecordController {
private SignInRecordService signInRecordService; private SignInRecordService signInRecordService;
@PostMapping("getMemberSignInfo") @PostMapping("getMemberSignInfo")
@ApiOperation("获取某个成员的签到记录 id 成员id pageSize pageNum") @ApiOperation("获取某个成员的签到记录 id 成员id classId 班级id pageSize pageNum")
@LoginRequired @LoginRequired
public ResponseVO getMemberSignInfo(@RequestBody GetMemberSignInfoDTO getMemberSignInfoDTO) { public ResponseVO getMemberSignInfo(@RequestBody GetMemberSignInfoDTO getMemberSignInfoDTO) {
return ResponseData.generateCreatedResponse(0, signInRecordService.getMemberSignInfo(getMemberSignInfoDTO)); return ResponseData.generateCreatedResponse(0, signInRecordService.getMemberSignInfo(getMemberSignInfoDTO));
} }
@PostMapping("signIn") @PostMapping("signIn")
@ApiOperation("签到 memberId") @ApiOperation("签到 memberId deviceNo:设备号")
@LoginRequired // @LoginRequired
@TimeRequired @TimeRequired
@CachePut(value = "ResultData" ,key = "'classId_'+#signInRecordDO.getClassId()")
public ResponseVO signIn(@RequestBody SignInRecordDO signInRecordDO) { public ResponseVO signIn(@RequestBody SignInRecordDO signInRecordDO) {
return ResponseData.generateCreatedResponse(0, signInRecordService.signIn(signInRecordDO)); return ResponseData.generateCreatedResponse(0, signInRecordService.signIn(signInRecordDO));
} }
...@@ -58,7 +60,7 @@ public class SignInRecordController { ...@@ -58,7 +60,7 @@ public class SignInRecordController {
@PostMapping("signInStatus") @PostMapping("signInStatus")
@ApiOperation("判断学生当天有没有打卡 {memberId 学生id}") @ApiOperation("判断学生当天有没有打卡 {memberId 学生id}")
@LoginRequired // @LoginRequired
@TimeRequired @TimeRequired
public ResponseVO signInStatus(@RequestBody SignInRecordDO signInRecordDO) { public ResponseVO signInStatus(@RequestBody SignInRecordDO signInRecordDO) {
return ResponseData.generateCreatedResponse(0, signInRecordService.signInStatus(signInRecordDO)); return ResponseData.generateCreatedResponse(0, signInRecordService.signInStatus(signInRecordDO));
......
...@@ -80,7 +80,6 @@ public class VodPlayHistoryController { ...@@ -80,7 +80,6 @@ public class VodPlayHistoryController {
vodPlayHistoryService.playLengthFix(remainSecondsDTO); vodPlayHistoryService.playLengthFix(remainSecondsDTO);
} }
@PostMapping("testPlays") @PostMapping("testPlays")
@ApiOperation("解决有交叉时间的数据") @ApiOperation("解决有交叉时间的数据")
public ResponseVO testPlays(@RequestBody VodPlayHistoryDO vodPlayHistoryDO){ public ResponseVO testPlays(@RequestBody VodPlayHistoryDO vodPlayHistoryDO){
......
...@@ -5,7 +5,6 @@ import lombok.Data; ...@@ -5,7 +5,6 @@ import lombok.Data;
@Data @Data
public class CheckResultDTO { public class CheckResultDTO {
private String orderNo; private String id;
private Long memberId;
} }
...@@ -7,4 +7,6 @@ public class ImageCheckDTO { ...@@ -7,4 +7,6 @@ public class ImageCheckDTO {
private Long id; private Long id;
private Long classId;
} }
...@@ -9,6 +9,8 @@ public class GetMemberSignInfoDTO { ...@@ -9,6 +9,8 @@ public class GetMemberSignInfoDTO {
private Integer pageNum; private Integer pageNum;
private Long classId;
private Long id; private Long id;
} }
package com.subsidy.mapper; package com.subsidy.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.model.CategoryDO; import com.subsidy.model.CategoryDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.catagory.GetCategoriesVO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
...@@ -19,8 +21,15 @@ public interface CategoryMapper extends BaseMapper<CategoryDO> { ...@@ -19,8 +21,15 @@ public interface CategoryMapper extends BaseMapper<CategoryDO> {
/** /**
* 查看某个课程下的所有类目 * 查看某个课程下的所有行业领域
*/ */
List<CategoryDO> queryCourseCategory(Long courseId); List<CategoryDO> queryCourseCategory(Long courseId);
/**
* 查看行业领域
* 公司id为空的话就查平台的,否则传公司的行业领域
*/
IPage<GetCategoriesVO> getCategories(IPage page,Long companyId,String name);
} }
...@@ -2,8 +2,11 @@ package com.subsidy.mapper; ...@@ -2,8 +2,11 @@ package com.subsidy.mapper;
import com.subsidy.model.ImageCheckRecordDO; import com.subsidy.model.ImageCheckRecordDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.image.GetMemberCheckDetailVO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* <p> * <p>
* 实名验证记录表 Mapper 接口 * 实名验证记录表 Mapper 接口
...@@ -12,7 +15,13 @@ import org.springframework.stereotype.Repository; ...@@ -12,7 +15,13 @@ import org.springframework.stereotype.Repository;
* @author DengMin * @author DengMin
* @since 2022-07-14 * @since 2022-07-14
*/ */
@Repository @Repository
public interface ImageCheckRecordMapper extends BaseMapper<ImageCheckRecordDO> { public interface ImageCheckRecordMapper extends BaseMapper<ImageCheckRecordDO> {
/**
* 获取某个人某个课程的验证记录
*/
List<GetMemberCheckDetailVO> getMemberCheckDetail(Long memberId, Long classId);
} }
...@@ -44,5 +44,5 @@ public interface VodDictMapper extends BaseMapper<VodDictDO> { ...@@ -44,5 +44,5 @@ public interface VodDictMapper extends BaseMapper<VodDictDO> {
/** /**
* 重复数据查找 * 重复数据查找
*/ */
List<VodPlayStateVO> testPlays(Long memberId); List<VodPlayStateVO> testPlays(Long memberId,Long classId);
} }
...@@ -26,6 +26,11 @@ public class CategoryDO extends BaseModel { ...@@ -26,6 +26,11 @@ public class CategoryDO extends BaseModel {
private Long id; private Long id;
/** /**
* 父id
*/
private Long parentId;
/**
* 企业id * 企业id
*/ */
private Long companyId; private Long companyId;
......
...@@ -68,10 +68,10 @@ public class ClassDictDO extends BaseModel { ...@@ -68,10 +68,10 @@ public class ClassDictDO extends BaseModel {
*/ */
private Integer isFastPlay; private Integer isFastPlay;
///** /**
// * 班级状态 * 班级状态
// */ */
//private String openStatus; private String openStatus;
/** /**
* 测试规则 * 测试规则
...@@ -118,6 +118,4 @@ public class ClassDictDO extends BaseModel { ...@@ -118,6 +118,4 @@ public class ClassDictDO extends BaseModel {
*/ */
private Integer playSnap; private Integer playSnap;
} }
...@@ -60,4 +60,20 @@ public class CompanyDictDO extends BaseModel { ...@@ -60,4 +60,20 @@ public class CompanyDictDO extends BaseModel {
*/ */
private String superviseName; private String superviseName;
/**
* 上课时间不晚于23:30,不早于6:30
*/
private Integer timeLimit;
/**
* 签到时记录IP地址
*/
private Integer ipAddressRecord;
/**
* 签到时记录设备型号
*/
private Integer deviceNoRecord;
} }
...@@ -26,6 +26,11 @@ public class ImageCheckRecordDO extends BaseModel { ...@@ -26,6 +26,11 @@ public class ImageCheckRecordDO extends BaseModel {
private Long id; private Long id;
/** /**
* 班级
*/
private Long classId;
/**
* 成员id * 成员id
*/ */
private Long memberId; private Long memberId;
...@@ -60,5 +65,10 @@ public class ImageCheckRecordDO extends BaseModel { ...@@ -60,5 +65,10 @@ public class ImageCheckRecordDO extends BaseModel {
*/ */
private Integer checkType; private Integer checkType;
/**
* 检测地点 1,签到页 0 班级内
*/
private Integer checkPlace;
} }
...@@ -46,5 +46,15 @@ public class SignInRecordDO extends BaseModel { ...@@ -46,5 +46,15 @@ public class SignInRecordDO extends BaseModel {
@ExcelColumnUtil(value = "sign_in_date", col = 4) @ExcelColumnUtil(value = "sign_in_date", col = 4)
private LocalDateTime signInDate; private LocalDateTime signInDate;
/**
* 地址
*/
private String ipAddress;
/**
* 设备号
*/
private String deviceNo;
} }
...@@ -6,8 +6,10 @@ import com.subsidy.dto.administer.*; ...@@ -6,8 +6,10 @@ import com.subsidy.dto.administer.*;
import com.subsidy.model.AdministerDO; import com.subsidy.model.AdministerDO;
import com.subsidy.model.ExerciseDoneHistoryDO; import com.subsidy.model.ExerciseDoneHistoryDO;
import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.ImageCheckRecordDO;
import com.subsidy.vo.administer.*; import com.subsidy.vo.administer.*;
import com.subsidy.vo.classdict.ClassDetailVO; import com.subsidy.vo.classdict.ClassDetailVO;
import com.subsidy.vo.image.GetMemberCheckDetailVO;
import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.member.ClassSignVO;
import com.subsidy.vo.sign.AnswerRecordVO; import com.subsidy.vo.sign.AnswerRecordVO;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -74,6 +76,8 @@ public interface AdministerService extends IService<AdministerDO> { ...@@ -74,6 +76,8 @@ public interface AdministerService extends IService<AdministerDO> {
IPage<ImageCheckDetailVO> imageCheckDetail(ClassDetailDTO classDetailDTO); IPage<ImageCheckDetailVO> imageCheckDetail(ClassDetailDTO classDetailDTO);
List<GetMemberCheckDetailVO> getMemberCheckDetail(ImageCheckRecordDO imageCheckRecordDO);
void export(ClassDetailDTO classDetailDTO)throws Exception; void export(ClassDetailDTO classDetailDTO)throws Exception;
IPage memberStudy(MemberStudyLogDTO memberStudyLogDTO); IPage memberStudy(MemberStudyLogDTO memberStudyLogDTO);
...@@ -83,4 +87,6 @@ public interface AdministerService extends IService<AdministerDO> { ...@@ -83,4 +87,6 @@ public interface AdministerService extends IService<AdministerDO> {
String importMember(Long companyId, MultipartFile multipartFile)throws Exception; String importMember(Long companyId, MultipartFile multipartFile)throws Exception;
IPage<ManageMemberVO> manageMember(ManageMemberDTO manageMemberDTO); IPage<ManageMemberVO> manageMember(ManageMemberDTO manageMemberDTO);
void exportManageMember(ManageMemberDTO manageMemberDTO);
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.subsidy.dto.category.GetCategoriesDTO; import com.subsidy.dto.category.GetCategoriesDTO;
import com.subsidy.model.CategoryDO; import com.subsidy.model.CategoryDO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.catagory.GetCategoriesVO;
import java.util.List; import java.util.List;
...@@ -17,13 +18,13 @@ import java.util.List; ...@@ -17,13 +18,13 @@ import java.util.List;
*/ */
public interface CategoryService extends IService<CategoryDO> { public interface CategoryService extends IService<CategoryDO> {
IPage<CategoryDO> getCategories(GetCategoriesDTO getCategoriesDTO); IPage<GetCategoriesVO> getCategories(GetCategoriesDTO getCategoriesDTO);
List<CategoryDO> getAll(GetCategoriesDTO getCategoriesDTO); List<CategoryDO> getAll(GetCategoriesDTO getCategoriesDTO);
String addCategory(CategoryDO categoryDO); String addCategory(GetCategoriesVO getCategoriesVO);
String deleteCategory(CategoryDO categoryDO); String deleteCategory(CategoryDO categoryDO);
String updateCategory(CategoryDO categoryDO); String updateCategory(GetCategoriesVO getCategoriesVO);
} }
...@@ -33,6 +33,10 @@ public interface CompanyDictService extends IService<CompanyDictDO> { ...@@ -33,6 +33,10 @@ public interface CompanyDictService extends IService<CompanyDictDO> {
String updateAdminister(AddCompanyDTO addCompanyDTO); String updateAdminister(AddCompanyDTO addCompanyDTO);
String updateCompanySettings(CompanyDictDO companyDictDO);
CompanyDictDO getCompanyInfo(CompanyDictDO companyDictDO);
List<GetAllCompanyVO> getAllCompany(CompanyDictDO companyDictDO); List<GetAllCompanyVO> getAllCompany(CompanyDictDO companyDictDO);
IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO); IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO);
......
...@@ -24,6 +24,10 @@ public interface ImageCheckRecordService extends IService<ImageCheckRecordDO> { ...@@ -24,6 +24,10 @@ public interface ImageCheckRecordService extends IService<ImageCheckRecordDO> {
SendIdCardInfoVO h5CheckResult(ImageCheckDTO imageCheckDTO) throws Exception; SendIdCardInfoVO h5CheckResult(ImageCheckDTO imageCheckDTO) throws Exception;
void checkResult(CheckResultDTO checkResultDTO)throws Exception; SendIdCardInfoVO loginCheck(ImageCheckDTO imageCheckDTO)throws Exception;
SendIdCardInfoVO h5LoginCheck(ImageCheckDTO imageCheckDTO)throws Exception;
ImageCheckRecordDO checkResult(CheckResultDTO checkResultDTO)throws Exception;
} }
...@@ -8,6 +8,7 @@ import com.subsidy.model.VodPlayHistoryDO; ...@@ -8,6 +8,7 @@ import com.subsidy.model.VodPlayHistoryDO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.vo.vod.VodPlayStateVO; import com.subsidy.vo.vod.VodPlayStateVO;
import java.util.HashSet;
import java.util.List; import java.util.List;
/** /**
...@@ -32,5 +33,5 @@ public interface VodPlayHistoryService extends IService<VodPlayHistoryDO> { ...@@ -32,5 +33,5 @@ public interface VodPlayHistoryService extends IService<VodPlayHistoryDO> {
void playLengthFix(RemainSecondsDTO remainSecondsDTO); void playLengthFix(RemainSecondsDTO remainSecondsDTO);
List<Long> testPlays(VodPlayHistoryDO vodPlayHistoryDO); HashSet<Long> testPlays(VodPlayHistoryDO vodPlayHistoryDO);
} }
...@@ -37,10 +37,12 @@ public class ActivityDetectionServiceImpl extends ServiceImpl<ActivityDetectionM ...@@ -37,10 +37,12 @@ public class ActivityDetectionServiceImpl extends ServiceImpl<ActivityDetectionM
activityDetectionDO.setMemberId(verifyDTO.getMemberId()); activityDetectionDO.setMemberId(verifyDTO.getMemberId());
activityDetectionDO.setRequestId(resp.getRequestId()); activityDetectionDO.setRequestId(resp.getRequestId());
if (resp.getCaptchaCode()==1){ if (resp.getCaptchaCode()==1){
//成功
activityDetectionDO.setStatus(1); activityDetectionDO.setStatus(1);
this.baseMapper.insert(activityDetectionDO); this.baseMapper.insert(activityDetectionDO);
return ConstantUtils.SUCCESS_VERIFY; return ConstantUtils.SUCCESS_VERIFY;
}else { }else {
//失败
activityDetectionDO.setStatus(0); activityDetectionDO.setStatus(0);
this.baseMapper.insert(activityDetectionDO); this.baseMapper.insert(activityDetectionDO);
return ConstantUtils.FAIL_VERIFY; return ConstantUtils.FAIL_VERIFY;
...@@ -48,7 +50,7 @@ public class ActivityDetectionServiceImpl extends ServiceImpl<ActivityDetectionM ...@@ -48,7 +50,7 @@ public class ActivityDetectionServiceImpl extends ServiceImpl<ActivityDetectionM
} catch (Exception e) { } catch (Exception e) {
// System.out.println(e.toString()); // System.out.println(e.toString());
} }
return null; return ConstantUtils.SUCCESS_VERIFY;
} }
public IPage<GetCheckHistoryVO> getCheckHistory(GetCheckHistoryDTO getCheckHistoryDTO){ public IPage<GetCheckHistoryVO> getCheckHistory(GetCheckHistoryDTO getCheckHistoryDTO){
......
...@@ -10,6 +10,8 @@ import com.subsidy.mapper.CategoryMapper; ...@@ -10,6 +10,8 @@ import com.subsidy.mapper.CategoryMapper;
import com.subsidy.service.CategoryService; import com.subsidy.service.CategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.catagory.GetCategoriesVO;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -26,20 +28,21 @@ import java.util.List; ...@@ -26,20 +28,21 @@ import java.util.List;
@Service @Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, CategoryDO> implements CategoryService { public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, CategoryDO> implements CategoryService {
public IPage<CategoryDO> getCategories(GetCategoriesDTO getCategoriesDTO) { public IPage<GetCategoriesVO> getCategories(GetCategoriesDTO getCategoriesDTO) {
Page pager = new Page(getCategoriesDTO.getPageNum(), getCategoriesDTO.getPageSize()); Page pager = new Page(getCategoriesDTO.getPageNum(), getCategoriesDTO.getPageSize());
if (null == getCategoriesDTO.getCompanyId()) { IPage<GetCategoriesVO> categoryDOIPage = this.baseMapper.getCategories(pager,getCategoriesDTO.getCompanyId(),getCategoriesDTO.getName());
return this.baseMapper.selectPage(pager, new QueryWrapper<CategoryDO>()
.lambda() //二级行业领域
.like(CategoryDO::getName, getCategoriesDTO.getName()) List<GetCategoriesVO> getCategoriesVOS = categoryDOIPage.getRecords();
.isNull(CategoryDO::getCompanyId)); for (GetCategoriesVO gcv : getCategoriesVOS){
} else { //找二级
return this.baseMapper.selectPage(pager, new QueryWrapper<CategoryDO>() List<CategoryDO> categoryDOS = this.baseMapper.selectList(new QueryWrapper<CategoryDO>()
.lambda() .lambda()
.like(CategoryDO::getName, getCategoriesDTO.getName()) .eq(CategoryDO::getParentId,gcv.getId()));
.eq(CategoryDO::getCompanyId, getCategoriesDTO.getCompanyId())); gcv.setCategoryDOS(categoryDOS);
} }
return categoryDOIPage;
} }
...@@ -56,48 +59,79 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, CategoryDO> ...@@ -56,48 +59,79 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, CategoryDO>
} }
} }
public String addCategory(CategoryDO categoryDO) { public String addCategory(GetCategoriesVO getCategoriesVO) {
int count; int count;
if (null == categoryDO.getCompanyId()) { if (null == getCategoriesVO.getCompanyId()) {
count = this.baseMapper.selectCount(new QueryWrapper<CategoryDO>() count = this.baseMapper.selectCount(new QueryWrapper<CategoryDO>()
.lambda() .lambda()
.like(CategoryDO::getName, categoryDO.getName()) .like(CategoryDO::getName, getCategoriesVO.getName())
.isNull(CategoryDO::getCompanyId)); .isNull(CategoryDO::getCompanyId));
} else { } else {
count = this.baseMapper.selectCount(new QueryWrapper<CategoryDO>() count = this.baseMapper.selectCount(new QueryWrapper<CategoryDO>()
.lambda() .lambda()
.like(CategoryDO::getName, categoryDO.getName()) .like(CategoryDO::getName, getCategoriesVO.getName())
.eq(CategoryDO::getCompanyId, categoryDO.getCompanyId())); .eq(CategoryDO::getCompanyId, getCategoriesVO.getCompanyId()));
} }
if (count > 0) { if (count > 0) {
throw new HttpException(90001); throw new HttpException(90001);
} }
//一级目录
CategoryDO categoryDO = new CategoryDO();
BeanUtils.copyProperties(getCategoriesVO,categoryDO);
this.baseMapper.insert(categoryDO); this.baseMapper.insert(categoryDO);
//二级目录
List<CategoryDO> categoryDOS = getCategoriesVO.getCategoryDOS();
for (CategoryDO cd : categoryDOS){
cd.setCompanyId(getCategoriesVO.getCompanyId());
cd.setParentId(categoryDO.getId());
this.baseMapper.insert(cd);
}
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
public String deleteCategory(CategoryDO categoryDO) { public String deleteCategory(CategoryDO categoryDO) {
this.baseMapper.deleteById(categoryDO.getId()); this.baseMapper.deleteById(categoryDO.getId());
this.baseMapper.delete(new QueryWrapper<CategoryDO>()
.lambda()
.eq(CategoryDO::getParentId,categoryDO.getId()));
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
public String updateCategory(CategoryDO categoryDO) { public String updateCategory(GetCategoriesVO getCategoriesVO) {
int count = this.baseMapper.selectCount(new QueryWrapper<CategoryDO>() int count = this.baseMapper.selectCount(new QueryWrapper<CategoryDO>()
.lambda() .lambda()
.eq(CategoryDO::getName, categoryDO.getName()) .eq(CategoryDO::getName, getCategoriesVO.getName())
.eq(CategoryDO::getCompanyId, categoryDO.getCompanyId()) .eq(CategoryDO::getCompanyId, getCategoriesVO.getCompanyId())
.ne(CategoryDO::getId, categoryDO.getId())); .ne(CategoryDO::getId, getCategoriesVO.getId()));
if (count > 0) { if (count > 0) {
throw new HttpException(90001); throw new HttpException(90001);
} }
CategoryDO categoryDO = new CategoryDO();
BeanUtils.copyProperties(getCategoriesVO,categoryDO);
this.baseMapper.updateById(categoryDO); this.baseMapper.updateById(categoryDO);
CategoryDO categoryDO1 = this.baseMapper.selectById(categoryDO.getId());
if (getCategoriesVO.getCategoryDOS().size()>0){
this.baseMapper.delete(new QueryWrapper<CategoryDO>()
.lambda()
.eq(CategoryDO::getParentId,getCategoriesVO.getId()));
List<CategoryDO> categoryDOS = getCategoriesVO.getCategoryDOS();
for (CategoryDO cd: categoryDOS){
cd.setParentId(getCategoriesVO.getId());
cd.setCompanyId(categoryDO1.getCompanyId());
this.baseMapper.insert(cd);
}
}
return ConstantUtils.SET_SUCCESS; return ConstantUtils.SET_SUCCESS;
} }
......
...@@ -279,13 +279,22 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -279,13 +279,22 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
return ConstantUtils.SET_SUCCESS; return ConstantUtils.SET_SUCCESS;
} }
public String updateCompanySettings(CompanyDictDO companyDictDO) {
this.baseMapper.updateById(companyDictDO);
return ConstantUtils.SET_SUCCESS;
}
public CompanyDictDO getCompanyInfo(CompanyDictDO companyDictDO) {
return this.baseMapper.selectById(companyDictDO.getId());
}
public List<GetAllCompanyVO> getAllCompany(CompanyDictDO companyDictDO) { public List<GetAllCompanyVO> getAllCompany(CompanyDictDO companyDictDO) {
return this.baseMapper.getAllCompany(companyDictDO); return this.baseMapper.getAllCompany(companyDictDO);
} }
public IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) { public IPage<GetCompanyMembersVO> getCompanyMembers(GetCompanyMembersDTO getCompanyMembersDTO) {
Page pager = new Page(getCompanyMembersDTO.getPageNum(), getCompanyMembersDTO.getPageSize()); Page pager = new Page(getCompanyMembersDTO.getPageNum(), getCompanyMembersDTO.getPageSize());
return this.baseMapper.getCompanyMembers(pager,getCompanyMembersDTO.getCompanyId(),getCompanyMembersDTO.getUserName()); return this.baseMapper.getCompanyMembers(pager, getCompanyMembersDTO.getCompanyId(), getCompanyMembersDTO.getUserName());
} }
@Override @Override
...@@ -343,18 +352,18 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -343,18 +352,18 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
//总数 //总数
Integer total = memberMapper.selectCount(new QueryWrapper<MemberDO>() Integer total = memberMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda() .lambda()
.eq(MemberDO::getCompanyId,getCompanyMembersDTO.getCompanyId())); .eq(MemberDO::getCompanyId, getCompanyMembersDTO.getCompanyId()));
memberSummaryVO.setTotal(total); memberSummaryVO.setTotal(total);
//短信验证 //短信验证
Integer smsCnt = memberMapper.selectCount(new QueryWrapper<MemberDO>() Integer smsCnt = memberMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda() .lambda()
.eq(MemberDO::getCompanyId,getCompanyMembersDTO.getCompanyId()) .eq(MemberDO::getCompanyId, getCompanyMembersDTO.getCompanyId())
.isNull(MemberDO::getFirstLogin)); .isNull(MemberDO::getFirstLogin));
memberSummaryVO.setSmsCnt(smsCnt); memberSummaryVO.setSmsCnt(smsCnt);
memberSummaryVO.setImgCnt(total-smsCnt); memberSummaryVO.setImgCnt(total - smsCnt);
return memberSummaryVO; return memberSummaryVO;
} }
......
...@@ -21,6 +21,7 @@ import com.subsidy.model.VodDictDO; ...@@ -21,6 +21,7 @@ import com.subsidy.model.VodDictDO;
import com.subsidy.service.SignInRecordService; import com.subsidy.service.SignInRecordService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import com.subsidy.util.DateFormatUtil; import com.subsidy.util.DateFormatUtil;
import com.subsidy.util.IpAddressUtil;
import com.subsidy.vo.member.GetMemberSignInfoVO; import com.subsidy.vo.member.GetMemberSignInfoVO;
import com.subsidy.vo.sign.DataViewVO; import com.subsidy.vo.sign.DataViewVO;
import com.subsidy.vo.sign.SignInStatusVO; import com.subsidy.vo.sign.SignInStatusVO;
...@@ -73,6 +74,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig ...@@ -73,6 +74,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
return this.baseMapper.selectPage(pager, new QueryWrapper<SignInRecordDO>() return this.baseMapper.selectPage(pager, new QueryWrapper<SignInRecordDO>()
.lambda() .lambda()
.eq(SignInRecordDO::getMemberId, getMemberSignInfoDTO.getId()) .eq(SignInRecordDO::getMemberId, getMemberSignInfoDTO.getId())
.eq(SignInRecordDO::getClassId,getMemberSignInfoDTO.getClassId())
.orderByDesc(SignInRecordDO::getCreateDate)); .orderByDesc(SignInRecordDO::getCreateDate));
} }
...@@ -99,12 +101,12 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig ...@@ -99,12 +101,12 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
this.baseMapper.deleteById(sign.getId()); this.baseMapper.deleteById(sign.getId());
} }
// signInRecordDO.setIpAddress(IpAddressUtil.getIpAddress());
signInRecordDO.setClassId(classDictDO.getId()); signInRecordDO.setClassId(classDictDO.getId());
signInRecordDO.setSignInDate(LocalDateTime.now()); signInRecordDO.setSignInDate(LocalDateTime.now());
signInRecordDO.setCreateDate(LocalDateTime.now()); signInRecordDO.setCreateDate(LocalDateTime.now());
this.baseMapper.insert(signInRecordDO); this.baseMapper.insert(signInRecordDO);
} }
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
......
...@@ -8,7 +8,7 @@ public class ExcelFormatUtils { ...@@ -8,7 +8,7 @@ public class ExcelFormatUtils {
public static final List<String> memberList = Arrays.asList("序号", "成员名称","身份证号码", "性别", "账号", "联系方式", "签到次数", "课程进度", "学习时长(小时)","学习时长(分钟)", "答疑数", "测试成绩", "总评价"); public static final List<String> memberList = Arrays.asList("序号", "成员名称","身份证号码", "性别", "账号", "联系方式", "签到次数", "课程进度", "学习时长(小时)","学习时长(分钟)", "答疑数", "测试成绩", "总评价");
public static final List<String> signList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "学习时长(小时)","学习时长(分钟)", "课程进度", "完成率", "签到次数", "签到日期"); public static final List<String> signList = Arrays.asList("序号", "成员名称", "身份证号", "联系方式", "签到次数", "签到时间","最近签到ip地址","最近签到设备型号");
public static final List<String> scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数", "总评价"); public static final List<String> scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数", "总评价");
......
...@@ -6,6 +6,9 @@ import java.net.UnknownHostException; ...@@ -6,6 +6,9 @@ import java.net.UnknownHostException;
public class IpAddressUtil { public class IpAddressUtil {
/**
* 返回客户端ip
*/
public static String getIpAddress(HttpServletRequest request) { public static String getIpAddress(HttpServletRequest request) {
String ipAddress = request.getHeader("x-forwarded-for"); String ipAddress = request.getHeader("x-forwarded-for");
if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
......
...@@ -313,51 +313,78 @@ public class ExcelUtil { ...@@ -313,51 +313,78 @@ public class ExcelUtil {
return dataList; return dataList;
} }
public static <T> void writeExcel(List<Long> memberIds, HashMap<Long, HashMap<String, Integer>> hashMap, List<String> dates) { /**
* 导出excel文件
* @param list
* @param cls
* @param <T>
*/
public static <T> void writeExcel(List<T> list, Class cls) {
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = servletRequestAttributes.getResponse(); HttpServletResponse response = servletRequestAttributes.getResponse();
Field[] fields = cls.getDeclaredFields();
List<Field> fieldList = Arrays.stream(fields).filter(field -> {
ExcelColumn annotation = field.getAnnotation(ExcelColumn.class);
if(annotation != null) {
field.setAccessible(true);
return true;
}
return false;
}).sorted(Comparator.comparing(field -> {
int col = 0;
ExcelColumn annotation = field.getAnnotation(ExcelColumn.class);
if(annotation != null) {
col = annotation.col();
}
return col;
})).collect(Collectors.toList());
Workbook wb = new XSSFWorkbook(); Workbook wb = new XSSFWorkbook();
Sheet sheet = wb.createSheet(); Sheet sheet = wb.createSheet();
AtomicInteger ai = new AtomicInteger(); AtomicInteger ai = new AtomicInteger();
{
Row row = sheet.createRow(ai.getAndIncrement()); Row row = sheet.createRow(ai.getAndIncrement());
AtomicInteger at = new AtomicInteger(); AtomicInteger at = new AtomicInteger();
dates.forEach(field -> { fieldList.forEach(field -> {
Cell cell = row.createCell(at.getAndIncrement()); ExcelColumn annotation = field.getAnnotation(ExcelColumn.class);
CellStyle cellStyle = wb.createCellStyle(); String columnName = "";
cellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); if (annotation != null) {
Font font = wb.createFont(); columnName = annotation.value();
font.setBoldweight(Font.BOLDWEIGHT_BOLD); }
cellStyle.setFont(font); Cell cell = row.createCell(at.getAndIncrement());
cell.setCellStyle(cellStyle);
cell.setCellValue(field);
});
if (hashMap != null) {
memberIds.forEach(data -> {
Row r = sheet.createRow(ai.getAndIncrement());
AtomicInteger a = new AtomicInteger();
Cell cell = r.createCell(at.getAndIncrement());
CellStyle cellStyle = wb.createCellStyle(); CellStyle cellStyle = wb.createCellStyle();
cellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); cellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex());
Font font = wb.createFont();
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
cellStyle.setFont(font);
cell.setCellStyle(cellStyle); cell.setCellStyle(cellStyle);
HashMap<String, Integer> hashMap1 = hashMap.get(data); cell.setCellValue(columnName);
dates.forEach(field -> {
System.out.println(data + "========");
System.out.println(field);
Cell cell1 = r.createCell(a.getAndIncrement());
if (null != hashMap1) {
cell1.setCellValue(null == hashMap1.get(field) ? 0 : hashMap1.get(field));
} else {
cell1.setCellValue(0);
}
});
}); });
}
String fileName = String.valueOf(new Date().getTime());
buildExcelDocument(fileName + "." + EXCEL2007, wb, response);
if (list != null) {
list.forEach(data -> {
Row r = sheet.createRow(ai.getAndIncrement());
AtomicInteger a = new AtomicInteger();
fieldList.forEach(field -> {
try {
Class<?> type = field.getType();
Object value = field.get(data);
Cell cell = r.createCell(a.getAndIncrement());
if (value != null) {
cell.setCellValue(value.toString());
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
});
});
for (int i = 0; i < list.size(); i++) {
sheet.autoSizeColumn(i);
}
}
String fileName = String.valueOf(new Date().getTime());
buildExcelDocument(fileName + "." + EXCEL2007, wb, response);
}
} }
public static <T> void writeMemberExcel(String companyName, String studyDate, String courseName, String title, List<ClassDetailVO> list, List<String> headerList) throws Exception { public static <T> void writeMemberExcel(String companyName, String studyDate, String courseName, String title, List<ClassDetailVO> list, List<String> headerList) throws Exception {
...@@ -697,7 +724,7 @@ public class ExcelUtil { ...@@ -697,7 +724,7 @@ public class ExcelUtil {
sheet.addMergedRegion(cellRangeAddress21); sheet.addMergedRegion(cellRangeAddress21);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress21, sheet, workbook); //给合并过的单元格加边框 setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress21, sheet, workbook); //给合并过的单元格加边框
CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 4, 9); CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 4, 7);
sheet.addMergedRegion(cellRangeAddress22); sheet.addMergedRegion(cellRangeAddress22);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框 setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框
...@@ -713,7 +740,7 @@ public class ExcelUtil { ...@@ -713,7 +740,7 @@ public class ExcelUtil {
sheet.addMergedRegion(cellRangeAddress31); sheet.addMergedRegion(cellRangeAddress31);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框 setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框
CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 4, 9); CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 4, 7);
sheet.addMergedRegion(cellRangeAddress32); sheet.addMergedRegion(cellRangeAddress32);
setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框 setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框
thirdRow.createCell(0).setCellValue(thirdHead[0]); thirdRow.createCell(0).setCellValue(thirdHead[0]);
...@@ -765,28 +792,19 @@ public class ExcelUtil { ...@@ -765,28 +792,19 @@ public class ExcelUtil {
newCell = dataRow.createCell(4); newCell = dataRow.createCell(4);
newCell.setCellStyle(cellStyle); newCell.setCellStyle(cellStyle);
newCell.setCellValue(classSignVO.getTrainingLengthStr()); newCell.setCellValue(classSignVO.getSignCounts());
newCell = dataRow.createCell(5); newCell = dataRow.createCell(5);
newCell.setCellStyle(cellStyle); newCell.setCellStyle(cellStyle);
newCell.setCellValue(classSignVO.getTrainingLengthMinute()); newCell.setCellValue(classSignVO.getSignInDateList());
newCell = dataRow.createCell(6); newCell = dataRow.createCell(6);
newCell.setCellStyle(cellStyle); newCell.setCellStyle(cellStyle);
newCell.setCellValue(classSignVO.getClassProcess()); newCell.setCellValue(classSignVO.getIpAddress());
newCell = dataRow.createCell(7); newCell = dataRow.createCell(7);
newCell.setCellStyle(cellStyle); newCell.setCellStyle(cellStyle);
newCell.setCellValue(classSignVO.getPercent()); newCell.setCellValue(classSignVO.getDeviceNo());
newCell = dataRow.createCell(8);
newCell.setCellStyle(cellStyle);
newCell.setCellValue(classSignVO.getSignCounts());
newCell = dataRow.createCell(9);
newCell.setCellStyle(cellStyle);
newCell.setCellValue(classSignVO.getSignInDateList());
rowIndex++; rowIndex++;
seq++; seq++;
......
...@@ -4,4 +4,19 @@ import lombok.Data; ...@@ -4,4 +4,19 @@ import lombok.Data;
@Data @Data
public class ImageCheckDetailVO { public class ImageCheckDetailVO {
private Long id;
private String userName;
private String accountName;
private String telephone;
private String idCard;
private String cnt;
private String recentDate;
} }
package com.subsidy.vo.administer; package com.subsidy.vo.administer;
import com.subsidy.util.excel.ExcelColumn;
import lombok.Data; import lombok.Data;
@Data @Data
...@@ -7,14 +8,28 @@ public class ManageMemberVO { ...@@ -7,14 +8,28 @@ public class ManageMemberVO {
private Long id; private Long id;
@ExcelColumn(col = 1,value = "用户名称")
private String userName; private String userName;
@ExcelColumn(col = 2,value = "手机号")
private String telephone; private String telephone;
@ExcelColumn(col = 3,value = "身份证号")
private String idCard; private String idCard;
@ExcelColumn(col = 4,value = "所属企业")
private String companyName; private String companyName;
private String accountName; private String accountName;
private String checkImage;
private String checkTime;
private Integer firstLogin;
private String smsCheck;
private String imageCheckStatus;
} }
package com.subsidy.vo.catagory;
import com.subsidy.model.CategoryDO;
import lombok.Data;
import java.util.List;
@Data
public class GetCategoriesVO extends CategoryDO {
private List<CategoryDO> categoryDOS;
}
package com.subsidy.vo.image;
import com.subsidy.model.ImageCheckRecordDO;
import lombok.Data;
@Data
public class CheckImageResultVO extends ImageCheckRecordDO {
private Boolean result;
}
package com.subsidy.vo.image;
import lombok.Data;
@Data
public class GetMemberCheckDetailVO {
private Long id;
private String occurredTime;
private String photo;
private Double similarity;
private String result;
}
...@@ -27,25 +27,14 @@ public class ClassSignVO { ...@@ -27,25 +27,14 @@ public class ClassSignVO {
private String signInDateList; private String signInDateList;
/** /**
* 培训时长 * ip地址
*/ */
private Integer trainingLength; private String ipAddress;
@ExcelColumn(col = 4,value = "培训时长(小时)")
private String trainingLengthStr;
@ExcelColumn(col = 5,value = "培训时长(分钟)")
private String trainingLengthMinute;
@ExcelColumn(col = 6,value = "课程进度")
private String classProcess;
/** /**
* 完成率 * 最近设型号
*/ */
@ExcelColumn(col = 7,value = "完成率") private String deviceNo;
private String percent;
......
...@@ -4,4 +4,14 @@ import lombok.Data; ...@@ -4,4 +4,14 @@ import lombok.Data;
@Data @Data
public class GetMemberSignInfoVO { public class GetMemberSignInfoVO {
private Long id;
private String ipAddress;
private String deviceNo;
private String signInDate;
} }
...@@ -68,4 +68,7 @@ meishu.code-message[16001]=该条件已存在 ...@@ -68,4 +68,7 @@ meishu.code-message[16001]=该条件已存在
meishu.code-message[17001]=系统不支持00:00:00~06:00:00学习 meishu.code-message[17001]=系统不支持00:00:00~06:00:00学习
meishu.code-message[18001]=已超过当日验证次数上线
...@@ -30,4 +30,23 @@ ...@@ -30,4 +30,23 @@
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t.course_id = #{courseId} and t.course_id = #{courseId}
</select> </select>
<select id="getCategories" resultType="com.subsidy.vo.catagory.GetCategoriesVO">
SELECT
*
FROM
category t
WHERE
t.delete_date IS NULL
AND t.parent_id IS NULL
<if test="name !=null and name != ''">
AND t.`name` like concat('%',#{name} ,'%')
</if>
<if test="companyId != null and companyId != ''">
and t.company_id = #{companyId}
</if>
<if test="companyId == null">
and t.company_id is null
</if>
</select>
</mapper> </mapper>
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
<result column="update_date" property="updateDate" /> <result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" /> <result column="delete_date" property="deleteDate" />
<result column="class_id" property="classId" /> <result column="class_id" property="classId" />
<result column="paper_id" property="paperId" />
<result column="request_id" property="requestId" />
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
...@@ -21,4 +19,18 @@ ...@@ -21,4 +19,18 @@
id, class_id, paper_id, request_id id, class_id, paper_id, request_id
</sql> </sql>
<select id="getMemberCheckDetail" resultType="com.subsidy.vo.image.GetMemberCheckDetailVO">
SELECT
t.id,
t.occurred_time,
t.photo,
t.similarity
FROM
image_check_record t
WHERE
t.delete_date IS NULL
AND t.class_id = #{classId}
AND t.member_id = #{memberId}
</select>
</mapper> </mapper>
...@@ -270,7 +270,10 @@ ...@@ -270,7 +270,10 @@
t.telephone, t.telephone,
t.id_card, t.id_card,
t.account_name, t.account_name,
t2.company_name t2.company_name,
t.check_image,
t.check_time,
t.first_login
FROM FROM
member t member t
LEFT JOIN company_dict t2 ON t.company_id = t2.id LEFT JOIN company_dict t2 ON t.company_id = t2.id
...@@ -325,6 +328,6 @@ ...@@ -325,6 +328,6 @@
</select> </select>
<update id="removeCheckImage" parameterType="long"> <update id="removeCheckImage" parameterType="long">
update member set check_image = nulll where id = #{id} update member set check_image = null,check_time = null where id = #{id}
</update> </update>
</mapper> </mapper>
...@@ -105,7 +105,10 @@ ...@@ -105,7 +105,10 @@
create_date create_date
FROM FROM
vod_play_history t vod_play_history t
where t.member_id = #{memberId} where
t.delete_date is null
and t.member_id = #{memberId}
and t.class_id =#{classId}
ORDER BY ORDER BY
t.member_id, t.member_id,
start_date start_date
......
# 此处为本项目src所在路径(代码生成器输出路径) # 此处为本项目src所在路径(代码生成器输出路径)
outputDir=/src/main/java outputDir=/src/main/java
author=DengMin author=Tuyp
# 父的包名 # 父的包名
setParent=com.subsidy setParent=com.subsidy
# mapper.xml文件生成路径 # mapper.xml文件生成路径
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!