【新增】模块exam,judgement并修改pom文件,新增rabbitmq依赖

This commit is contained in:
任维炳
2025-04-18 13:50:04 +08:00
parent f7948b935f
commit 72532b1a98
27 changed files with 235 additions and 133 deletions

View File

@@ -3,8 +3,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-module-exam</artifactId>
<groupId>pc.exam</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -18,9 +18,16 @@
<dependencies>
<dependency>
<groupId>pc.exam</groupId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-common</artifactId>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@@ -3,8 +3,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-module-exam</artifactId>
<groupId>pc.exam</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -17,48 +17,112 @@
</description>
<dependencies>
<!-- Spring Boot 核心 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-module-system-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-module-infra-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>pc.exam</groupId>
<artifactId>exam-module-exam-api</artifactId>
<version>${revision}</version>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-biz-tenant</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>pc.exam</groupId>
<artifactId>exam-spring-boot-starter-web</artifactId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>pc.exam</groupId>
<artifactId>exam-spring-boot-starter-security</artifactId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-websocket</artifactId>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>pc.exam</groupId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-mybatis</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId> <!-- 代码生成器,使用它解析表结构 -->
</dependency>
<dependency>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-redis</artifactId>
</dependency>
<!-- Config 配置中心相关 -->
<!-- Job 定时任务相关 -->
<dependency>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-job</artifactId>
</dependency>
<!-- 消息队列相关 -->
<dependency>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-mq</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>pc.exam</groupId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>pc.exam</groupId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId> <!-- 实现代码生成 -->
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>pc.exam.gg</groupId>
<artifactId>exam-spring-boot-starter-monitor</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
</dependency>
<!-- 三方云服务相关 -->
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId> <!-- 文件客户端:解决 ftp 连接 -->
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId> <!-- 文件客户端:解决 sftp 连接 -->
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId><!-- 文件客户端解决阿里云、腾讯云、minio 等 S3 连接 -->
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId> <!-- 文件客户端:文件类型的识别 -->
</dependency>
</dependencies>
</project>

View File

@@ -1,84 +1,14 @@
package pc.exam.pp.module.exam.controller.admin;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import pc.exam.pp.framework.common.pojo.CommonResult;
import pc.exam.pp.framework.common.pojo.PageResult;
import pc.exam.pp.module.exam.controller.admin.vo.ExamPageReqVO;
import pc.exam.pp.module.exam.dal.dataobject.ExamDO;
import pc.exam.pp.module.exam.service.ExamService;
import static pc.exam.pp.framework.common.pojo.CommonResult.success;
/**
* 管理后台 - 考试信息
* 管理后台 - 授权信息
*
* @author pengchen
*/
@RestController
@RequestMapping("/exam")
@RequestMapping("/exam/authorize")
public class ExamController {
@Resource
private ExamService examService;
/**
* 创建考试
*
* @param createReqVO 创建信息
* @return 考试编号
*/
@PostMapping("/create")
public CommonResult<Long> createExam(@Valid @RequestBody ExamDO createReqVO) {
return success(examService.createExam(createReqVO));
}
/**
* 更新考试
*
* @param updateReqVO 更新信息
* @return 成功状态
*/
@PutMapping("/update")
public CommonResult<Boolean> updateExam(@Valid @RequestBody ExamDO updateReqVO) {
examService.updateExam(updateReqVO);
return success(true);
}
/**
* 删除考试
*
* @param id 编号
* @return 成功状态
*/
@DeleteMapping("/delete")
public CommonResult<Boolean> deleteExam(@RequestParam("id") Long id) {
examService.deleteExam(id);
return success(true);
}
/**
* 获得考试
*
* @param id 编号
* @return 考试
*/
@GetMapping("/get")
public CommonResult<ExamDO> getExam(@RequestParam("id") Long id) {
return success(examService.getExam(id));
}
/**
* 获得考试分页
*
* @param pageVO 分页查询
* @return 考试分页
*/
@GetMapping("/page")
public CommonResult<PageResult<ExamDO>> getExamPage(@Valid ExamPageReqVO pageVO) {
return success(examService.getExamPage(pageVO));
}
}

View File

@@ -3,8 +3,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pengchen-exam-java-new</artifactId>
<groupId>pc.exam</groupId>
<groupId>pc.exam.gg</groupId>
<artifactId>exam</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>