+ * JobFactory实例 + *
+ * + * @author DengMin + * @since 2020/12/9 + */ +@Component +public class JobFactory extends AdaptableJobFactory { + + private AutowireCapableBeanFactory factory; + + public JobFactory(AutowireCapableBeanFactory factory) { + this.factory = factory; + } + + @Override + protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception { + Object job = super.createJobInstance(bundle); + factory.autowireBean(job); + return job; + } +} diff --git a/src/main/java/com/subsidy/common/configure/QXueYouConfig.java b/src/main/java/com/subsidy/common/configure/QXueYouConfig.java new file mode 100644 index 0000000..0bf6873 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/QXueYouConfig.java @@ -0,0 +1,18 @@ +package com.subsidy.common.configure; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Data +@Configuration +@ConfigurationProperties(prefix = "qxueyou") +public class QXueYouConfig { + + private String appId; + + private String securityKey; + + private String url; + +} diff --git a/src/main/java/com/subsidy/common/configure/QuartzConfig.java b/src/main/java/com/subsidy/common/configure/QuartzConfig.java new file mode 100644 index 0000000..b9c9a33 --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/QuartzConfig.java @@ -0,0 +1,46 @@ +package com.subsidy.common.configure; + +import org.quartz.Scheduler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; + +import javax.sql.DataSource; + +/** + *+ * Quartz配置 + *
+ * + * @author DengMin + * @since 2020/12/8 + */ +@Configuration +public class QuartzConfig { + + @Autowired + private JobFactory jobFactory; + + @Autowired + private DataSource dataSource; + + @Bean + public SchedulerFactoryBean schedulerFactoryBean() { + SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean(); + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setStartupDelay(60); + schedulerFactoryBean.setJobFactory(jobFactory); + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setStartupDelay(1); + schedulerFactoryBean.setDataSource(dataSource); + schedulerFactoryBean.setConfigLocation(new ClassPathResource("/application-quartz.properties")); + return schedulerFactoryBean; + } + + @Bean + public Scheduler scheduler() { + return schedulerFactoryBean().getScheduler(); + } +} diff --git a/src/main/java/com/subsidy/common/configure/RedisConfig.java b/src/main/java/com/subsidy/common/configure/RedisConfig.java new file mode 100644 index 0000000..63cf2de --- /dev/null +++ b/src/main/java/com/subsidy/common/configure/RedisConfig.java @@ -0,0 +1,122 @@ +package com.subsidy.common.configure; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.HashOperations; +import org.springframework.data.redis.core.ListOperations; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.SetOperations; +import org.springframework.data.redis.core.ValueOperations; +import org.springframework.data.redis.core.ZSetOperations; +import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +@EnableCaching + +/** + *+ * Redis + *
+ * + * @author DengMin + * @since 2020/12/14 + */ +@Configuration +public class RedisConfig extends CachingConfigurerSupport { + + /** + * retemplate相关配置 + * @param factory + * @return + */ + @Bean + public RedisTemplate+ * WebSocket 配置 + *
+ * + * @author DengMin + * @since 2022/7/13 + */ + +@Configuration +@EnableWebSocket +public class WebSocketConfig implements WebSocketConfigurer { + + @Autowired + private WebSocketUtil webSocketUtil; + + @Autowired + private WebSocketInterceptor webSocketInterceptor; + + @Override + public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { + registry + .addHandler(webSocketUtil, "socket") + .addInterceptors(webSocketInterceptor) // 自定义验证规则 + .setAllowedOrigins("*"); + } +} \ No newline at end of file diff --git a/src/main/java/com/subsidy/common/configure/WechatConfig.java b/src/main/java/com/subsidy/common/configure/WechatConfig.java index 46e2034..050e82b 100644 --- a/src/main/java/com/subsidy/common/configure/WechatConfig.java +++ b/src/main/java/com/subsidy/common/configure/WechatConfig.java @@ -14,11 +14,11 @@ public class WechatConfig { private String appSecret; - private String msgUrl; - - private String templateId; - - private String agentId; + //private String msgUrl; + // + //private String templateId; + // + //private String agentId; } diff --git a/src/main/java/com/subsidy/common/constant/Code.java b/src/main/java/com/subsidy/common/constant/Code.java index d4a02f9..fbe57a0 100644 --- a/src/main/java/com/subsidy/common/constant/Code.java +++ b/src/main/java/com/subsidy/common/constant/Code.java @@ -15,7 +15,7 @@ public enum Code { NOHANDLERFOUND(1008,"找不到相应的视图处理器"), PARAM_INVALID(1009, "参数不合法"), TOKEN_EXCEPTION(1010, "无效的令牌"), - TOKEN_EXPIRED(1011, "令牌已过期"), + TOKEN_EXPIRED(1011, "当前账户已在其他设备登录"), TOKEN_VERIFICATION_FAILED(1013, "令牌验证失败"), OSS_ERROR(1012, "OSS文件上传异常"), Network_ERROR(9000, "网络请求失败"), diff --git a/src/main/java/com/subsidy/common/constant/CourseNotification.java b/src/main/java/com/subsidy/common/constant/CourseNotification.java new file mode 100644 index 0000000..0111f35 --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/CourseNotification.java @@ -0,0 +1,8 @@ +package com.subsidy.common.constant; + +public class CourseNotification { + + public static final String UNSENT = "待发送"; + + public static final String SENT = "已发送"; +} diff --git a/src/main/java/com/subsidy/common/constant/SmsCode.java b/src/main/java/com/subsidy/common/constant/SmsCode.java new file mode 100644 index 0000000..aef2eb2 --- /dev/null +++ b/src/main/java/com/subsidy/common/constant/SmsCode.java @@ -0,0 +1,23 @@ +package com.subsidy.common.constant; + +import lombok.Getter; + +@Getter +public enum SmsCode { + + SIGN_IN("SMS_234409992", "签到通知"), + TEST("SMS_234414789", "测试通知"), + CLASS_START("SMS_228137810", "开课通知"), + ALL("SMS_228137810", "全部成员"), + NOT_SIGNED_IN("SMS_234409992","未签到成员"), + UNFINISHED("SMS_234414789","未完课成员"); + + private String type; + + private String code; + + SmsCode(String code, String type) { + this.code = code; + this.type = type; + } +} diff --git a/src/main/java/com/subsidy/common/exception/GlobalExceptionHandler.java b/src/main/java/com/subsidy/common/exception/GlobalExceptionHandler.java index 5f8117b..2e535e9 100644 --- a/src/main/java/com/subsidy/common/exception/GlobalExceptionHandler.java +++ b/src/main/java/com/subsidy/common/exception/GlobalExceptionHandler.java @@ -111,8 +111,9 @@ public class GlobalExceptionHandler { @ExceptionHandler(value = Exception.class) public ResponseVO+ * WebSocket握手拦截器 + *
+ * + * @author DengMin + * @since 2022/7/14 + */ +@Component +public class WebSocketInterceptor implements HandshakeInterceptor { + + @Autowired + private MemberMapper memberMapper; + + /** + * 自定义验证规则, 如果该用户不存在数据表中,拒绝此次连接 + * @param request + * @param serverHttpResponse + * @param webSocketHandler + * @param map + * @return + * @throws Exception + */ + @Override + public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse serverHttpResponse, WebSocketHandler webSocketHandler, Map+ * 前端控制器 + *
+ * + * @author DengMin + * @since 2022-02-18 + */ +@RestController +@Api(tags = "微信") +@RequestMapping("/wechat") +public class AccessTokenController { + + @Autowired + private RestTemplateConfig restTemplateConfig; + + @Autowired + private WechatConfig wechatConfig; + + @Autowired + private AccessTokenMapper accessTokenMapper; + + @PostMapping("/getJsapiTicket") + @ApiOperation("通过token请求获得jsapi_ticket {url}") + public ResponseVO getJsapiTicket(@RequestBody SignVO signVO) { + + List+ * 活跃度检测表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-07-13 + */ +@RestController +@Api(tags = "活跃度检测表") +@RequestMapping("/activityDetection") +public class ActivityDetectionController { + + @Autowired + private ActivityDetectionService activityDetectionService; + + @PostMapping("verify") + @ApiOperation("验证滑块 ticket randStr memberId classId") + @TimeRequired + public ResponseVO verify(@RequestBody VerifyDTO verifyDTO, HttpServletRequest request){ + return ResponseData.generateCreatedResponse(0,activityDetectionService.verify(verifyDTO,request)); + } + + @PostMapping("getCheckHistory") + @ApiOperation("获取某个人某个课程的活跃度验证详情 memberId classId") + public ResponseVO getCheckHistory(@RequestBody ActivityDetectionDO activityDetectionDO){ + return ResponseData.generateCreatedResponse(0,activityDetectionService.getCheckHistory(activityDetectionDO)); + } + + + + +} diff --git a/src/main/java/com/subsidy/controller/AdministerController.java b/src/main/java/com/subsidy/controller/AdministerController.java index 4077c35..bad6784 100644 --- a/src/main/java/com/subsidy/controller/AdministerController.java +++ b/src/main/java/com/subsidy/controller/AdministerController.java @@ -4,29 +4,27 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; -import com.subsidy.dto.administer.ClassDetailDTO; -import com.subsidy.dto.administer.OperatorsDTO; +import com.subsidy.dto.administer.*; import com.subsidy.model.AdministerDO; -import com.subsidy.model.ClassDictDO; +import com.subsidy.model.ExerciseDoneHistoryDO; +import com.subsidy.model.ExerciseDoneResultDO; +import com.subsidy.model.MemberDO; import com.subsidy.service.AdministerService; import com.subsidy.util.ConstantUtils; -import com.subsidy.util.excel.ExcelUtil; -import com.subsidy.vo.administer.ExerciseTestVO; -import com.subsidy.vo.classdict.ClassDetailVO; -import com.subsidy.vo.member.ClassSignVO; -import com.subsidy.vo.sign.AnswerRecordVO; -import com.subsidy.vo.sign.ClassSignInfoVO; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletResponse; import java.net.InetAddress; -import java.util.Arrays; -import java.util.List; /** *@@ -44,12 +42,11 @@ public class AdministerController { @Autowired private AdministerService administerService; - @GetMapping("getIp") - public String getIp()throws Exception{ - InetAddress addr = InetAddress.getLocalHost(); - System.out.println("Local HostAddress:"+addr.getHostAddress()); - return addr.getHostAddress(); - } +// @GetMapping("getIp") +// public String getIp()throws Exception{ +// InetAddress addr = InetAddress.getLocalHost(); +// return addr.getHostAddress(); +// } @PostMapping("/login") @ApiOperation("登录接口 accountName password") @@ -59,116 +56,210 @@ public class AdministerController { @PostMapping("/getPermissions") @ApiOperation("权限查询") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO getPermissions() { return ResponseData.generateCreatedResponse(0, administerService.getPermissions()); } @PostMapping("/administers") @ApiOperation("查询所有运营者 { userName pageNum pageSize }") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) +// @LoginRequired public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){ return ResponseData.generateCreatedResponse(0,administerService.operators(operatorsDTO)); } @PostMapping("addAdminister") @ApiOperation("添加运营者 id userName 名称 accountName 账号 ") + @LoginRequired public ResponseVO addAdminister(@RequestBody AdministerDO administerDO){ return ResponseData.generateCreatedResponse(0,administerService.addAdminister(administerDO)); } @PostMapping("deleteAdminister") @ApiOperation("添加运营者 id ") + @LoginRequired public ResponseVO deleteAdminister(@RequestBody AdministerDO administerDO){ return ResponseData.generateCreatedResponse(0,administerService.deleteAdminister(administerDO)); } @PostMapping("updateAdminister") @ApiOperation("编辑运营者 id userName 名称 accountName 账号 password") + @LoginRequired public ResponseVO updateAdminister(@RequestBody AdministerDO administerDO){ return ResponseData.generateCreatedResponse(0,administerService.updateAdminister(administerDO)); } - @PostMapping("classSummary") - @ApiOperation("课程汇总 id 班级id ") - //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("班级详情--数据概览 id 班级id ") + @LoginRequired public ResponseVO classSummary(@RequestBody ClassDetailDTO classDetailDTO){ return ResponseData.generateCreatedResponse(0,administerService.classSummary(classDetailDTO)); } @PostMapping("classDetail") - @ApiOperation("班级管理--班级成员 id 班级id userName") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("班级管理--班级成员 id 班级id userName pageSize pageNum") + @LoginRequired public ResponseVO classDetail(@RequestBody ClassDetailDTO classDetailDTO){ return ResponseData.generateCreatedResponse(0,administerService.classDetail(classDetailDTO)); } @PostMapping("exportClassDetail") @ApiOperation("班级管理--班级成员--导出 id 班级id userName") - //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public void exportClassDetail(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{ classDetailDTO.setFlag(true); administerService.exportClassDetail(classDetailDTO); } @PostMapping("signDetail") - @ApiOperation("班级管理--注册签到 id 班级id userName") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("班级管理--注册签到 id 班级id userName pageSize pageNum") + @LoginRequired public ResponseVO signDetail(@RequestBody ClassDetailDTO classDetailDTO){ return ResponseData.generateCreatedResponse(0,administerService.signDetail(classDetailDTO)); } @PostMapping("exportSignDetail") @ApiOperation("班级管理--注册签到 id 班级id userName") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public void exportSignDetail(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{ classDetailDTO.setFlag(true); administerService.exportSignDetail(classDetailDTO); } @PostMapping("exerciseTest") - @ApiOperation("班级管理--测评成绩 id 班级id userName") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("班级管理--测评成绩 id 班级id userName paperId pageSize pageNum") + @LoginRequired public ResponseVO exerciseTest(@RequestBody ClassDetailDTO classDetailDTO){ return ResponseData.generateCreatedResponse(0,administerService.exerciseTest(classDetailDTO)); } @PostMapping("exportExerciseTest") - @ApiOperation("班级管理--测评成绩 id 班级id userName") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("班级管理--测评成绩 id 班级id userName paperId") + @LoginRequired public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{ classDetailDTO.setFlag(true); administerService.exportExerciseTest(classDetailDTO); } + @PostMapping("getMemberPapers") + @ApiOperation("获取某个成员某个卷子的做题历史 memberId paperId") + @LoginRequired + public ResponseVO getMemberPapers(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO){ + return ResponseData.generateCreatedResponse(0,administerService.getMemberPapers(exerciseDoneResultDO)); + } + + @PostMapping("getPaperDetail") + @ApiOperation("获取某个卷子做题详情 doneId getMemberPapers接口返回id memberId成员id") + @LoginRequired + public ResponseVO getPaperDetail(@RequestBody ExerciseDoneHistoryDO exerciseDoneHistoryDO){ + return ResponseData.generateCreatedResponse(0,administerService.getPaperDetail(exerciseDoneHistoryDO)); + } + @PostMapping("answerRecord") @ApiOperation("班级管理--答疑 id 班级id userName") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO answerRecord(@RequestBody ClassDetailDTO classDetailDTO){ return ResponseData.generateCreatedResponse(0,administerService.answerRecord(classDetailDTO)); } @PostMapping("exportAnswerRecord") @ApiOperation("班级管理--答疑 id 班级id userName") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public void exportAnswerRecord(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{ classDetailDTO.setFlag(true); administerService.exportAnswerRecord(classDetailDTO); } + @PostMapping("classVodInfo") + @ApiOperation("学习记录---课件进度提醒 {courseId 课程id classId 班级id vodName视频名称}") + @LoginRequired + public ResponseVO classVodInfo(@RequestBody ClassVodInfoDTO classVodInfoDTO){ + return ResponseData.generateCreatedResponse(0,administerService.classVodInfo(classVodInfoDTO)); + } + + @PostMapping("classDailyInfo") + @ApiOperation("学习记录---每日学习时长 {courseId 课程id classId 班级id userName startDate endDate}") + @LoginRequired + public ResponseVO classDailyInfo(@RequestBody ClassDailyInfoDTO classDailyInfoDTO){ + return ResponseData.generateCreatedResponse(0,administerService.classDailyInfo(classDailyInfoDTO)); + } + + @PostMapping("exportClassDailyInfo") + @ApiParam("每日学习日志") + @LoginRequired + public void exportVodInfo(@RequestBody ClassDailyInfoDTO classDailyInfoDTO){ + administerService.exportClassDailyInfo(classDailyInfoDTO); + } + + @PostMapping("classVodDailyInfo") + @ApiOperation("学习记录---每日学习时长(视频维度)") + @LoginRequired + public ResponseVO classVodDailyInfo(@RequestBody ClassVodDailyInfoDTO classVodDailyInfoDTO ){ + return ResponseData.generateCreatedResponse(0,administerService.classVodDailyInfo(classVodDailyInfoDTO)); + } + + @PostMapping("exportClassVodDailyInfo") + @ApiOperation("学习记录---每日学习时长(视频维度) pageSize pageNum userName classId") + @LoginRequired + public void exportClassVodDailyInfo(@RequestBody ClassVodDailyInfoDTO classVodDailyInfoDTO ){ + administerService.exportClassVodDailyInfo(classVodDailyInfoDTO); + } + + @PostMapping("memberStudy") + @ApiOperation("学员学习日志 pageSize pageNum classId memberId") + @LoginRequired + public ResponseVO memberStudy(@RequestBody MemberStudyLogDTO memberStudyLogDTO){ + return ResponseData.generateCreatedResponse(0,administerService.memberStudy(memberStudyLogDTO)); + } + + @PostMapping("memberDetectionRecord") + @ApiOperation("获取某个班级活跃度检测记录 id userName pageSize pageNum ") + @LoginRequired + public ResponseVO memberDetectionRecord(@RequestBody ClassDetailDTO classDetailDTO ){ + return ResponseData.generateCreatedResponse(0,administerService.memberDetectionRecord(classDetailDTO)); + } + + @PostMapping("exportMemberDetectionRecord") + @ApiOperation("获取某个班级活跃度检测记录 id userName ") + @LoginRequired + public void exportMemberDetectionRecord(@RequestBody ClassDetailDTO classDetailDTO ){ + administerService.exportMemberDetectionRecord(classDetailDTO); + } + + @PostMapping("imageCheckDetail") + @ApiOperation("实名制验证详情 id 班级id userName pageSize pageNum") + @LoginRequired + public ResponseVO imageCheckDetail(@RequestBody ClassDetailDTO classDetailDTO){ + return ResponseData.generateCreatedResponse(0,administerService.imageCheckDetail(classDetailDTO)); + } + + @PostMapping("exportZip") @ApiOperation("下载压缩包 id 班级id") @CrossOrigin - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public void exportZip(@RequestBody ClassDetailDTO classDetailDTO)throws Exception{ administerService.export(classDetailDTO); } + @PostMapping("memberStudyLog") + @ApiOperation("学员学习日志 classId memberId") + @LoginRequired + public void memberStudyLog(@RequestBody MemberStudyLogDTO memberStudyLogDTO) throws Exception{ + administerService.memberStudyLog(memberStudyLogDTO); + } + @PostMapping("importMember") @ApiOperation("导入学生 {companyId 公司id file}") - public ResponseVO importMember(Long companyId,@RequestParam("file") MultipartFile file){ + @LoginRequired + public ResponseVO importMember(Long companyId,@RequestParam("file") MultipartFile file)throws Exception{ return ResponseData.generateCreatedResponse(0,administerService.importMember(companyId,file)); } + @PostMapping("manageMember") + @ApiOperation("用户管理 {pageSize pageNum userName:名字 【废弃】}") + @LoginRequired + public ResponseVO manageMember(@RequestBody ManageMemberDTO manageMemberDTO){ + return ResponseData.generateCreatedResponse(0,administerService.manageMember(manageMemberDTO)); + } } diff --git a/src/main/java/com/subsidy/controller/AnsweringQuestionController.java b/src/main/java/com/subsidy/controller/AnsweringQuestionController.java index 79f70ef..65b8ca9 100644 --- a/src/main/java/com/subsidy/controller/AnsweringQuestionController.java +++ b/src/main/java/com/subsidy/controller/AnsweringQuestionController.java @@ -3,14 +3,17 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; -import com.subsidy.dto.GetCourseQuestionDTO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.course.GetCourseQuestionDTO; import com.subsidy.model.AnsweringQuestionDO; import com.subsidy.service.AnsweringQuestionService; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** *
@@ -29,29 +32,39 @@ public class AnsweringQuestionController { private AnsweringQuestionService answeringQuestionService; @PostMapping("getCourseQuestion") - @ApiOperation("获取某个课程的答疑 {classId pageSize pageNum memberId}") + @ApiOperation(" 获取某个课程的答疑 {classId pageSize pageNum memberId}") + @LoginRequired public ResponseVO getCourseQuestion(@RequestBody GetCourseQuestionDTO getCourseQuestionDTO){ return ResponseData.generateCreatedResponse(0,answeringQuestionService.getCourseQuestion(getCourseQuestionDTO)); } @PostMapping("addQuestion") @ApiOperation("新增答疑 {classId askId title}") + @LoginRequired public ResponseVO addQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){ return ResponseData.generateCreatedResponse(0,answeringQuestionService.addQuestion(answeringQuestionDO)); } @PostMapping("deleteQuestion") - @ApiOperation("删除答疑 {id}") + @ApiOperation(" 删除答疑 {id}") + @LoginRequired public ResponseVO deleteQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){ return ResponseData.generateCreatedResponse(0,answeringQuestionService.deleteQuestion(answeringQuestionDO)); } @PostMapping("updateQuestion") @ApiOperation("编辑答疑 {id answerId answer}") + @LoginRequired public ResponseVO updateQuestion(@RequestBody AnsweringQuestionDO answeringQuestionDO){ return ResponseData.generateCreatedResponse(0, answeringQuestionService.updateQuestion(answeringQuestionDO)); } + @PostMapping("getNoAnswers") + @ApiOperation("获取某个课程没有回答的答疑个数 classId 课程id") + @LoginRequired + public ResponseVO getNoAnswers(@RequestBody AnsweringQuestionDO answeringQuestionDO){ + return ResponseData.generateCreatedResponse(0,answeringQuestionService.getNoAnswers(answeringQuestionDO)); + } } diff --git a/src/main/java/com/subsidy/controller/BusinessScopeDictController.java b/src/main/java/com/subsidy/controller/BusinessScopeDictController.java new file mode 100644 index 0000000..244b9c2 --- /dev/null +++ b/src/main/java/com/subsidy/controller/BusinessScopeDictController.java @@ -0,0 +1,64 @@ +package com.subsidy.controller; + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.businessScope.BusinessScopeDTO; +import com.subsidy.model.BusinessScopeDictDO; +import com.subsidy.service.BusinessScopeDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *
+ * 经营范围表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-07-25 + */ +@RestController +@Api(tags = "经营范围表") +@RequestMapping("/businessScopeDict") +public class BusinessScopeDictController { + + @Autowired + private BusinessScopeDictService businessScopeDictService; + + @PostMapping("addBusinessScope") + @ApiOperation("添加经营范围:businessScopeName/经营范围名称") + @LoginRequired + public ResponseVO addBusinessScope(@RequestBody BusinessScopeDictDO businessScopeDictDO) { + businessScopeDictService.save(businessScopeDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("updateBusinessScope") + @ApiOperation("修改经营范围:id/ID、businessScopeName/经营范围名称") + @LoginRequired + public ResponseVO updateBusinessScope(@RequestBody BusinessScopeDictDO businessScopeDictDO) { + businessScopeDictService.updateById(businessScopeDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("deleteBusinessScope") + @ApiOperation("删除经营范围:id/ID") + @LoginRequired + public ResponseVO deleteBusinessScope(@RequestBody BusinessScopeDictDO businessScopeDictDO) { + businessScopeDictService.removeById(businessScopeDictDO.getId()); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("queryBusinessScopePage") + @ApiOperation("分页查询经营范围:businessScopeName/经营范围名称、pageNum/当前页数、pageSize/每页显示条数") + @LoginRequired + public ResponseVO queryBusinessScopePage(@RequestBody BusinessScopeDTO businessScopeDictDO) { + return ResponseData.generateCreatedResponse(0, businessScopeDictService.queryBusinessScopePage(businessScopeDictDO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/CategoryController.java b/src/main/java/com/subsidy/controller/CategoryController.java index 494576a..87ee8b9 100644 --- a/src/main/java/com/subsidy/controller/CategoryController.java +++ b/src/main/java/com/subsidy/controller/CategoryController.java @@ -8,14 +8,13 @@ import com.subsidy.dto.category.GetCategoriesDTO; import com.subsidy.model.CategoryDO; import com.subsidy.service.CategoryService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -34,38 +33,37 @@ public class CategoryController { private CategoryService categoryService; @PostMapping("getCategories") - @ApiOperation("查询类目 ** name 类目名称 companyId pageSize pageNum") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("查询类目 name 类目名称 companyId pageSize pageNum") + @LoginRequired public ResponseVO getCategories(@RequestBody GetCategoriesDTO getCategoriesDTO){ return ResponseData.generateCreatedResponse(0,categoryService.getCategories(getCategoriesDTO)); } @PostMapping("getAll") - @ApiOperation("查询所有类目 **companyId") + @ApiOperation("查询所有类目 companyId") public ResponseVO getAll(@RequestBody GetCategoriesDTO getCategoriesDTO){ return ResponseData.generateCreatedResponse(0,categoryService.getAll(getCategoriesDTO)); } @PostMapping("addCategory") - @ApiOperation("新增类目 **name companyId") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("新增类目 name companyId") + @LoginRequired public ResponseVO addCategory(@RequestBody CategoryDO categoryDO){ return ResponseData.generateCreatedResponse(0,categoryService.addCategory(categoryDO)); } @PostMapping("deleteCategory") @ApiOperation("删除类目 id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO deleteCategory(@RequestBody CategoryDO categoryDO){ return ResponseData.generateCreatedResponse(0,categoryService.deleteCategory(categoryDO)); } @PostMapping("updateCategory") - @ApiOperation("修改类目 ** id name companyId") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("修改类目 id name companyId") + @LoginRequired public ResponseVO updateCategory(@RequestBody CategoryDO categoryDO){ return ResponseData.generateCreatedResponse(0,categoryService.updateCategory(categoryDO)); } - } diff --git a/src/main/java/com/subsidy/controller/CertCompanyMappingController.java b/src/main/java/com/subsidy/controller/CertCompanyMappingController.java new file mode 100644 index 0000000..286998f --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertCompanyMappingController.java @@ -0,0 +1,53 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.dto.cert.ChangeCompanyCertsDTO; +import com.subsidy.dto.cert.GetCompanyCertsDTO; +import com.subsidy.dto.cert.GetCompanyCertsWithStatusDTO; +import com.subsidy.service.CertCompanyMappingService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import io.swagger.annotations.Api; + +/** + *
+ * 证书-公司映射表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-05-11 + */ +@RestController +@Api(tags = "证书-公司映射表") +@RequestMapping("/certCompanyMapping") +public class CertCompanyMappingController { + + @Autowired + private CertCompanyMappingService certCompanyMappingService; + + @PostMapping("getCompanyCertsWithStatus") + @ApiOperation("获取某个公司的项目证书(返回学生报名状态) companyId 公司id typeId 类型id(查全部传空) memberId 学生id") + public ResponseVO getCompanyCertsWithStatus(@RequestBody GetCompanyCertsWithStatusDTO getCompanyCertsDTO){ + return ResponseData.generateCreatedResponse(0,certCompanyMappingService.getCompanyCertsWithStatus(getCompanyCertsDTO)); + } + + @PostMapping("getCompanyCerts") + @ApiOperation("获取某个公司的证书情况 companyId pageSize pageNum") + public ResponseVO getCompanyCerts(@RequestBody GetCompanyCertsDTO getCompanyCertsDTO){ + return ResponseData.generateCreatedResponse(0,certCompanyMappingService.getCompanyCerts(getCompanyCertsDTO)); + } + + @PostMapping("changeCompanyCerts") + @ApiOperation("开启/关闭权限 companyId certId signStatus") + public ResponseVO changeCompanyCerts(@RequestBody ChangeCompanyCertsDTO changeCompanyCertsDTO){ + return ResponseData.generateCreatedResponse(0,certCompanyMappingService.changeCompanyCerts(changeCompanyCertsDTO)); + } + + + + +} diff --git a/src/main/java/com/subsidy/controller/CertDictController.java b/src/main/java/com/subsidy/controller/CertDictController.java new file mode 100644 index 0000000..5f85275 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertDictController.java @@ -0,0 +1,72 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.dto.cert.AddCertDTO; +import com.subsidy.dto.cert.GetAllCertsDTO; +import com.subsidy.dto.cert.GetOneCertDTO; +import com.subsidy.model.CertDictDO; +import com.subsidy.service.CertDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 证书字典表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-05-11 + */ +@RestController +@Api(tags = "证书字典表") +@RequestMapping("/certDict") +public class CertDictController { + + @Autowired + private CertDictService certDictService; + + @PostMapping("addCert") + @ApiOperation("添加证书 certName price coverPage title副标题 scribePrice 划线价格 certDesc 证书简介 detail chargeAndSubsidy 学费和补贴 serviceProcess服务流程 refundGuarantee 退费流程 typeIds[] 类型id requirementDesc 条件说明 submitDesc 提交说明") + public ResponseVO addCert(@RequestBody AddCertDTO addCertDTO){ + return ResponseData.generateCreatedResponse(0,certDictService.addCert(addCertDTO)); + } + + @PostMapping("deleteCert") + @ApiOperation("删除证书 id ") + public ResponseVO deleteCert(@RequestBody CertDictDO certDictDO){ + return ResponseData.generateCreatedResponse(0,certDictService.deleteCert(certDictDO)); + } + + @PostMapping("updateCert") + @ApiOperation("编辑证书 id certName price coverPage title副标题 scribePrice 划线价格 划线价格 detail chargeAndSubsidy 学费和补贴 serviceProcess服务流程 refundGuarantee 退费流程 typeId 类型id requirementDesc 条件说明 submitDesc 提交说明") + public ResponseVO updateCert(@RequestBody AddCertDTO addCertDTO){ + return ResponseData.generateCreatedResponse(0,certDictService.updateCert(addCertDTO)); + } + + @PostMapping("getOneCert") + @ApiOperation("获取一个证书 id userId") + public ResponseVO getOneCert(@RequestBody GetOneCertDTO getOneCertDTO){ + return ResponseData.generateCreatedResponse(0,certDictService.getOneCert(getOneCertDTO)); + } + + @PostMapping("getAllCerts") + @ApiOperation("获取全部的证书(包含项目类型) typeId certName pageSize pageNum ") + public ResponseVO getAllCerts(@RequestBody GetAllCertsDTO getAllCertsDTO){ + return ResponseData.generateCreatedResponse(0,certDictService.getAllCerts(getAllCertsDTO)); + } + + @PostMapping("getAllCertsWithoutType") + @ApiOperation("获取所有证书(下拉列表用)") + public ResponseVO getAllCertsWithoutType(){ + return ResponseData.generateCreatedResponse(0,certDictService.getAllCertsWithoutType()); + } + +} diff --git a/src/main/java/com/subsidy/controller/CertMemberFileMappingController.java b/src/main/java/com/subsidy/controller/CertMemberFileMappingController.java new file mode 100644 index 0000000..e566ab4 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertMemberFileMappingController.java @@ -0,0 +1,26 @@ +package com.subsidy.controller; + + +import com.subsidy.service.CertMemberFileMappingService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 前端控制器 + *
+ * + * @author DengMin + * @since 2022-05-11 + */ +@RestController +@Api(tags = "学生报名材料 映射表") +@RequestMapping("/certMemberFileMapping") +public class CertMemberFileMappingController { + + +} diff --git a/src/main/java/com/subsidy/controller/CertMemberMappingController.java b/src/main/java/com/subsidy/controller/CertMemberMappingController.java new file mode 100644 index 0000000..0dfaf18 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertMemberMappingController.java @@ -0,0 +1,67 @@ +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.model.CertMemberMappingDO; +import com.subsidy.service.CertMemberMappingService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 学生报名证书表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-05-11 + */ +@RestController +@Api(tags = "学生报名证书表") +@RequestMapping("/certMemberMapping") +public class CertMemberMappingController { + + @Autowired + private CertMemberMappingService certMemberMappingService; + + @PostMapping("signUp") + @ApiOperation("报名 certId memberId files[fileName fileUrl requirementId] ") + public ResponseVO signUp(@RequestBody SignUpDTO signUpDTO){ + return ResponseData.generateCreatedResponse(0,certMemberMappingService.signUp(signUpDTO)); + } + + @PostMapping("signManagement") + @ApiOperation("报名管理 typeId 类目id certId 证书id startDate 开始时间 endDate 结束时间 item 搜索字段 pageSize pageNum") + public ResponseVO signManagement(@RequestBody SignManagementDTO signManagementDTO){ + return ResponseData.generateCreatedResponse(0,certMemberMappingService.signManagement(signManagementDTO)); + } + + @PostMapping("changeStatus") + @ApiOperation("编辑订单状态 id status") + public ResponseVO changeStatus(@RequestBody CertMemberMappingDO certMemberMappingDO){ + return ResponseData.generateCreatedResponse(0,certMemberMappingService.changeStatus(certMemberMappingDO)); + } + + @PostMapping("getList") + @ApiOperation("手机端---获取全部订单 memberId status pageSize pageNum") + @TimeRequired + public ResponseVO getList(@RequestBody GetListDTO getListDTO){ + return ResponseData.generateCreatedResponse(0,certMemberMappingService.getList(getListDTO)); + } + + @PostMapping("getSignInfo") + @ApiOperation("获取某人某个证书报名信息 memberId certId ") + public ResponseVO getSignInfo(@RequestBody CertMemberMappingDO certMemberMappingDO){ + return ResponseData.generateCreatedResponse(0,certMemberMappingService.getSignInfo(certMemberMappingDO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/CertRequirementController.java b/src/main/java/com/subsidy/controller/CertRequirementController.java new file mode 100644 index 0000000..929e538 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertRequirementController.java @@ -0,0 +1,59 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.model.CertDictDO; +import com.subsidy.model.CertRequirementDO; +import com.subsidy.service.CertRequirementService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 报名条件表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-05-12 + */ +@RestController +@Api(tags = "报名条件表") +@RequestMapping("/certRequirement") +public class CertRequirementController { + + + @Autowired + private CertRequirementService certRequirementService; + + @PostMapping("getRequirements") + @ApiOperation("获取证书报名条件 certId") + public ResponseVO getRequirements(@RequestBody CertRequirementDO certRequirementDO){ + return ResponseData.generateCreatedResponse(0,certRequirementService.getRequirements(certRequirementDO)); + } + + @PostMapping("deleteRequirement") + @ApiOperation("删除条件 id") + public ResponseVO deleteRequirement(@RequestBody CertRequirementDO certRequirementDO){ + return ResponseData.generateCreatedResponse(0,certRequirementService.deleteRequirement(certRequirementDO)); + } + + @PostMapping("addRequirement") + @ApiOperation("添加条件 certId certRequirement status:true 必填 false 非必填") + public ResponseVO addRequirement(@RequestBody CertRequirementDO certRequirementDO){ + return ResponseData.generateCreatedResponse(0,certRequirementService.addRequirement(certRequirementDO)); + } + + @PostMapping("updateRequirement") + @ApiOperation("编辑条件 id certId certRequirement status:true 必填 false 非必填") + public ResponseVO updateRequirement(@RequestBody CertRequirementDO certRequirementDO){ + return ResponseData.generateCreatedResponse(0,certRequirementService.updateRequirement(certRequirementDO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/CertTypeDictController.java b/src/main/java/com/subsidy/controller/CertTypeDictController.java new file mode 100644 index 0000000..d2255c4 --- /dev/null +++ b/src/main/java/com/subsidy/controller/CertTypeDictController.java @@ -0,0 +1,65 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.dto.cert.GetAllTypeDTO; +import com.subsidy.mapper.CertTypeDictMapper; +import com.subsidy.model.CertCompanyMappingDO; +import com.subsidy.model.CertRequirementDO; +import com.subsidy.model.CertTypeDictDO; +import com.subsidy.service.CertTypeDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import io.swagger.annotations.Api; + +/** + *+ * 证书类目字典表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-05-11 + */ +@RestController +@Api(tags = "证书类目字典表") +@RequestMapping("/certTypeDict") +public class CertTypeDictController { + + @Autowired + private CertTypeDictService certTypeDictService; + + @PostMapping("getCompanyCertTypes") + @ApiOperation("(手机端)获取某个公司所有的证书类型 companyId") + public ResponseVO getCompanyCertTypes(@RequestBody CertCompanyMappingDO certCompanyMappingDO){ + return ResponseData.generateCreatedResponse(0,certTypeDictService.getCompanyCertTypes(certCompanyMappingDO)); + } + + @PostMapping("addType") + @ApiOperation("添加类型 typeName ") + public ResponseVO addType(@RequestBody CertTypeDictDO certTypeDictDO){ + return ResponseData.generateCreatedResponse(0,certTypeDictService.addType(certTypeDictDO)); + } + + @PostMapping("deleteType") + @ApiOperation("删除类型 id ") + public ResponseVO deleteType(@RequestBody CertTypeDictDO certTypeDictDO){ + return ResponseData.generateCreatedResponse(0,certTypeDictService.deleteType(certTypeDictDO)); + } + + @PostMapping("updateType") + @ApiOperation("修改类型 id typeName") + public ResponseVO updateType(@RequestBody CertTypeDictDO certTypeDictDO){ + return ResponseData.generateCreatedResponse(0,certTypeDictService.updateType(certTypeDictDO)); + } + + @PostMapping("getAllType") + @ApiOperation("获取所有类型 pageSize pageNum") + public ResponseVO getAllType(@RequestBody GetAllTypeDTO getAllTypeDTO){ + return ResponseData.generateCreatedResponse(0,certTypeDictService.getAllType(getAllTypeDTO)); + } + + +} diff --git a/src/main/java/com/subsidy/controller/ClassMemberMappingController.java b/src/main/java/com/subsidy/controller/CertTypeMappingController.java similarity index 70% rename from src/main/java/com/subsidy/controller/ClassMemberMappingController.java rename to src/main/java/com/subsidy/controller/CertTypeMappingController.java index ec9096f..03b3196 100644 --- a/src/main/java/com/subsidy/controller/ClassMemberMappingController.java +++ b/src/main/java/com/subsidy/controller/CertTypeMappingController.java @@ -8,15 +8,18 @@ import io.swagger.annotations.Api; /** *- * 班级成员映射表 前端控制器 + * 证书-类型映射表 前端控制器 *
* * @author DengMin - * @since 2021-10-12 + * @since 2022-05-11 */ @RestController -@Api(tags = "班级成员映射表") -@RequestMapping("/class-member-mapping-do") -public class ClassMemberMappingController { +@Api(tags = "证书-类型映射表") +@RequestMapping("/certTypeMapping") +public class CertTypeMappingController { + + + } diff --git a/src/main/java/com/subsidy/controller/ClassDictController.java b/src/main/java/com/subsidy/controller/ClassDictController.java index ba15b88..7cc6d6f 100644 --- a/src/main/java/com/subsidy/controller/ClassDictController.java +++ b/src/main/java/com/subsidy/controller/ClassDictController.java @@ -4,23 +4,22 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.classDict.AddClassDTO; import com.subsidy.dto.classDict.AddMemberToClassDTO; -import com.subsidy.dto.classDict.GetAllClassesDTO; +import com.subsidy.dto.classDict.GetClassBaseInfoDTO; import com.subsidy.dto.classDict.GetSpareMembersDTO; import com.subsidy.model.ClassDictDO; import com.subsidy.model.ClassMemberMappingDO; -import com.subsidy.model.CourseDictDO; import com.subsidy.service.ClassDictService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -39,67 +38,73 @@ public class ClassDictController { private ClassDictService classDictService; @PostMapping("getAllClasses") - @ApiOperation("获取某老师下的所有课程 ** companyId 所选企业id className 班级名称") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO getAllClasses(@RequestBody ClassDictDO classDictDO){ + @ApiOperation("获取某公司下的所有班级 companyId 所选企业id className 班级名称 openStatus 开放状态 startDate 开始时间 endDate 结束时间") + @LoginRequired + public ResponseVO getAllClasses(@RequestBody ClassDictDO classDictDO)throws Exception{ return ResponseData.generateCreatedResponse(0,classDictService.getAllClasses(classDictDO)); } @PostMapping("deleteClasses") - @ApiOperation("删除课程 id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation(" 删除班级 id") + @LoginRequired public ResponseVO deleteClasses(@RequestBody ClassDictDO classDictDO){ return ResponseData.generateCreatedResponse(0,classDictService.deleteClasses(classDictDO)); } @PostMapping("addClass") - @ApiOperation("添加课程 ** userId:登录人id companyId courseId className startDate endDate") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("添加班级 userId:登录人id companyId courseId classTypeId className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]") + @LoginRequired public ResponseVO addClass(@RequestBody AddClassDTO addClassDTO){ return ResponseData.generateCreatedResponse(0,classDictService.addClass(addClassDTO)); } @PostMapping("updateClass") - @ApiOperation("修改课程 id ** companyId courseId className startDate endDate") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("修改班级 id companyId className classTypeId startDate endDate") + @LoginRequired public ResponseVO updateClass(@RequestBody ClassDictDO classDictDO){ return ResponseData.generateCreatedResponse(0,classDictService.updateClass(classDictDO)); } @PostMapping("classDetail") @ApiOperation("获取一个班级详情 id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO classDetail(@RequestBody ClassDictDO classDictDO){ return ResponseData.generateCreatedResponse(0,classDictService.classDetail(classDictDO)); } @PostMapping("removeMember") @ApiOperation("移除班级 classId 班级id memberId人员id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO removeMember(@RequestBody ClassMemberMappingDO classMemberMappingDO){ return ResponseData.generateCreatedResponse(0,classDictService.removeMember(classMemberMappingDO)); } @PostMapping("getSpareMembers") - @ApiOperation("获取不在某班级的某企业里所有成员 ** companyId 企业id classId 班级id") - //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("获取不在某班级的某企业里所有成员 companyId 企业id classId 班级id") + @LoginRequired public ResponseVO getSpareMembers(@RequestBody GetSpareMembersDTO getSpareMembersDTO){ return ResponseData.generateCreatedResponse(0,classDictService.getSpareMembers(getSpareMembersDTO)); } @PostMapping("addMemberToClass") - @ApiOperation("将某个成员加入到某个班级里 classId memberIds []") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("将多个成员加入到某个班级里 classId memberIds []") + @LoginRequired public ResponseVO addMemberToClass(@RequestBody AddMemberToClassDTO addMemberToClassDTO){ return ResponseData.generateCreatedResponse(0,classDictService.addMemberToClass(addMemberToClassDTO)); } - @PostMapping("batchSms") - @ApiOperation("批量发送班级短信 {id 班级id}") + @ApiOperation(" 批量发送班级短信通知 {id 班级id }") + @LoginRequired public ResponseVO batchSms(@RequestBody ClassDictDO classDictDO){ return ResponseData.generateCreatedResponse(0,classDictService.batchSms(classDictDO)); } - + @PostMapping("getClassBaseInfo") + @ApiOperation("班级详情--获取课程基本信息 id") + @LoginRequired + @TimeRequired + public ResponseVO getClassBaseInfo(@RequestBody GetClassBaseInfoDTO getClassBaseInfoDTO){ + return ResponseData.generateCreatedResponse(0,classDictService.getClassBaseInfo(getClassBaseInfoDTO)); + } } diff --git a/src/main/java/com/subsidy/controller/ClassHourDictController.java b/src/main/java/com/subsidy/controller/ClassHourDictController.java index cdb8982..c228d7f 100644 --- a/src/main/java/com/subsidy/controller/ClassHourDictController.java +++ b/src/main/java/com/subsidy/controller/ClassHourDictController.java @@ -4,15 +4,19 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.model.ClassHourDictDO; import com.subsidy.model.VodPlayHistoryDO; import com.subsidy.service.ClassHourDictService; import com.subsidy.util.ConstantUtils; +import com.subsidy.vo.classdict.GetSettingVO; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** *
@@ -32,23 +36,26 @@ public class ClassHourDictController { @PostMapping("getSetting") @ApiOperation("查看当天设置的最大学习时长 companyId") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO getSetting(@RequestBody ClassHourDictDO classHourDictDO){ return ResponseData.generateCreatedResponse(0,classHourDictService.getSetting(classHourDictDO)); } @PostMapping("updateSetting") - @ApiOperation("修改当天设置时长 id 主键 classHour status") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO updateSetting(@RequestBody ClassHourDictDO classHourDictDO){ - return ResponseData.generateCreatedResponse(0,classHourDictService.updateSetting(classHourDictDO)); + @ApiOperation("修改当天设置时长 companyId 主键 logo classHour status interrupt interruptStatus repeatTime repeatStatus rotationImgDictDOS[companyId rotationImg]") + @LoginRequired + public ResponseVO updateSetting(@RequestBody GetSettingVO getSettingVO){ + return ResponseData.generateCreatedResponse(0,classHourDictService.updateSetting(getSettingVO)); } @PostMapping("pollingGet") @ApiOperation("轮询查询当前这个人当天有没有超过最长时长 memberId playLength") + @LoginRequired + @TimeRequired public ResponseVO pollingGet(@RequestBody VodPlayHistoryDO vodPlayHistoryDO){ return ResponseData.generateCreatedResponse(0,classHourDictService.pollingGet(vodPlayHistoryDO)); } + } diff --git a/src/main/java/com/subsidy/controller/ClassNoticeController.java b/src/main/java/com/subsidy/controller/ClassNoticeController.java new file mode 100644 index 0000000..ae46912 --- /dev/null +++ b/src/main/java/com/subsidy/controller/ClassNoticeController.java @@ -0,0 +1,70 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.classNotice.SendNotificationDTO; +import com.subsidy.model.ClassNoticeDO; +import com.subsidy.service.ClassNoticeService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *
+ * 前端控制器 + *
+ * + * @author DengMin + * @since 2022-01-21 + */ +@RestController +@Api(tags = "课程通知") +@RequestMapping("/classNotice") +public class ClassNoticeController { + + @Autowired + private ClassNoticeService classNoticeService; + + @PostMapping("addNotice") + @ApiOperation("新增一个通知 classId noticeType isAuto noticeTime") + @LoginRequired + public ResponseVO addNotice(@RequestBody ClassNoticeDO classNoticeDO){ + return ResponseData.generateCreatedResponse(0,classNoticeService.addNotice(classNoticeDO)); + } + + @PostMapping("updateNotice") + @ApiOperation("修改一个通知 id noticeType isAuto noticeTime") + @LoginRequired + public ResponseVO updateNotice(@RequestBody ClassNoticeDO classNoticeDO){ + return ResponseData.generateCreatedResponse(0,classNoticeService.updateNotice(classNoticeDO)); + } + + @PostMapping("deleteNotice") + @ApiOperation("删除一个通知 id") + @LoginRequired + public ResponseVO deleteNotice(@RequestBody ClassNoticeDO classNoticeDO){ + return ResponseData.generateCreatedResponse(0,classNoticeService.deleteNotice(classNoticeDO)); + } + + @PostMapping("queryClassNotices") + @ApiOperation("查看某个课程的通知提醒 classId 课程id status 状态(待发送/已发送)") + @LoginRequired + public ResponseVO queryClassNotices(@RequestBody ClassNoticeDO classNoticeDO){ + return ResponseData.generateCreatedResponse(0,classNoticeService.queryClassNotices(classNoticeDO)); + } + + @PostMapping("sendClassNotices") + @ApiOperation("发送通知:classId/课程Id sendType/发送类型(全部成员/未签到成员/未完课成员)") + @LoginRequired + public ResponseVO sendClassNotices(@RequestBody SendNotificationDTO sendNotificationDTO) { + classNoticeService.sendNotification(sendNotificationDTO); + return ResponseData.generateCreatedResponse(0); + } +} diff --git a/src/main/java/com/subsidy/controller/ClassTypeDictController.java b/src/main/java/com/subsidy/controller/ClassTypeDictController.java new file mode 100644 index 0000000..7d24892 --- /dev/null +++ b/src/main/java/com/subsidy/controller/ClassTypeDictController.java @@ -0,0 +1,63 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.classDict.ClassTypeDTO; +import com.subsidy.model.ClassTypeDictDO; +import com.subsidy.service.ClassTypeDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 班级类型字典表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-01-21 + */ +@RestController +@Api(tags = "班级类型字典表") +@RequestMapping("/classType") +public class ClassTypeDictController { + + @Autowired + private ClassTypeDictService classTypeDictService; + + @PostMapping("addClassType") + @ApiOperation("添加课程类型 companyId 运营者公司id不传 classType") + @LoginRequired + public ResponseVO addClassType(@RequestBody ClassTypeDictDO classTypeDictDO){ + return ResponseData.generateCreatedResponse(0,classTypeDictService.addClassType(classTypeDictDO)); + } + + @PostMapping("updateClassType") + @ApiOperation("修改课程类型 id companyId classType") + @LoginRequired + public ResponseVO updateClassType(@RequestBody ClassTypeDictDO classTypeDictDO){ + return ResponseData.generateCreatedResponse(0,classTypeDictService.updateClassType(classTypeDictDO)); + } + + @PostMapping("deleteClassType") + @ApiOperation("删除课程类型 id") + @LoginRequired + public ResponseVO deleteClassType(@RequestBody ClassTypeDictDO classTypeDictDO){ + return ResponseData.generateCreatedResponse(0,classTypeDictService.deleteClassType(classTypeDictDO)); + } + + @PostMapping("queryClassTypes") + @ApiOperation("查询某个公司的班级类型 userId 登录人id companyId") + @LoginRequired + public ResponseVO queryClassTypes(@RequestBody ClassTypeDTO classTypeDTO){ + return ResponseData.generateCreatedResponse(0,classTypeDictService.queryClassTypes(classTypeDTO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/CompanyDictController.java b/src/main/java/com/subsidy/controller/CompanyDictController.java index 49e7a97..edace0a 100644 --- a/src/main/java/com/subsidy/controller/CompanyDictController.java +++ b/src/main/java/com/subsidy/controller/CompanyDictController.java @@ -6,18 +6,18 @@ import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.dto.administer.OperatorsDTO; import com.subsidy.dto.company.AddCompanyDTO; -import com.subsidy.model.AdministerDO; +import com.subsidy.dto.company.GetCompanyMembersDTO; import com.subsidy.model.CompanyDictDO; +import com.subsidy.model.MemberDO; import com.subsidy.service.CompanyDictService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -36,31 +36,45 @@ public class CompanyDictController { private CompanyDictService companyDictService; @PostMapping("/administers") - @ApiOperation("查询所有企业 {id companyName pageNum pageSize }") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("查询所有企业 {id companyName fieldId 行业id superviseName 监管第三方名称 pageNum pageSize }") + @LoginRequired public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){ return ResponseData.generateCreatedResponse(0,companyDictService.operators(operatorsDTO)); } @PostMapping("addCompany") - @ApiOperation("添加企业 {accountName:账号 companyName:企业名称 shortName 简称 banner:标语 field:领域 role 1:超级管理员 2:普通成员}") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("添加企业 {accountName:账号 superviseName 第三方监管名称 companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员}") + @LoginRequired public ResponseVO addOperator(@RequestBody AddCompanyDTO addCompanyDTO){ return ResponseData.generateCreatedResponse(0,companyDictService.addOperator(addCompanyDTO)); } @PostMapping("deleteCompany") @ApiOperation("删除企业 id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO deleteAdminister(@RequestBody CompanyDictDO companyDictDO){ return ResponseData.generateCreatedResponse(0,companyDictService.deleteAdminister(companyDictDO)); } @PostMapping("updateCompany") - @ApiOperation("修改企业 id accountName:账号 companyName:企业名称 shortName 简称 banner:标语 field:领域 role 1:超级管理员 2:普通成员") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("修改企业 id superviseName 第三方监管名称 accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员") + @LoginRequired public ResponseVO updateAdminister(@RequestBody AddCompanyDTO addCompanyDTO){ return ResponseData.generateCreatedResponse(0,companyDictService.updateAdminister(addCompanyDTO)); } + @PostMapping("getAllCompany") + @ApiOperation("获取全部企业 {companyName}") + @LoginRequired + public ResponseVO getAllCompany(@RequestBody CompanyDictDO companyDictDO){ + return ResponseData.generateCreatedResponse(0,companyDictService.getAllCompany(companyDictDO)); + } + + @PostMapping("getCompanyMembers") + @ApiOperation("获取公司里的成员 pageNum pageSize companyId 公司id userName 成员名称") + @LoginRequired + public ResponseVO getCompanyMembers(@RequestBody GetCompanyMembersDTO getCompanyMembersDTO){ + return ResponseData.generateCreatedResponse(0,companyDictService.getCompanyMembers(getCompanyMembersDTO)); + } + } diff --git a/src/main/java/com/subsidy/controller/RoleAdministerMappingController.java b/src/main/java/com/subsidy/controller/CompanyFieldMappingController.java similarity index 82% rename from src/main/java/com/subsidy/controller/RoleAdministerMappingController.java rename to src/main/java/com/subsidy/controller/CompanyFieldMappingController.java index bfc1119..ad109eb 100644 --- a/src/main/java/com/subsidy/controller/RoleAdministerMappingController.java +++ b/src/main/java/com/subsidy/controller/CompanyFieldMappingController.java @@ -12,11 +12,11 @@ import io.swagger.annotations.Api; *
* * @author DengMin - * @since 2021-10-11 + * @since 2022-02-11 */ @RestController @Api(tags = "") -@RequestMapping("/role-administer-mapping-do") -public class RoleAdministerMappingController { +@RequestMapping("/company-field-mapping-do") +public class CompanyFieldMappingController { } diff --git a/src/main/java/com/subsidy/controller/ContentVodMappingController.java b/src/main/java/com/subsidy/controller/ContentVodMappingController.java new file mode 100644 index 0000000..756352a --- /dev/null +++ b/src/main/java/com/subsidy/controller/ContentVodMappingController.java @@ -0,0 +1,65 @@ +package com.subsidy.controller; + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.content.GetContendVodsDTO; +import com.subsidy.dto.contentVod.AddContentVod; +import com.subsidy.dto.contentVod.ContentVodDTO; +import com.subsidy.dto.vod.ChangeOrdersDTO; +import com.subsidy.service.ContentVodMappingService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 目录视频关系表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-07-19 + */ +@RestController +@Api(tags = "目录视频关系表") +@RequestMapping("/contentVodMapping") +public class ContentVodMappingController { + + @Autowired + private ContentVodMappingService contentVodMappingService; + + @PostMapping("getContendVods") + @ApiOperation("获取课程内容下的视频 {contentId vodName}") + @LoginRequired + public ResponseVO getContendVods(@RequestBody GetContendVodsDTO getContendVodsDTO) { + return ResponseData.generateCreatedResponse(0, contentVodMappingService.getContendVods(getContendVodsDTO)); + } + + @PostMapping("changeContentVodOrders") + @ApiOperation("课程内容视频排序 contentId/内容ID vodIds [] 视频的id") + public ResponseVO changeContentVodOrders(@RequestBody ChangeOrdersDTO changeOrdersDTO ){ + contentVodMappingService.changeContentVodOrders(changeOrdersDTO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("addContentVod") + @ApiOperation("添加课程内容视频:contentId/内容ID、vodIds [] /视频ID") + @LoginRequired + public ResponseVO addContentVod(@RequestBody AddContentVod addContentVod) { + contentVodMappingService.addContentVod(addContentVod); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping("deleteContentVod") + @ApiOperation("删除课程内容下的视频: contentId/内容ID 、 vodId/视频ID") + @LoginRequired + public ResponseVO deleteContentVod(@RequestBody ContentVodDTO contentVodDTO) { + contentVodMappingService.deleteContentVod(contentVodDTO); + return ResponseData.generateCreatedResponse(0); + } + +} diff --git a/src/main/java/com/subsidy/controller/MemberDepartmentMappingController.java b/src/main/java/com/subsidy/controller/CourseCategoryMappingController.java similarity index 70% rename from src/main/java/com/subsidy/controller/MemberDepartmentMappingController.java rename to src/main/java/com/subsidy/controller/CourseCategoryMappingController.java index 640c491..a53fcce 100644 --- a/src/main/java/com/subsidy/controller/MemberDepartmentMappingController.java +++ b/src/main/java/com/subsidy/controller/CourseCategoryMappingController.java @@ -8,15 +8,15 @@ import io.swagger.annotations.Api; /** *- * 老师部门映射表 前端控制器 + * 课程类目映射 前端控制器 *
* * @author DengMin - * @since 2021-11-01 + * @since 2022-02-14 */ @RestController -@Api(tags = "老师部门映射表") -@RequestMapping("/member-department-mapping-do") -public class MemberDepartmentMappingController { +@Api(tags = "课程类目映射") +@RequestMapping("/course-category-mapping-do") +public class CourseCategoryMappingController { } diff --git a/src/main/java/com/subsidy/controller/CourseContentController.java b/src/main/java/com/subsidy/controller/CourseContentController.java index 6fc1c10..2e55786 100644 --- a/src/main/java/com/subsidy/controller/CourseContentController.java +++ b/src/main/java/com/subsidy/controller/CourseContentController.java @@ -1,21 +1,20 @@ package com.subsidy.controller; - import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.content.GetContendVodsDTO; +import com.subsidy.dto.vod.ChangeOrdersDTO; import com.subsidy.model.CourseContentDO; -import com.subsidy.model.VodDictDO; import com.subsidy.service.CourseContentService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -35,31 +34,29 @@ public class CourseContentController { @PostMapping("getContents") @ApiOperation("获取课程目录 {courseId}") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO getContents(@RequestBody CourseContentDO courseContentDO){ return ResponseData.generateCreatedResponse(0,courseContentService.getContents(courseContentDO)); } @PostMapping("deleteContent") @ApiOperation("删除一个目录 {id} ") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO deleteContent(@RequestBody CourseContentDO courseContentDO){ return ResponseData.generateCreatedResponse(0,courseContentService.deleteContent(courseContentDO)); } @PostMapping("addContent") @ApiOperation("添加一个目录 {courseId content}") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO addContent(@RequestBody CourseContentDO courseContentDO){ return ResponseData.generateCreatedResponse(0,courseContentService.addContent(courseContentDO)); } @PostMapping("updateContent") @ApiOperation("更新一个目录 {id courseId content}") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO updateContent(@RequestBody CourseContentDO courseContentDO){ return ResponseData.generateCreatedResponse(0,courseContentService.updateContent(courseContentDO)); } - - } diff --git a/src/main/java/com/subsidy/controller/CourseDictController.java b/src/main/java/com/subsidy/controller/CourseDictController.java index 570cd58..7c1751d 100644 --- a/src/main/java/com/subsidy/controller/CourseDictController.java +++ b/src/main/java/com/subsidy/controller/CourseDictController.java @@ -4,15 +4,19 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.course.AddCourseDTO; import com.subsidy.dto.course.QueryCoursesDTO; +import com.subsidy.dto.course.UpdateCoursesDTO; import com.subsidy.model.CourseDictDO; import com.subsidy.service.CourseDictService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** *
@@ -31,38 +35,46 @@ public class CourseDictController { private CourseDictService courseDictService; @PostMapping("addCourse") - @ApiOperation("添加课程 **companyId courseName categoryId courseType courseSource") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO addCourse(@RequestBody CourseDictDO courseDictDO){ - return ResponseData.generateCreatedResponse(0,courseDictService.addCourse(courseDictDO)); + @ApiOperation("添加课程 companyId courseName courseType coverPage openStatus remark fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[]") + @LoginRequired + public ResponseVO addCourse(@RequestBody AddCourseDTO addCourseDTO){ + return ResponseData.generateCreatedResponse(0,courseDictService.addCourse(addCourseDTO)); } @PostMapping("deleteCourse") @ApiOperation("删除课程 id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO deleteCourse(@RequestBody CourseDictDO courseDictDO){ return ResponseData.generateCreatedResponse(0,courseDictService.deleteCourse(courseDictDO)); } @PostMapping("queryCourses") - @ApiOperation("平台运营者--查询课程 pageSize pageNum administerId companyId courseName categoryId courseType courseSource") - //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("平台运营者--查询课程 pageSize pageNum courseName fieldId categoryId jobId rankId courseType openStatus") + @LoginRequired public ResponseVO queryCourses(@RequestBody QueryCoursesDTO queryCoursesDTO){ return ResponseData.generateCreatedResponse(0,courseDictService.queryCourses(queryCoursesDTO)); } @PostMapping("updateCourses") - @ApiOperation("编辑课程 id ** companyId courseName categoryId courseType courseSource") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO updateCourses(@RequestBody CourseDictDO courseDictDO){ - return ResponseData.generateCreatedResponse(0,courseDictService.updateCourses(courseDictDO)); + @ApiOperation("编辑课程 id courseName courseType coverPage openStatus fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[]") + @LoginRequired + public ResponseVO updateCourses(@RequestBody UpdateCoursesDTO updateCoursesDTO){ + return ResponseData.generateCreatedResponse(0,courseDictService.updateCourses(updateCoursesDTO)); } @PostMapping("queryCompanyCourse") - @ApiOperation("企业内容管理-- { ** companyId 所选企业id}") + @ApiOperation("企业内容管理-- { companyId 所选企业id pageSize pageNum courseName categoryId jobId rankId openStatus}") + @LoginRequired public ResponseVO queryCompanyCourse(@RequestBody QueryCoursesDTO queryCoursesDTO){ return ResponseData.generateCreatedResponse(0,courseDictService.queryCompanyCourse(queryCoursesDTO)); } + @PostMapping("updateOpenStatus") + @ApiOperation("修改课程开放状态 id openStatus") + @LoginRequired + public ResponseVO updateOpenStatus(@RequestBody CourseDictDO courseDictDO){ + return ResponseData.generateCreatedResponse(0,courseDictService.updateOpenStatus(courseDictDO)); + } + } diff --git a/src/main/java/com/subsidy/controller/PermissionsDictController.java b/src/main/java/com/subsidy/controller/CourseFieldMappingController.java similarity index 70% rename from src/main/java/com/subsidy/controller/PermissionsDictController.java rename to src/main/java/com/subsidy/controller/CourseFieldMappingController.java index c257813..830b0a4 100644 --- a/src/main/java/com/subsidy/controller/PermissionsDictController.java +++ b/src/main/java/com/subsidy/controller/CourseFieldMappingController.java @@ -8,15 +8,15 @@ import io.swagger.annotations.Api; /** *
- * 权限表 前端控制器 + * 前端控制器 *
* * @author DengMin - * @since 2021-10-11 + * @since 2022-01-20 */ @RestController -@Api(tags = "权限表") -@RequestMapping("/permissions-dict-do") -public class PermissionsDictController { +@Api(tags = "") +@RequestMapping("/courseField") +public class CourseFieldMappingController { } diff --git a/src/main/java/com/subsidy/controller/RoleDictController.java b/src/main/java/com/subsidy/controller/CourseJobMappingController.java similarity index 70% rename from src/main/java/com/subsidy/controller/RoleDictController.java rename to src/main/java/com/subsidy/controller/CourseJobMappingController.java index 76b225c..e059c6c 100644 --- a/src/main/java/com/subsidy/controller/RoleDictController.java +++ b/src/main/java/com/subsidy/controller/CourseJobMappingController.java @@ -8,15 +8,15 @@ import io.swagger.annotations.Api; /** *- * 角色表 前端控制器 + * 课程-岗位映射表 前端控制器 *
* * @author DengMin - * @since 2021-10-11 + * @since 2022-02-14 */ @RestController -@Api(tags = "角色表") -@RequestMapping("/role-dict-do") -public class RoleDictController { +@Api(tags = "课程-岗位映射表") +@RequestMapping("/course-job-mapping-do") +public class CourseJobMappingController { } diff --git a/src/main/java/com/subsidy/controller/RolePermissionMappingController.java b/src/main/java/com/subsidy/controller/CourseRankMappingController.java similarity index 70% rename from src/main/java/com/subsidy/controller/RolePermissionMappingController.java rename to src/main/java/com/subsidy/controller/CourseRankMappingController.java index a17f192..c6bbd5b 100644 --- a/src/main/java/com/subsidy/controller/RolePermissionMappingController.java +++ b/src/main/java/com/subsidy/controller/CourseRankMappingController.java @@ -8,15 +8,15 @@ import io.swagger.annotations.Api; /** *- * 系统用户角色表 前端控制器 + * 课程职级映射表 前端控制器 *
* * @author DengMin - * @since 2021-10-11 + * @since 2022-02-14 */ @RestController -@Api(tags = "系统用户角色表") -@RequestMapping("/role-permission-mapping-do") -public class RolePermissionMappingController { +@Api(tags = "课程职级映射表") +@RequestMapping("/course-rank-mapping-do") +public class CourseRankMappingController { } diff --git a/src/main/java/com/subsidy/controller/DepartmentDictController.java b/src/main/java/com/subsidy/controller/DepartmentDictController.java index 3958245..bb68374 100644 --- a/src/main/java/com/subsidy/controller/DepartmentDictController.java +++ b/src/main/java/com/subsidy/controller/DepartmentDictController.java @@ -4,17 +4,18 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.department.GetDepartmentMembersDTO; import com.subsidy.model.DepartmentDictDO; import com.subsidy.service.DepartmentDictService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -34,32 +35,47 @@ public class DepartmentDictController { @PostMapping("getDepartments") @ApiOperation("获取所有部门 companyId 企业id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO getDepartments(@RequestBody DepartmentDictDO departmentDictDO){ return ResponseData.generateCreatedResponse(0,departmentDictService.getDepartments(departmentDictDO)); } @PostMapping("addDepartment") - @ApiOperation("添加部门 ** companyId departmentName leaderName parentId 父节点") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("添加部门 companyId departmentName leaderName parentId 父节点") + @LoginRequired public ResponseVO addDepartment(@RequestBody DepartmentDictDO departmentDictDO){ return ResponseData.generateCreatedResponse(0,departmentDictService.addDepartment(departmentDictDO)); } @PostMapping("deleteDepartment") @ApiOperation("删除部门 id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO deleteDepartment(@RequestBody DepartmentDictDO departmentDictDO){ return ResponseData.generateCreatedResponse(0,departmentDictService.deleteDepartment(departmentDictDO)); } @PostMapping("updateDepartment") - @ApiOperation("编辑部门 id ** companyId departmentName leaderName parentId") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("编辑部门 id companyId departmentName leaderName parentId") + @LoginRequired public ResponseVO updateDepartment(@RequestBody DepartmentDictDO departmentDictDO){ return ResponseData.generateCreatedResponse(0,departmentDictService.updateDepartment(departmentDictDO)); } + @PostMapping("getDepartmentMembers") + @ApiOperation("获取部门成员 companyId 公司id departmentId 部门id userName startDate endDate") + @LoginRequired + public ResponseVO getDepartmentMembers(@RequestBody GetDepartmentMembersDTO getDepartmentMembersDTO){ + return ResponseData.generateCreatedResponse(0,departmentDictService.getDepartmentMembers(getDepartmentMembersDTO)); + } + + @PostMapping("getMembers") + @ApiOperation("获取成员(树) companyId 公司id startDate endDate ") + @LoginRequired + public ResponseVO getMembers(@RequestBody GetDepartmentMembersDTO getDepartmentMembersDTO){ + return ResponseData.generateCreatedResponse(0,departmentDictService.getMembers(getDepartmentMembersDTO)); + } + + } diff --git a/src/main/java/com/subsidy/controller/ExerciseDictController.java b/src/main/java/com/subsidy/controller/ExerciseDictController.java index 192755e..350e37c 100644 --- a/src/main/java/com/subsidy/controller/ExerciseDictController.java +++ b/src/main/java/com/subsidy/controller/ExerciseDictController.java @@ -4,17 +4,21 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.exercise.GetAllExercisesDTO; +import com.subsidy.dto.exercise.GetPaperExerciseDTO; import com.subsidy.dto.exercise.SubmitDTO; import com.subsidy.model.CourseDictDO; import com.subsidy.model.ExerciseDictDO; import com.subsidy.service.ExerciseDictService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** *
@@ -32,45 +36,40 @@ public class ExerciseDictController { @Autowired private ExerciseDictService exerciseDictService; - @PostMapping("getAllExercises") - @ApiOperation("查询所有题目 {courseId 课程id exerciseType 题目类型 difficulty 难度 title 题目 pageSize pageNum}") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO getAllExercises(@RequestBody GetAllExercisesDTO getAllExercisesDTO){ - return ResponseData.generateCreatedResponse(0,exerciseDictService.getAllExercises(getAllExercisesDTO)); - } - @PostMapping("addExercise") - @ApiOperation("添加题目 {courseId 课程id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案 }") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("添加题目 {paperId 试卷id courseId 课程id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案 }") + @LoginRequired public ResponseVO addExercise(@RequestBody ExerciseDictDO exerciseDictDO){ return ResponseData.generateCreatedResponse(0,exerciseDictService.addExercise(exerciseDictDO)); } @PostMapping("deleteExercise") @ApiOperation("删除题目 id") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO deleteExercise(@RequestBody ExerciseDictDO exerciseDictDO){ return ResponseData.generateCreatedResponse(0,exerciseDictService.deleteExercise(exerciseDictDO)); } @PostMapping("updateExercise") @ApiOperation("修改题目 id exerciseType 题目类型 difficulty 难度 title题目 items 选项 rightAnswer 正确答案") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO updateExercise(@RequestBody ExerciseDictDO exerciseDictDO){ return ResponseData.generateCreatedResponse(0,exerciseDictService.updateExercise(exerciseDictDO)); } - @PostMapping("getCourseExercises") - @ApiOperation("获取课程的习题 id 课程id") - public ResponseVO getCourseExercises(@RequestBody CourseDictDO courseDictDO){ - return ResponseData.generateCreatedResponse(0,exerciseDictService.getCourseExercises(courseDictDO)); - } - @PostMapping("submit") - @ApiOperation("提交答案 {memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ]} ") + @ApiOperation("提交答案 {paperId 卷子id memberId 成员id classId课程 courseId 课程id memberExerciseVOS [ id selectAnswer ] length:做题时长} ") + @LoginRequired + @TimeRequired public ResponseVO submit(@RequestBody SubmitDTO submitDTO){ return ResponseData.generateCreatedResponse(0,exerciseDictService.submit(submitDTO)); } + @PostMapping("getPaperExercise") + @ApiOperation("获取某个卷子的所有题目 pageSize pageNum paperId 卷子id exerciseType 类型 difficulty难度 title题目名称") + @LoginRequired + public ResponseVO getPaperExercise(@RequestBody GetPaperExerciseDTO getPaperExerciseDTO){ + return ResponseData.generateCreatedResponse(0,exerciseDictService.getPaperExercise(getPaperExerciseDTO)); + } } diff --git a/src/main/java/com/subsidy/controller/ExerciseDoneHistoryController.java b/src/main/java/com/subsidy/controller/ExerciseDoneHistoryController.java new file mode 100644 index 0000000..c3a6c0a --- /dev/null +++ b/src/main/java/com/subsidy/controller/ExerciseDoneHistoryController.java @@ -0,0 +1,40 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.model.ExerciseDoneResultDO; +import com.subsidy.service.ExerciseDoneHistoryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *
+ * 做题历史记录表 前端控制器 + *
+ * + * @author DengMin + * @since 2021-12-03 + */ +@RestController +@Api(tags = "做题历史记录表") +@RequestMapping("/exerciseDoneHistory") +public class ExerciseDoneHistoryController { + + @Autowired + private ExerciseDoneHistoryService exerciseDoneHistoryService; + + @PostMapping("getDoneHistoryDetail") + @ApiOperation("获取某一个试卷每个题目的做题详情 id 提交后返回的id memberId 成员id ") + @LoginRequired + public ResponseVO getDoneHistoryDetail(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO){ + return ResponseData.generateCreatedResponse(0,exerciseDoneHistoryService.getDoneHistoryDetail(exerciseDoneResultDO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/ExerciseDoneResultController.java b/src/main/java/com/subsidy/controller/ExerciseDoneResultController.java index 8c7191f..3da169f 100644 --- a/src/main/java/com/subsidy/controller/ExerciseDoneResultController.java +++ b/src/main/java/com/subsidy/controller/ExerciseDoneResultController.java @@ -1,10 +1,17 @@ package com.subsidy.controller; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.common.interceptor.TimeRequired; +import com.subsidy.model.ExerciseDoneResultDO; +import com.subsidy.service.ExerciseDoneResultService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; /** *@@ -19,4 +26,21 @@ import io.swagger.annotations.Api; @RequestMapping("/exerciseDoneResult") public class ExerciseDoneResultController { + @Autowired + private ExerciseDoneResultService exerciseDoneResultService; + + @PostMapping("getDoneDetail") + @ApiOperation("提交后获取做题结果 id 提交后返回的id") + @LoginRequired + @TimeRequired + public ResponseVO getDoneDetail(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO){ + return ResponseData.generateCreatedResponse(0,exerciseDoneResultService.getDoneDetail(exerciseDoneResultDO)); + } + + @PostMapping("importData") + public ResponseVO makeData(@RequestParam("file") MultipartFile file){ + exerciseDoneResultService.importData(file); + return null; + } + } diff --git a/src/main/java/com/subsidy/controller/FieldDictController.java b/src/main/java/com/subsidy/controller/FieldDictController.java new file mode 100644 index 0000000..3983e1e --- /dev/null +++ b/src/main/java/com/subsidy/controller/FieldDictController.java @@ -0,0 +1,63 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.field.QueryFieldsDTO; +import com.subsidy.model.FieldDictDO; +import com.subsidy.service.FieldDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *
+ * 行业字典表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-01-20 + */ +@RestController +@Api(tags = "行业字典表") +@RequestMapping("/fieldDict") +public class FieldDictController { + + @Autowired + private FieldDictService fieldDictService; + + @PostMapping("addField") + @ApiOperation("添加行业 fieldName 行业名称") + @LoginRequired + public ResponseVO addField(@RequestBody FieldDictDO fieldDictDO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.addField(fieldDictDO)); + } + + @PostMapping("updateField") + @ApiOperation("修改行业 id fieldName 行业名称") + @LoginRequired + public ResponseVO updateField(@RequestBody FieldDictDO fieldDictDO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.updateField(fieldDictDO)); + } + + @PostMapping("deleteField") + @ApiOperation("删除行业 id") + @LoginRequired + public ResponseVO deleteField(@RequestBody FieldDictDO fieldDictDO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.deleteField(fieldDictDO)); + } + + @PostMapping("queryFields") + @ApiOperation("查询行业 pageSize pageNum fieldName") + @LoginRequired + public ResponseVO queryFields(@RequestBody QueryFieldsDTO queryFieldsDTO){ + return ResponseData.generateCreatedResponse(0,fieldDictService.queryFields(queryFieldsDTO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/FileDictController.java b/src/main/java/com/subsidy/controller/FileDictController.java index 61f84ba..fb48868 100644 --- a/src/main/java/com/subsidy/controller/FileDictController.java +++ b/src/main/java/com/subsidy/controller/FileDictController.java @@ -5,17 +5,15 @@ import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.model.FileDictDO; -import com.subsidy.model.VodDictDO; import com.subsidy.service.FileDictService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -35,28 +33,28 @@ public class FileDictController { @PostMapping("getContendFiles") @ApiOperation("获取目录下的视频 {contentId fileName}") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO getContendFiles(@RequestBody FileDictDO fileDictDO){ return ResponseData.generateCreatedResponse(0,fileDictService.getContendFiles(fileDictDO)); } @PostMapping("deleteFile") - @ApiOperation("删除视频 id ") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("** 删除视频 id ") + @LoginRequired public ResponseVO deleteFile(@RequestBody FileDictDO fileDictDO){ return ResponseData.generateCreatedResponse(0,fileDictService.deleteFile(fileDictDO)); } @PostMapping("addFile") - @ApiOperation("新增视频 contentId fileName fileSize fileType fileUrl") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("** 新增视频 contentId fileName fileSize fileType fileUrl") + @LoginRequired public ResponseVO addFile(@RequestBody FileDictDO fileDictDO){ return ResponseData.generateCreatedResponse(0,fileDictService.addFile(fileDictDO)); } @PostMapping("updateFile") - @ApiOperation("新增视频 id contentId fileName fileSize fileType fileUrl") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("** 新增视频 id contentId fileName fileSize fileType fileUrl") + @LoginRequired public ResponseVO updateFile(@RequestBody FileDictDO fileDictDO){ return ResponseData.generateCreatedResponse(0,fileDictService.updateFile(fileDictDO)); } diff --git a/src/main/java/com/subsidy/controller/ImageCheckRecordController.java b/src/main/java/com/subsidy/controller/ImageCheckRecordController.java new file mode 100644 index 0000000..b3db474 --- /dev/null +++ b/src/main/java/com/subsidy/controller/ImageCheckRecordController.java @@ -0,0 +1,45 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.model.ImageCheckRecordDO; +import com.subsidy.service.ImageCheckRecordService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *
+ * 实名验证记录表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-07-14 + */ +@RestController +@Api(tags = "实名验证记录表") +@RequestMapping("/imageCheckRecord") +public class ImageCheckRecordController { + + + @Autowired + private ImageCheckRecordService imageCheckRecordService; + + + @PostMapping("getImageCheckHistory") + @ApiOperation("获取某人某个班级的验证历史 memberId classId ") + @LoginRequired + public ResponseVO getImageCheckHistory(@RequestBody ImageCheckRecordDO imageCheckRecordDO){ + return ResponseData.generateCreatedResponse(0,imageCheckRecordService.getImageCheckHistory(imageCheckRecordDO)); + } + + + +} diff --git a/src/main/java/com/subsidy/controller/JobDictController.java b/src/main/java/com/subsidy/controller/JobDictController.java new file mode 100644 index 0000000..561d6f3 --- /dev/null +++ b/src/main/java/com/subsidy/controller/JobDictController.java @@ -0,0 +1,66 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.model.JobDictDO; +import com.subsidy.service.JobDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 岗位表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-02-10 + */ +@RestController +@Api(tags = "岗位表") +@RequestMapping("/jobDict") +//TODO: 字段类型不全 +public class JobDictController { + + @Autowired + private JobDictService jobDictService; + + @PostMapping("queryJobs") + @ApiOperation("查询某公司的岗位 companyId") + @LoginRequired + public ResponseVO queryJobs(@RequestBody JobDictDO jobDictDO){ + return ResponseData.generateCreatedResponse(0,jobDictService.queryJobs(jobDictDO)); + } + + @PostMapping("deleteJob") + @ApiOperation("删除某个岗位 id") + @LoginRequired + public ResponseVO deleteJob(@RequestBody JobDictDO jobDictDO){ + return ResponseData.generateCreatedResponse(0,jobDictService.deleteJob(jobDictDO)); + } + + @PostMapping("addJob") + @ApiOperation("添加岗位 companyId jobName") + @LoginRequired + public ResponseVO addJob(@RequestBody JobDictDO jobDictDO){ + return ResponseData.generateCreatedResponse(0,jobDictService.addJob(jobDictDO)); + } + + @PostMapping("updateJob") + @ApiOperation("更新岗位 id jobName") + @LoginRequired + public ResponseVO updateJob(@RequestBody JobDictDO jobDictDO){ + return ResponseData.generateCreatedResponse(0,jobDictService.updateJob(jobDictDO)); + } + + + + +} diff --git a/src/main/java/com/subsidy/controller/JobMemberMappingController.java b/src/main/java/com/subsidy/controller/JobMemberMappingController.java new file mode 100644 index 0000000..fea9eeb --- /dev/null +++ b/src/main/java/com/subsidy/controller/JobMemberMappingController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 岗位人员表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-02-10 + */ +@RestController +@Api(tags = "岗位人员表") +@RequestMapping("/jobMemberMapping") +public class JobMemberMappingController { + +} diff --git a/src/main/java/com/subsidy/controller/MemberController.java b/src/main/java/com/subsidy/controller/MemberController.java index c74af9e..848cb43 100644 --- a/src/main/java/com/subsidy/controller/MemberController.java +++ b/src/main/java/com/subsidy/controller/MemberController.java @@ -1,26 +1,21 @@ package com.subsidy.controller; - import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.administer.VerifyCodeDTO; -import com.subsidy.dto.member.AddMemberDTO; -import com.subsidy.dto.member.ContentMemberDTO; -import com.subsidy.dto.member.GetAllDTO; -import com.subsidy.dto.member.StudyHistoryDTO; +import com.subsidy.dto.member.*; +import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.MemberDO; import com.subsidy.service.MemberService; -import com.subsidy.util.ConstantUtils; -import com.subsidy.vo.member.ContentVodVO; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -39,29 +34,29 @@ public class MemberController { private MemberService memberService; @PostMapping("getAll") - @ApiOperation("查询某部门成员 pageNum pageSize departmentId userName status") - //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("查询某部门成员 pageNum pageSize departmentId userName status startDate endDate") + @LoginRequired public ResponseVO getAll(@RequestBody GetAllDTO getAllDTO){ return ResponseData.generateCreatedResponse(0,memberService.getAll(getAllDTO)); } @PostMapping("deleteMember") @ApiOperation("删除成员 id ") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @LoginRequired public ResponseVO deleteMember(@RequestBody MemberDO memberDO){ return ResponseData.generateCreatedResponse(0,memberService.deleteMember(memberDO)); } @PostMapping("addMember") - @ApiOperation("新增成员 departmentId userName accountName telephone gender image idCard") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("新增成员 companyId userName accountName accountNameEn telephone gender image idCard departmentIds jobIds workNo inductionDate email") + @LoginRequired public ResponseVO addMember(@RequestBody AddMemberDTO addMemberDTO){ return ResponseData.generateCreatedResponse(0,memberService.addMember(addMemberDTO)); } @PostMapping("updateMember") - @ApiOperation("编辑成员 {id departmentId userName accountName telephone gender image idCard status}") - //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) + @ApiOperation("编辑成员 {id companyId userName accountName accountNameEn telephone gender image idCard status departmentIds jobIds}") + @LoginRequired public ResponseVO updateMember(@RequestBody AddMemberDTO addMemberDTO){ return ResponseData.generateCreatedResponse(0,memberService.updateMember(addMemberDTO)); } @@ -73,52 +68,134 @@ public class MemberController { } @PostMapping("passwordLogin") - @ApiOperation("手机端:密码登录 {accountName password}") - public ResponseVO passwordLogin(@RequestBody MemberDO memberDO){ - return ResponseData.generateCreatedResponse(0,memberService.passwordLogin(memberDO)); + @ApiOperation("手机端:密码登录 { companyId accountName password}") + public ResponseVO passwordLogin(@RequestBody PasswordLoginDTO passwordLoginDTO){ + return ResponseData.generateCreatedResponse(0,memberService.passwordLogin(passwordLoginDTO)); + } + + @PostMapping("qingxuetangLogin") + @ApiOperation("轻学堂登录 手机号mobile") + @TimeRequired + public ResponseVO qingxuetangLogin(@RequestBody QingxuetangLoginDTO qingxuetangLoginDTO){ + return ResponseData.generateCreatedResponse(0,memberService.qingxuetangLogin(qingxuetangLoginDTO)); + } + + @PostMapping("kunchiLogin") + @ApiOperation("鲲驰登陆 authCorpName 手机号mobile nickname timestamp sign") + @TimeRequired + public ResponseVO kunchiLogin(@RequestBody QingxuetangLoginDTO qingxuetangLoginDTO){ + return ResponseData.generateCreatedResponse(0,memberService.kunchiLogin(qingxuetangLoginDTO)); + } + + @PostMapping("checkStatus") + @ApiOperation("实名制验证状态 memberId") + @TimeRequired + public ResponseVO checkStatus(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,memberService.checkStatus(memberDO)); } @PostMapping("updatePassword") @ApiOperation("修改密码 {id password}") + @LoginRequired + @TimeRequired public ResponseVO updatePassword(@RequestBody MemberDO memberDO){ return ResponseData.generateCreatedResponse(0,memberService.updatePassword(memberDO)); } - @PostMapping("studyPage") - @ApiOperation("手机端:学习主页 id 学员id") - public ResponseVO studyPage(@RequestBody MemberDO memberDO){ - return ResponseData.generateCreatedResponse(0,memberService.studyPage(memberDO)); + @PostMapping("updateCheckImage") + @ApiOperation("上传采集照片 id checkImage") + @TimeRequired + public ResponseVO updateCheckImage(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,memberService.updateCheckImage(memberDO)); + } + + @PostMapping("removeCheckImage") + @ApiOperation("清除采集照片 id ") + public ResponseVO removeCheckImage(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,memberService.removeCheckImage(memberDO)); + } + + @PostMapping("myCourses") + @ApiOperation("手机端:我的学习--课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 ") +// @LoginRequired + @TimeRequired + public ResponseVO myCourses(@RequestBody MyCoursesDTO myCoursesDTO){ + return ResponseData.generateCreatedResponse(0,memberService.myCourses(myCoursesDTO)); } @PostMapping("contentVod") - @ApiOperation("手机端:目录+视频 courseId 课程 memberId 学员id") + @ApiOperation("手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id") +// @LoginRequired + @TimeRequired public ResponseVO contentVod(@RequestBody ContentMemberDTO contentVodDTO){ return ResponseData.generateCreatedResponse(0,memberService.contentVod(contentVodDTO)); } @PostMapping("contentFiles") @ApiOperation("手机端:目录+课件 courseId 课程 memberId 学员id") + @LoginRequired + @TimeRequired public ResponseVO contentFiles(@RequestBody ContentMemberDTO contentMemberDTO){ return ResponseData.generateCreatedResponse(0,memberService.contentFiles(contentMemberDTO)); } @PostMapping("studyHistory") - @ApiOperation("学习记录 id 成员id pageSize pageNum") + @ApiOperation("学习记录 memberId 成员id pageSize pageNum") + @LoginRequired + @TimeRequired public ResponseVO studyHistory(@RequestBody StudyHistoryDTO studyHistoryDTO){ return ResponseData.generateCreatedResponse(0,memberService.studyHistory(studyHistoryDTO)); } @PostMapping("getCourseTest") - @ApiOperation("获取课程下的测试情况 {memberId 成员id courseId 课程id classId}") + @ApiOperation("获取课程下的测试情况 {memberId 成员id 班级id classId courseId 课程id }") + @LoginRequired + @TimeRequired public ResponseVO getCourseTest(@RequestBody ContentMemberDTO contentMemberDTO){ return ResponseData.generateCreatedResponse(0,memberService.getCourseTest(contentMemberDTO)); } + @PostMapping("getTestDoneDetail") + @ApiOperation("获取某个测评学生的完成情况 paperId memberId") + @LoginRequired + public ResponseVO getPaperDoneDetail(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO){ + return ResponseData.generateCreatedResponse(0,memberService.getPaperDoneDetail(exerciseDoneResultDO)); + } + @PostMapping("getStudyInfo") @ApiOperation("获取学生完成课程情况 id 学员id") + @LoginRequired + @TimeRequired public ResponseVO getStudyInfo(@RequestBody MemberDO memberDO){ return ResponseData.generateCreatedResponse(0,memberService.getStudyInfo(memberDO)); } + @PostMapping("checkTimes") + @ApiOperation("检测是否超过次数 memberId paperId classId") + @LoginRequired + public ResponseVO checkTimes(@RequestBody ExerciseDoneResultDO exerciseDoneResultDO){ + return ResponseData.generateCreatedResponse(0,memberService.checkTimes(exerciseDoneResultDO)); + } + + @PostMapping("importRedis") + @ApiOperation("导入学生账号到redis") + @LoginRequired + public void importRedis(){ + memberService.importRedis(); + } + + @PostMapping("changeDepartments") + @ApiOperation("修改部门 desDepId[] 目的部门 memberIds[] 成员id") + @LoginRequired + public ResponseVO changeDepartments(@RequestBody ChangeDepartmentsDTO changeDepartmentsDTO){ + return ResponseData.generateCreatedResponse(0,memberService.changeDepartments(changeDepartmentsDTO)); + } + + @PostMapping("qxy") + @ApiOperation("Q学友授权 telephone 手机号") + @TimeRequired + public ResponseVO qxy(@RequestBody MemberDO memberDO){ + return ResponseData.generateCreatedResponse(0,memberService.qxy(memberDO)); + } } diff --git a/src/main/java/com/subsidy/controller/MemberStudyLengthController.java b/src/main/java/com/subsidy/controller/MemberStudyLengthController.java new file mode 100644 index 0000000..3b49989 --- /dev/null +++ b/src/main/java/com/subsidy/controller/MemberStudyLengthController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *
+ * 前端控制器 + *
+ * + * @author DengMin + * @since 2022-01-28 + */ +@RestController +@Api(tags = "") +@RequestMapping("/member-study-length-do") +public class MemberStudyLengthController { + +} diff --git a/src/main/java/com/subsidy/controller/OprAdmDictController.java b/src/main/java/com/subsidy/controller/OprAdmDictController.java new file mode 100644 index 0000000..2b38b26 --- /dev/null +++ b/src/main/java/com/subsidy/controller/OprAdmDictController.java @@ -0,0 +1,40 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.opr.GetHistoryDTO; +import com.subsidy.service.OprAdmDictService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 审计表 前端控制器 + *
+ * + * @author DengMin + * @since 2021-12-13 + */ +@RestController +@Api(tags = "后台审计表") +@RequestMapping("/oprAdm") +public class OprAdmDictController { + + @Autowired + private OprAdmDictService oprAdmDictService; + + @PostMapping("getHistory") + @ApiOperation("获取后台用户审计 {pageSize pageNum userName startDate endDate}") + @LoginRequired + public ResponseVO getHistory(@RequestBody GetHistoryDTO getHistoryDTO){ + return ResponseData.generateCreatedResponse(0,oprAdmDictService.getHistory(getHistoryDTO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/OprMemDictController.java b/src/main/java/com/subsidy/controller/OprMemDictController.java new file mode 100644 index 0000000..a522a88 --- /dev/null +++ b/src/main/java/com/subsidy/controller/OprMemDictController.java @@ -0,0 +1,40 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.opr.GetHistoryDTO; +import com.subsidy.service.OprMemDictService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 审计表 前端控制器 + *
+ * + * @author DengMin + * @since 2021-12-13 + */ +@RestController +@Api(tags = "学员审计表") +@RequestMapping("/oprMem") +public class OprMemDictController { + + @Autowired + private OprMemDictService oprMemDictService; + + @PostMapping("getHistory") + @ApiOperation("获取学员审计 {pageSize pageNum userName startDate endDate}") + @LoginRequired + public ResponseVO getHistory(@RequestBody GetHistoryDTO getHistoryDTO){ + return ResponseData.generateCreatedResponse(0,oprMemDictService.getHistory(getHistoryDTO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/PaperDictController.java b/src/main/java/com/subsidy/controller/PaperDictController.java new file mode 100644 index 0000000..d831ca5 --- /dev/null +++ b/src/main/java/com/subsidy/controller/PaperDictController.java @@ -0,0 +1,63 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.model.PaperDictDO; +import com.subsidy.service.PaperDictService; +import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 试卷字典表 前端控制器 + *
+ * + * @author DengMin + * @since 2021-12-03 + */ +@RestController +@Api(tags = "试卷字典表") +@RequestMapping("/paper") +public class PaperDictController { + + @Autowired + private PaperDictService paperDictService; + + @PostMapping("queryPapers") + @ApiOperation("查看课程下的测试 {courseId paperName}") + @LoginRequired + public ResponseVO queryPapers(@RequestBody PaperDictDO paperDictDO) { + return ResponseData.generateCreatedResponse(0, paperDictService.queryPapers(paperDictDO)); + } + + @PostMapping("deletePaper") + @ApiOperation("删除卷子 {id}") + @LoginRequired + public ResponseVO deletePaper(@RequestBody PaperDictDO paperDictDO) { + return ResponseData.generateCreatedResponse(0, paperDictService.deletePaper(paperDictDO)); + } + + @PostMapping("update") + @ApiOperation("启用/禁用 {id paperStatus}") + @LoginRequired + public ResponseVO updateStatus(@RequestBody PaperDictDO paperDictDO) { + return ResponseData.generateCreatedResponse(0, paperDictService.updateStatus(paperDictDO)); + } + + @PostMapping("addPaper") + @ApiOperation("添加卷子 {courseId paperName}") + @LoginRequired + public ResponseVO addPaper(@RequestBody PaperDictDO paperDictDO) { + return ResponseData.generateCreatedResponse(0, paperDictService.addPaper(paperDictDO)); + } + + +} diff --git a/src/main/java/com/subsidy/controller/RankDictController.java b/src/main/java/com/subsidy/controller/RankDictController.java new file mode 100644 index 0000000..91e0f9f --- /dev/null +++ b/src/main/java/com/subsidy/controller/RankDictController.java @@ -0,0 +1,64 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.mapper.RankDictMapper; +import com.subsidy.model.RankDictDO; +import com.subsidy.service.RankDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 职级字典表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-02-14 + */ +@RestController +@Api(tags = "职级字典表") +@RequestMapping("/rankDict") +public class RankDictController { + + @Autowired + private RankDictService rankDictService; + + @PostMapping("addRank") + @ApiOperation("添加职级 companyId rank") + @LoginRequired + public ResponseVO addRank(@RequestBody RankDictDO rankDictDO){ + return ResponseData.generateCreatedResponse(0,rankDictService.addRank(rankDictDO)); + } + + @PostMapping("deleteRank") + @ApiOperation("删除职级 id") + @LoginRequired + public ResponseVO deleteById(@RequestBody RankDictDO rankDictDO){ + return ResponseData.generateCreatedResponse(0,rankDictService.deleteRank(rankDictDO)); + } + + @PostMapping("updateRank") + @ApiOperation("添加职级 id rank") + @LoginRequired + public ResponseVO updateRank(@RequestBody RankDictDO rankDictDO){ + return ResponseData.generateCreatedResponse(0,rankDictService.updateRank(rankDictDO)); + } + + @PostMapping("queryRanks") + @ApiOperation("查看职级 companyId") + @LoginRequired + public ResponseVO queryRanks(@RequestBody RankDictDO rankDictDO){ + return ResponseData.generateCreatedResponse(0,rankDictService.queryRanks(rankDictDO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/RotationImgDictController.java b/src/main/java/com/subsidy/controller/RotationImgDictController.java new file mode 100644 index 0000000..9b844ed --- /dev/null +++ b/src/main/java/com/subsidy/controller/RotationImgDictController.java @@ -0,0 +1,62 @@ +package com.subsidy.controller; + + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.model.RotationImgDictDO; +import com.subsidy.service.RotationImgDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *+ * 轮播图 前端控制器 + *
+ * + * @author DengMin + * @since 2022-02-23 + */ +@RestController +@Api(tags = "轮播图") +@RequestMapping("/rotationImgDict") +public class RotationImgDictController { + + @Autowired + private RotationImgDictService rotationImgDictService; + + @PostMapping("addRotation") + @ApiOperation("添加轮播图 {companyId 公司id rotationImg 轮播图地址}") + @LoginRequired + public ResponseVO addRotation(@RequestBody RotationImgDictDO rotationImgDictDO){ + return ResponseData.generateCreatedResponse(0,rotationImgDictService.addRotation(rotationImgDictDO)); + } + + @PostMapping("deleteRotation") + @ApiOperation("删除轮播图 {id}") + @LoginRequired + public ResponseVO deleteRotation(@RequestBody RotationImgDictDO rotationImgDictDO){ + return ResponseData.generateCreatedResponse(0,rotationImgDictService.deleteRotation(rotationImgDictDO)); + } + + @PostMapping("updateRotation") + @ApiOperation("编辑轮播图 id") + @LoginRequired + public ResponseVO updateRotation(@RequestBody RotationImgDictDO rotationImgDictDO){ + return ResponseData.generateCreatedResponse(0,rotationImgDictService.updateRotation(rotationImgDictDO)); + } + + @PostMapping("getAllRotations") + @ApiOperation("获取某企业的轮播图 companyId") + @LoginRequired + public ResponseVO getAllRotations(@RequestBody RotationImgDictDO rotationImgDictDO){ + return ResponseData.generateCreatedResponse(0,rotationImgDictService.getAllRotations(rotationImgDictDO)); + } + +} diff --git a/src/main/java/com/subsidy/controller/SignInRecordController.java b/src/main/java/com/subsidy/controller/SignInRecordController.java index d2036b5..935e96d 100644 --- a/src/main/java/com/subsidy/controller/SignInRecordController.java +++ b/src/main/java/com/subsidy/controller/SignInRecordController.java @@ -4,21 +4,19 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.member.GetMemberSignInfoDTO; -import com.subsidy.dto.sign.ClassSignInfoDTO; -import com.subsidy.dto.sign.SignInDTO; -import com.subsidy.model.MemberDO; +import com.subsidy.dto.sign.DataViewDTO; import com.subsidy.model.SignInRecordDO; import com.subsidy.service.SignInRecordService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *@@ -38,27 +36,37 @@ public class SignInRecordController { @PostMapping("getMemberSignInfo") @ApiOperation("获取某个成员的签到记录 id 成员id pageSize pageNum") - public ResponseVO getMemberSignInfo(@RequestBody GetMemberSignInfoDTO getMemberSignInfoDTO){ - return ResponseData.generateCreatedResponse(0,signInRecordService.getMemberSignInfo(getMemberSignInfoDTO)); + @LoginRequired + public ResponseVO getMemberSignInfo(@RequestBody GetMemberSignInfoDTO getMemberSignInfoDTO) { + return ResponseData.generateCreatedResponse(0, signInRecordService.getMemberSignInfo(getMemberSignInfoDTO)); } @PostMapping("signIn") @ApiOperation("签到 memberId") - public ResponseVO signIn(@RequestBody SignInRecordDO signInRecordDO){ - return ResponseData.generateCreatedResponse(0,signInRecordService.signIn(signInRecordDO)); + @LoginRequired + @TimeRequired + public ResponseVO signIn(@RequestBody SignInRecordDO signInRecordDO) { + return ResponseData.generateCreatedResponse(0, signInRecordService.signIn(signInRecordDO)); } - @PostMapping("classStudyHistory") - @ApiOperation("校区学习记录 id 校区id className courseName pageSize pageNum") - //@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO classSignInfo(@RequestBody ClassSignInfoDTO classSignInfoDTO){ - return ResponseData.generateCreatedResponse(0,signInRecordService.classSignInfo(classSignInfoDTO)); + @PostMapping("dataView") + @ApiOperation("数据概览 id 校区id className pageSize pageNum") + @LoginRequired + public ResponseVO dataView(@RequestBody DataViewDTO classSignInfoDTO) { + return ResponseData.generateCreatedResponse(0, signInRecordService.dataView(classSignInfoDTO)); } @PostMapping("signInStatus") @ApiOperation("判断学生当天有没有打卡 {memberId 学生id}") - public ResponseVO signInStatus(@RequestBody SignInRecordDO signInRecordDO){ - return ResponseData.generateCreatedResponse(0,signInRecordService.signInStatus(signInRecordDO)); + @LoginRequired + @TimeRequired + public ResponseVO signInStatus(@RequestBody SignInRecordDO signInRecordDO) { + return ResponseData.generateCreatedResponse(0, signInRecordService.signInStatus(signInRecordDO)); + } + + @PostMapping("getRedisData") + public void test() { + signInRecordService.test(); } } diff --git a/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java b/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java index e8f1d91..6c17e9b 100644 --- a/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java +++ b/src/main/java/com/subsidy/controller/SmsVerifyCodeController.java @@ -3,16 +3,16 @@ package com.subsidy.controller; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.sms.SendVerifyCodeDTO; import com.subsidy.service.SmsVerifyCodeService; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *
@@ -32,6 +32,7 @@ public class SmsVerifyCodeController { @PostMapping(value = "/send") @ApiOperation("发送短信验证码 {telephone} ") + @TimeRequired public ResponseVO sendVerifyCode(@RequestBody SendVerifyCodeDTO sendVerifyCodeDTO ) { smsVerifyCodeService.sendVerifyCode(sendVerifyCodeDTO); return ResponseData.generateCreatedResponse(0); diff --git a/src/main/java/com/subsidy/controller/VodDictController.java b/src/main/java/com/subsidy/controller/VodDictController.java index 0b5e6be..e46b725 100644 --- a/src/main/java/com/subsidy/controller/VodDictController.java +++ b/src/main/java/com/subsidy/controller/VodDictController.java @@ -1,21 +1,19 @@ package com.subsidy.controller; - import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; -import com.subsidy.dto.content.GetContendVodsDTO; +import com.subsidy.dto.vod.ChangeOrdersDTO; import com.subsidy.model.VodDictDO; import com.subsidy.service.VodDictService; import com.subsidy.util.ConstantUtils; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *
@@ -35,38 +33,39 @@ public class VodDictController { @PostMapping("/signature") @ApiOperation("获取签名") - public ResponseVO signature()throws Exception{ - return ResponseData.generateCreatedResponse(0,vodDictService.signature()); - } - - @PostMapping("getContendVods") - @ApiOperation("获取目录下的视频 {contentId vodName}") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO getContendVods(@RequestBody GetContendVodsDTO getContendVodsDTO){ - return ResponseData.generateCreatedResponse(0,vodDictService.getContendVods(getContendVodsDTO)); + public ResponseVO signature() throws Exception { + return ResponseData.generateCreatedResponse(0, vodDictService.signature()); } @PostMapping("deleteVod") @ApiOperation("删除视频 id ") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO deleteVod(@RequestBody VodDictDO vodDictDO){ - return ResponseData.generateCreatedResponse(0,vodDictService.deleteVod(vodDictDO)); + @LoginRequired + public ResponseVO deleteVod(@RequestBody VodDictDO vodDictDO) { + vodDictService.deleteVod(vodDictDO); + return ResponseData.generateCreatedResponse(0); } @PostMapping("addVod") - @ApiOperation("新增视频 contentId vodName vodLength vodType vodSize vodUrl vodCode") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO addVod(@RequestBody VodDictDO vodDictDO){ - return ResponseData.generateCreatedResponse(0,vodDictService.addVod(vodDictDO)); + @ApiOperation("新增视频 labelId vodName vodLength vodType vodSize vodUrl vodCode") + @LoginRequired + public ResponseVO addVod(@RequestBody VodDictDO vodDictDO) { + vodDictService.addVod(vodDictDO); + return ResponseData.generateCreatedResponse(0, ConstantUtils.ADD_SUCCESS); } @PostMapping("updateVod") - @ApiOperation("新增视频 id contentId vodName vodLength vodType vodSize vodUrl vodCode") - @LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE}) - public ResponseVO updateVod(@RequestBody VodDictDO vodDictDO){ - return ResponseData.generateCreatedResponse(0,vodDictService.updateVod(vodDictDO)); + @ApiOperation("新增视频 id labelId vodName vodLength vodType vodSize vodUrl vodCode") + @LoginRequired + public ResponseVO updateVod(@RequestBody VodDictDO vodDictDO) { + vodDictService.updateVod(vodDictDO); + return ResponseData.generateCreatedResponse(0, ConstantUtils.SET_SUCCESS); } - + @PostMapping("changeOrders") + @ApiOperation("排序 vodIds [] 视频的id") + public ResponseVO changeOrders(@RequestBody ChangeOrdersDTO changeOrdersDTO ){ + vodDictService.changeOrders(changeOrdersDTO); + return ResponseData.generateCreatedResponse(0,ConstantUtils.SET_SUCCESS); + } } diff --git a/src/main/java/com/subsidy/controller/VodLabelDictController.java b/src/main/java/com/subsidy/controller/VodLabelDictController.java new file mode 100644 index 0000000..7525d6c --- /dev/null +++ b/src/main/java/com/subsidy/controller/VodLabelDictController.java @@ -0,0 +1,70 @@ +package com.subsidy.controller; + +import com.subsidy.common.ResponseData; +import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.dto.label.VodLabelPageDTO; +import com.subsidy.model.VodLabelDictDO; +import com.subsidy.service.VodLableDictService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *
+ * 视频库类目表 前端控制器 + *
+ * + * @author DengMin + * @since 2022-07-19 + */ +@RestController +@Api(tags = "视频库类目表") +@RequestMapping("/vodLabelDict") +public class VodLabelDictController { + + @Autowired + private VodLableDictService vodLableDictService; + + @PostMapping(value = "addVodLabel") + @ApiOperation("添加视频类目: labelName/类目名称") + @LoginRequired + public ResponseVO addVodLabel(@RequestBody VodLabelDictDO vodLabelDictDO) { + vodLableDictService.save(vodLabelDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "updateVodLabel") + @ApiOperation("添加视频类目: id/类目ID、labelName/类目名称") + @LoginRequired + public ResponseVO updateVodLabel(@RequestBody VodLabelDictDO vodLabelDictDO) { + vodLableDictService.updateById(vodLabelDictDO); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "deleteVodLabel") + @ApiOperation("添加视频类目: id/类目ID") + @LoginRequired + public ResponseVO deleteVodLabel(@RequestBody VodLabelDictDO vodLabelDictDO) { + vodLableDictService.removeById(vodLabelDictDO.getId()); + return ResponseData.generateCreatedResponse(0); + } + + @PostMapping(value = "queryVodLabelPage") + @ApiOperation("分页查询视频类目: labelName/名称、pageNum/但前页数、pageSize/每页显示条数") + @LoginRequired + public ResponseVO queryVodLabelPage(@RequestBody VodLabelPageDTO vodLabelPageDTO) { + return ResponseData.generateCreatedResponse(0, vodLableDictService.queryVodLabelPage(vodLabelPageDTO)); + } + + @PostMapping(value = "queryVodLabel") + @ApiOperation("查询全部视频类目") + @LoginRequired + public ResponseVO queryVodLabel() { + return ResponseData.generateCreatedResponse(0, vodLableDictService.list()); + } +} diff --git a/src/main/java/com/subsidy/controller/VodPlayHistoryController.java b/src/main/java/com/subsidy/controller/VodPlayHistoryController.java index 22fad72..1f6b79e 100644 --- a/src/main/java/com/subsidy/controller/VodPlayHistoryController.java +++ b/src/main/java/com/subsidy/controller/VodPlayHistoryController.java @@ -4,16 +4,20 @@ package com.subsidy.controller; import com.alibaba.fastjson.JSON; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; +import com.subsidy.common.interceptor.LoginRequired; +import com.subsidy.common.interceptor.TimeRequired; +import com.subsidy.dto.vod.InsertHistoryNewDTO; +import com.subsidy.dto.vod.RemainSecondsDTO; +import com.subsidy.dto.vod.SignDatePlaysDTO; import com.subsidy.model.VodPlayHistoryDO; import com.subsidy.service.VodPlayHistoryService; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *
@@ -33,14 +37,54 @@ public class VodPlayHistoryController {
@PostMapping("insertHistory")
@ApiOperation("记录学生看视频位置 ajax请求 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点")
+ @LoginRequired
+ @TimeRequired
public ResponseVO insertHistory(@RequestBody VodPlayHistoryDO vodPlayHistoryDO){
return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistory(vodPlayHistoryDO));
}
@RequestMapping("insertHistoryNew")
@ApiOperation("记录学生看视频位置 classId班级id vodId 视频id memberId 成员id playLength 播放时长 playRecord 位点")
+// @LoginRequired
+ @TimeRequired
public ResponseVO insertHistoryNew(@RequestBody String param){
- VodPlayHistoryDO vodPlayHistoryDO = JSON.parseObject(param,VodPlayHistoryDO.class);
- return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistoryNew(vodPlayHistoryDO));
+ InsertHistoryNewDTO insertHistoryNewDTO = JSON.parseObject(param, InsertHistoryNewDTO.class);
+ return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.insertHistoryNew(insertHistoryNewDTO));
+ }
+
+ @PostMapping("dataFix")
+ @ApiOperation("每个视频都看一次")
+// @LoginRequired
+ public void dadaFix(@RequestBody SignDatePlaysDTO dataFixDTO){
+ vodPlayHistoryService.dataFix(dataFixDTO);
+ }
+
+ @PostMapping("signDatePlays")
+ @ApiOperation("每天接着看几个视频 接dataFix的")
+// @LoginRequired
+ public void signDatePlays(@RequestBody SignDatePlaysDTO signDatePlaysDTO ){
+ vodPlayHistoryService.signDatePlays(signDatePlaysDTO);
}
+
+ @PostMapping("remainSeconds")
+ @ApiOperation("每个视频先看一下,然后剩余时长分配到每天里 classId memberId")
+// @LoginRequired
+ public void remainSeconds(@RequestBody RemainSecondsDTO remainSecondsDTO){
+ vodPlayHistoryService.remainSeconds(remainSecondsDTO);
+ }
+
+ @PostMapping("playLengthFix")
+ @ApiOperation("按照时长去跑脚本 {classId memberId}")
+// @LoginRequired
+ public void playLengthFix(@RequestBody RemainSecondsDTO remainSecondsDTO){
+ vodPlayHistoryService.playLengthFix(remainSecondsDTO);
+ }
+
+
+ @PostMapping("testPlays")
+ @ApiOperation("解决有交叉时间的数据")
+ public ResponseVO testPlays(@RequestBody VodPlayHistoryDO vodPlayHistoryDO){
+ return ResponseData.generateCreatedResponse(0,vodPlayHistoryService.testPlays(vodPlayHistoryDO));
+ }
+
}
diff --git a/src/main/java/com/subsidy/dto/administer/ClassDailyInfoDTO.java b/src/main/java/com/subsidy/dto/administer/ClassDailyInfoDTO.java
new file mode 100644
index 0000000..5b5db3c
--- /dev/null
+++ b/src/main/java/com/subsidy/dto/administer/ClassDailyInfoDTO.java
@@ -0,0 +1,22 @@
+package com.subsidy.dto.administer;
+
+import lombok.Data;
+
+@Data
+public class ClassDailyInfoDTO {
+
+ private Long classId;
+
+ private String userName;
+
+ private Long courseId;
+
+ private String startDate;
+
+ private String endDate;
+
+ private Integer pageSize;
+
+ private Integer pageNum;
+
+}
diff --git a/src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java b/src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java
index 4615d99..0c61956 100644
--- a/src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java
+++ b/src/main/java/com/subsidy/dto/administer/ClassDetailDTO.java
@@ -15,4 +15,6 @@ public class ClassDetailDTO {
Boolean flag;
+ private Long paperId;
+
}
diff --git a/src/main/java/com/subsidy/dto/administer/ClassVodDailyInfoDTO.java b/src/main/java/com/subsidy/dto/administer/ClassVodDailyInfoDTO.java
new file mode 100644
index 0000000..cc4ae0a
--- /dev/null
+++ b/src/main/java/com/subsidy/dto/administer/ClassVodDailyInfoDTO.java
@@ -0,0 +1,16 @@
+package com.subsidy.dto.administer;
+
+import lombok.Data;
+
+@Data
+public class ClassVodDailyInfoDTO {
+
+ private Integer pageSize;
+
+ private Integer pageNum;
+
+ private Long classId;
+
+ private String userName;
+
+}
diff --git a/src/main/java/com/subsidy/dto/administer/ClassVodInfoDTO.java b/src/main/java/com/subsidy/dto/administer/ClassVodInfoDTO.java
new file mode 100644
index 0000000..a6a2caf
--- /dev/null
+++ b/src/main/java/com/subsidy/dto/administer/ClassVodInfoDTO.java
@@ -0,0 +1,15 @@
+package com.subsidy.dto.administer;
+
+
+import lombok.Data;
+
+@Data
+public class ClassVodInfoDTO {
+
+ private Long classId;
+
+ private String vodName;
+
+ private Long courseId;
+
+}
diff --git a/src/main/java/com/subsidy/dto/administer/ManageMemberDTO.java b/src/main/java/com/subsidy/dto/administer/ManageMemberDTO.java
new file mode 100644
index 0000000..aa57883
--- /dev/null
+++ b/src/main/java/com/subsidy/dto/administer/ManageMemberDTO.java
@@ -0,0 +1,14 @@
+package com.subsidy.dto.administer;
+
+import lombok.Data;
+
+@Data
+public class ManageMemberDTO {
+
+ private Integer pageSize;
+
+ private Integer pageNum;
+
+ private String userName;
+
+}
diff --git a/src/main/java/com/subsidy/dto/administer/MemberStudyLogDTO.java b/src/main/java/com/subsidy/dto/administer/MemberStudyLogDTO.java
new file mode 100644
index 0000000..4920263
--- /dev/null
+++ b/src/main/java/com/subsidy/dto/administer/MemberStudyLogDTO.java
@@ -0,0 +1,16 @@
+package com.subsidy.dto.administer;
+
+import lombok.Data;
+
+@Data
+public class MemberStudyLogDTO {
+
+ private Long memberId;
+
+ private Long classId;
+
+ private Integer pageSize;
+
+ private Integer pageNum;
+
+}
diff --git a/src/main/java/com/subsidy/dto/administer/OperatorsDTO.java b/src/main/java/com/subsidy/dto/administer/OperatorsDTO.java
index 4e3ecbc..567085b 100644
--- a/src/main/java/com/subsidy/dto/administer/OperatorsDTO.java
+++ b/src/main/java/com/subsidy/dto/administer/OperatorsDTO.java
@@ -11,10 +11,14 @@ public class OperatorsDTO {
private Integer role;
+ private Long fieldId;
+
private String companyName;
private String userName;
- private Integer id;
+ private Long id;
+
+ private String superviseName;
}
diff --git a/src/main/java/com/subsidy/dto/businessScope/BusinessScopeDTO.java b/src/main/java/com/subsidy/dto/businessScope/BusinessScopeDTO.java
new file mode 100644
index 0000000..2e4491e
--- /dev/null
+++ b/src/main/java/com/subsidy/dto/businessScope/BusinessScopeDTO.java
@@ -0,0 +1,13 @@
+package com.subsidy.dto.businessScope;
+
+import lombok.Data;
+
+@Data
+public class BusinessScopeDTO {
+
+ private String businessScopeName;
+
+ private Integer pageNum;
+
+ private Integer pageSize;
+}
diff --git a/src/main/java/com/subsidy/dto/cert/AddCertDTO.java b/src/main/java/com/subsidy/dto/cert/AddCertDTO.java
new file mode 100644
index 0000000..f216892
--- /dev/null
+++ b/src/main/java/com/subsidy/dto/cert/AddCertDTO.java
@@ -0,0 +1,13 @@
+package com.subsidy.dto.cert;
+
+import com.subsidy.model.CertDictDO;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AddCertDTO extends CertDictDO {
+
+ private List
+ * 课程通知
+ *
+ * 定时器
+ *
+ * Mapper 接口
+ *
+ * 活跃度检测表 Mapper 接口
+ *
* 问题答疑表 Mapper 接口
diff --git a/src/main/java/com/subsidy/mapper/BusinessScopeDictMapper.java b/src/main/java/com/subsidy/mapper/BusinessScopeDictMapper.java
new file mode 100644
index 0000000..06045ed
--- /dev/null
+++ b/src/main/java/com/subsidy/mapper/BusinessScopeDictMapper.java
@@ -0,0 +1,18 @@
+package com.subsidy.mapper;
+
+import com.subsidy.model.BusinessScopeDictDO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * 经营范围表 Mapper 接口
+ *
* 类目名称 Mapper 接口
@@ -12,7 +14,13 @@ import org.springframework.stereotype.Repository;
* @author DengMin
* @since 2021-10-11
*/
- @Repository
+@Repository
public interface CategoryMapper extends BaseMapper
+ * 证书-公司映射表 Mapper 接口
+ *
+ * 证书字典表 Mapper 接口
+ *
+ * Mapper 接口
+ *
+ * 学生报名证书表 Mapper 接口
+ *
+ * 报名条件表 Mapper 接口
+ *
+ * 证书类目字典表 Mapper 接口
+ *
+ * 证书-类型映射表 Mapper 接口
+ *
+ * Mapper 接口
+ *
+ * 班级类型字典表 Mapper 接口
+ *
* 企业字典表 Mapper 接口
@@ -19,15 +23,21 @@ import org.springframework.stereotype.Repository;
public interface CompanyDictMapper extends BaseMapper
+ * Mapper 接口
+ *
+ * 目录视频关系表 Mapper 接口
+ *
+ * 课程类目映射 Mapper 接口
+ *
+ * Mapper 接口
+ *
+ * 课程-岗位映射表 Mapper 接口
+ *
+ * 课程职级映射表 Mapper 接口
+ *
* 部门字典表 Mapper 接口
@@ -20,5 +19,4 @@ public interface DepartmentDictMapper extends BaseMapper
+ * 做题历史记录表 Mapper 接口
+ *
* 学生课程习题完成情况 Mapper 接口
@@ -12,7 +19,42 @@ import org.springframework.stereotype.Repository;
* @author DengMin
* @since 2021-10-15
*/
- @Repository
+@Repository
public interface ExerciseDoneResultMapper extends BaseMapper
+ * 行业字典表 Mapper 接口
+ *
* 课件表 Mapper 接口
@@ -15,4 +17,6 @@ import org.springframework.stereotype.Repository;
@Repository
public interface FileDictMapper extends BaseMapper
+ * 实名验证记录表 Mapper 接口
+ *
+ * 岗位表 Mapper 接口
+ *
+ * 岗位人员表 Mapper 接口
+ *
+ * Mapper 接口
+ *
+ * 审计表 Mapper 接口
+ *
+ * 审计表 Mapper 接口
+ *
+ * 试卷字典表 Mapper 接口
+ *
+ * 职级字典表 Mapper 接口
+ *
+ * 轮播图 Mapper 接口
+ *
- * 学生签到表 Mapper 接口
- *
+ * 视频库类目表 Mapper 接口
+ *
* 视频播放历史记录表 Mapper 接口
@@ -20,7 +29,72 @@ public interface VodPlayHistoryMapper extends BaseMapper
+ *
+ *
+ * 活跃度检测表
+ *
+ * 经营范围表
+ *
+ * 证书-公司映射表
+ *
+ * 证书字典表
+ *
+ *
+ *
+ * 学生报名证书表
+ *
+ * 报名条件表
+ *
+ * 证书类目字典表
+ *
+ * 证书-类型映射表
+ *
+ *
+ *
+ * 班级类型字典表
+ *
+ *
+ *
+ * 目录视频关系表
+ *
+ * 课程类目映射
+ *
+ *
+ *
+ * 课程-岗位映射表
+ *
+ * 课程职级映射表
+ *
+ * 做题历史记录表
+ *
+ * 行业字典表
+ *
+ * 实名验证记录表
+ *
+ * 岗位表
+ *
+ * 岗位人员表
+ *
* 学生表
@@ -26,9 +30,9 @@ public class MemberDO extends BaseModel {
private Long id;
/**
- * 部门id
+ * 公司id
*/
- private Long departmentId;
+ private Long companyId;
/**
* 账号
@@ -36,6 +40,11 @@ public class MemberDO extends BaseModel {
private String accountName;
/**
+ * 英文名
+ */
+ private String accountNameEn;
+
+ /**
* 姓名
*/
private String userName;
@@ -51,6 +60,22 @@ public class MemberDO extends BaseModel {
private String password;
/**
+ * 工号
+ */
+ private String workNo;
+
+ /**
+ * 入职时间
+ */
+ @JsonFormat
+ private String inductionDate;
+
+ /**
+ * 邮箱
+ */
+ private String email;
+
+ /**
* 性别
*/
private String gender;
@@ -61,11 +86,26 @@ public class MemberDO extends BaseModel {
private String image;
/**
+ * 人脸核验--照片
+ */
+ private String checkImage;
+
+ /**
+ * 采集时间
+ */
+ private LocalDateTime checkTime;
+
+ /**
* 身份证号
*/
private String idCard;
/**
+ * 第一次登录
+ */
+ private Integer firstLogin;
+
+ /**
* 状态
*/
private String status;
diff --git a/src/main/java/com/subsidy/model/MemberStudyLengthDO.java b/src/main/java/com/subsidy/model/MemberStudyLengthDO.java
new file mode 100644
index 0000000..3d1295b
--- /dev/null
+++ b/src/main/java/com/subsidy/model/MemberStudyLengthDO.java
@@ -0,0 +1,33 @@
+package com.subsidy.model;
+
+import com.subsidy.util.BaseModel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ *
+ *
+ * 审计表
+ *
+ * 审计表
+ *
+ * 试卷字典表
+ *
+ * 职级字典表
+ *
+ * 轮播图
+ *
+ * 视频库类目表
+ *
* 视频播放历史记录表
@@ -50,5 +52,12 @@ public class VodPlayHistoryDO extends BaseModel {
*/
private Integer playRecord;
+ /**
+ * 聚合
+ */
+ private Integer playCount;
+
+ private LocalDateTime playDate;
+
}
diff --git a/src/main/java/com/subsidy/mongodb/MongoController.java b/src/main/java/com/subsidy/mongodb/MongoController.java
new file mode 100644
index 0000000..ff92950
--- /dev/null
+++ b/src/main/java/com/subsidy/mongodb/MongoController.java
@@ -0,0 +1,68 @@
+//package com.subsidy.mongodb;
+//
+//import com.subsidy.util.MongoUtil;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.data.mongodb.core.MongoTemplate;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//@RestController
+//@RequestMapping("/mango")
+//public class MongoController {
+//
+//
+// @Autowired
+// private MongoTemplate mongoTemplate;
+//
+// @Autowired
+// private MongoUtil mongoUtil;
+//
+// @PostMapping("getOne")
+// public void getAll(){
+// ////Query query=new Query();
+// ////MongoDO user = mongoTemplate.getDb(query , MongoDO.class);
+// ////List
+ * 服务类
+ *
+ * 活跃度检测表 服务类
+ *
+ * 经营范围表 服务类
+ *
+ * 证书-公司映射表 服务类
+ *
+ * 证书字典表 服务类
+ *
+ * 服务类
+ *
+ * 学生报名证书表 服务类
+ *
+ * 报名条件表 服务类
+ *
+ * 证书类目字典表 服务类
+ *
+ * 证书-类型映射表 服务类
+ *
+ * 服务类
+ *
+ * 班级类型字典表 服务类
+ *
@@ -26,4 +31,8 @@ public interface CompanyDictService extends IService
+ * 服务类
+ *
+ * 目录视频关系表 服务类
+ *
+ * 课程类目映射 服务类
+ *
- * 班级成员映射表 服务类
+ * 服务类
*
+ * 课程-岗位映射表 服务类
+ *
+ * 课程职级映射表 服务类
+ *