ShenHailiang_branch
parent
1b60ce86be
commit
22d20a181a
@ -1,22 +1,23 @@
|
||||
package com.yf.exam.modules.sys.config.service;
|
||||
package com.yf.exam.modules.sys.config.service; // 包名:表示该类属于 sys.config.service 包
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yf.exam.modules.sys.config.dto.SysConfigDTO;
|
||||
import com.yf.exam.modules.sys.config.entity.SysConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.IService; // 导入 MyBatis-Plus 提供的 IService 接口,提供通用的数据库操作
|
||||
import com.yf.exam.modules.sys.config.dto.SysConfigDTO; // 导入 SysConfigDTO 类,封装系统配置的数据传输对象
|
||||
import com.yf.exam.modules.sys.config.entity.SysConfig; // 导入 SysConfig 实体类,表示系统配置
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 通用配置业务类
|
||||
* </p>
|
||||
*
|
||||
* @author 聪明笨狗
|
||||
* @since 2020-04-17 09:12
|
||||
*/
|
||||
public interface SysConfigService extends IService<SysConfig> {
|
||||
* <p>
|
||||
* 通用配置业务类
|
||||
* </p>
|
||||
* 该接口定义了与系统配置相关的业务逻辑方法
|
||||
*
|
||||
* @作者 聪明笨狗
|
||||
* @版本 2020-04-17 09:12
|
||||
*/
|
||||
public interface SysConfigService extends IService<SysConfig> { // SysConfigService 接口继承 MyBatis-Plus 的 IService 接口,提供 CRUD 操作
|
||||
|
||||
/**
|
||||
* 查找配置信息
|
||||
* @return
|
||||
* @return 返回系统配置的 DTO 对象
|
||||
*/
|
||||
SysConfigDTO find();
|
||||
SysConfigDTO find(); // 定义查找系统配置信息的方法,返回一个 SysConfigDTO 对象
|
||||
}
|
||||
|
@ -1,21 +1,30 @@
|
||||
package com.yf.exam.modules.sys.system.service.impl;
|
||||
package com.yf.exam.modules.sys.system.service.impl; // 包名:表示该类属于 sys.system.service.impl 包
|
||||
|
||||
import com.yf.exam.modules.sys.system.mapper.SysDictMapper;
|
||||
import com.yf.exam.modules.sys.system.service.SysDictService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yf.exam.modules.sys.system.mapper.SysDictMapper; // 导入 SysDictMapper 接口,用于操作数据字典
|
||||
import com.yf.exam.modules.sys.system.service.SysDictService; // 导入 SysDictService 接口,定义数据字典的业务逻辑
|
||||
import org.springframework.beans.factory.annotation.Autowired; // 导入 Spring 的 @Autowired 注解,用于自动注入依赖
|
||||
import org.springframework.stereotype.Service; // 导入 Spring 的 @Service 注解,用于标识该类为服务层组件
|
||||
|
||||
/**
|
||||
* SysDictServiceImpl 类提供了数据字典的业务逻辑实现
|
||||
* @author bool
|
||||
*/
|
||||
@Service
|
||||
public class SysDictServiceImpl implements SysDictService {
|
||||
@Service // Spring 注解,标识该类为服务层组件
|
||||
public class SysDictServiceImpl implements SysDictService { // 实现 SysDictService 接口
|
||||
|
||||
@Autowired
|
||||
@Autowired // 自动注入 SysDictMapper
|
||||
private SysDictMapper sysDictMapper;
|
||||
|
||||
/**
|
||||
* 查找数据字典
|
||||
* @param table 数据表名称
|
||||
* @param text 字段文本
|
||||
* @param key 字段键值
|
||||
* @param value 字段值
|
||||
* @return 返回字典数据的对应值
|
||||
*/
|
||||
@Override
|
||||
public String findDict(String table, String text, String key, String value) {
|
||||
return sysDictMapper.findDict(table, text, key, value);
|
||||
return sysDictMapper.findDict(table, text, key, value); // 调用 Mapper 层的方法查找字典数据
|
||||
}
|
||||
}
|
||||
|
@ -1,52 +1,51 @@
|
||||
package com.yf.exam.modules.user.book.dto;
|
||||
package com.yf.exam.modules.user.book.dto; // 包名:表示该类属于 user.book.dto 包
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel; // 导入 Swagger 的 ApiModel 注解,用于生成 API 文档中的模型描述
|
||||
import io.swagger.annotations.ApiModelProperty; // 导入 Swagger 的 ApiModelProperty 注解,用于描述模型的属性
|
||||
import lombok.Data; // 导入 Lombok 的 Data 注解,自动生成 getters、setters、toString 等方法
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable; // 导入 Serializable 接口,用于对象序列化
|
||||
import java.util.Date; // 导入 Date 类,用于处理日期数据
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 错题本请求类
|
||||
* </p>
|
||||
*
|
||||
* @author 聪明笨狗
|
||||
* @since 2020-05-27 17:56
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="错题本", description="错题本")
|
||||
public class UserBookDTO implements Serializable {
|
||||
* <p>
|
||||
* 错题本请求类
|
||||
* </p>
|
||||
* 用于封装错题本相关的数据请求
|
||||
*
|
||||
* @作者 聪明笨狗
|
||||
* @版本 2020-05-27 17:56
|
||||
*/
|
||||
@Data // Lombok 注解,自动生成常用的 getter、setter、toString、equals 和 hashCode 方法
|
||||
@ApiModel(value="错题本", description="错题本") // Swagger 注解,定义该类用于描述错题本
|
||||
public class UserBookDTO implements Serializable { // 实现 Serializable 接口,支持对象序列化
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L; // 定义序列化版本 UID
|
||||
|
||||
@ApiModelProperty(value = "ID", required=true) // Swagger 注解,描述属性的含义和是否必填
|
||||
private String id; // 错题本 ID
|
||||
|
||||
@ApiModelProperty(value = "ID", required=true)
|
||||
private String id;
|
||||
@ApiModelProperty(value = "考试ID", required=true) // Swagger 注解,描述考试 ID
|
||||
private String examId; // 关联的考试 ID
|
||||
|
||||
@ApiModelProperty(value = "考试ID", required=true)
|
||||
private String examId;
|
||||
@ApiModelProperty(value = "用户ID", required=true) // Swagger 注解,描述用户 ID
|
||||
private String userId; // 关联的用户 ID
|
||||
|
||||
@ApiModelProperty(value = "用户ID", required=true)
|
||||
private String userId;
|
||||
@ApiModelProperty(value = "题目ID", required=true) // Swagger 注解,描述题目 ID
|
||||
private String quId; // 关联的题目 ID
|
||||
|
||||
@ApiModelProperty(value = "题目ID", required=true)
|
||||
private String quId;
|
||||
@ApiModelProperty(value = "加入时间", required=true) // Swagger 注解,描述错题本的加入时间
|
||||
private Date createTime; // 错题本加入时间
|
||||
|
||||
@ApiModelProperty(value = "加入时间", required=true)
|
||||
private Date createTime;
|
||||
@ApiModelProperty(value = "最近错误时间", required=true) // Swagger 注解,描述最近一次错误的时间
|
||||
private Date updateTime; // 最近一次错题的时间
|
||||
|
||||
@ApiModelProperty(value = "最近错误时间", required=true)
|
||||
private Date updateTime;
|
||||
@ApiModelProperty(value = "错误次数", required=true) // Swagger 注解,描述错题的错误次数
|
||||
private Integer wrongCount; // 错题的错误次数
|
||||
|
||||
@ApiModelProperty(value = "错误时间", required=true)
|
||||
private Integer wrongCount;
|
||||
|
||||
@ApiModelProperty(value = "题目标题", required=true)
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "错题序号", required=true)
|
||||
private Integer sort;
|
||||
@ApiModelProperty(value = "题目标题", required=true) // Swagger 注解,描述题目标题
|
||||
private String title; // 题目的标题
|
||||
|
||||
@ApiModelProperty(value = "错题序号", required=true) // Swagger 注解,描述错题的序号
|
||||
private Integer sort; // 错题的序号,用于排序
|
||||
}
|
@ -1,40 +1,41 @@
|
||||
package com.yf.exam.modules.user.book.service;
|
||||
package com.yf.exam.modules.user.book.service; // 包名:表示该接口属于 user.book.service 包
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yf.exam.core.api.dto.PagingReqDTO;
|
||||
import com.yf.exam.modules.user.book.dto.UserBookDTO;
|
||||
import com.yf.exam.modules.user.book.entity.UserBook;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; // 导入 MyBatis-Plus 的 IPage 接口,用于分页查询
|
||||
import com.baomidou.mybatisplus.extension.service.IService; // 导入 MyBatis-Plus 的 IService 接口,提供常用的 CRUD 操作
|
||||
import com.yf.exam.core.api.dto.PagingReqDTO; // 导入分页请求数据传输对象
|
||||
import com.yf.exam.modules.user.book.dto.UserBookDTO; // 导入错题本 DTO 类,用于封装错题本的数据
|
||||
import com.yf.exam.modules.user.book.entity.UserBook; // 导入错题本实体类,映射数据库中的错题本表
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 错题本业务类
|
||||
* </p>
|
||||
*
|
||||
* @author 聪明笨狗
|
||||
* @since 2020-05-27 17:56
|
||||
*/
|
||||
public interface UserBookService extends IService<UserBook> {
|
||||
* <p>
|
||||
* 错题本业务类
|
||||
* </p>
|
||||
* 提供与错题本相关的业务逻辑方法
|
||||
*
|
||||
* @作者 聪明笨狗
|
||||
* @版本 2020-05-27 17:56
|
||||
*/
|
||||
public interface UserBookService extends IService<UserBook> { // 继承 MyBatis-Plus 的 IService 接口,提供基本的 CRUD 操作
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
* @param reqDTO
|
||||
* @return
|
||||
* 分页查询错题本数据
|
||||
* @param reqDTO 分页请求数据传输对象
|
||||
* @return 返回分页查询结果
|
||||
*/
|
||||
IPage<UserBookDTO> paging(PagingReqDTO<UserBookDTO> reqDTO);
|
||||
IPage<UserBookDTO> paging(PagingReqDTO<UserBookDTO> reqDTO); // 分页查询错题本数据
|
||||
|
||||
/**
|
||||
* 加入错题本
|
||||
* @param quId
|
||||
* @param examId
|
||||
* 将错题添加到错题本
|
||||
* @param examId 考试 ID
|
||||
* @param quId 题目 ID
|
||||
*/
|
||||
void addBook(String examId, String quId);
|
||||
void addBook(String examId, String quId); // 将指定的错题添加到错题本
|
||||
|
||||
/**
|
||||
* 查找第一个错题
|
||||
* @param quId
|
||||
* @param examId
|
||||
* @return
|
||||
* 查找下一个错题
|
||||
* @param quId 当前题目 ID
|
||||
* @param examId 当前考试 ID
|
||||
* @return 返回下一个错题的 ID
|
||||
*/
|
||||
String findNext(String examId, String quId);
|
||||
String findNext(String examId, String quId); // 查找下一个错题 ID
|
||||
}
|
||||
|
@ -1,50 +1,72 @@
|
||||
package com.yf.exam.modules.user.exam.dto;
|
||||
package com.yf.exam.modules.user.exam.dto; // 包名:表示该类属于 user.exam.dto 包
|
||||
|
||||
import com.yf.exam.core.annon.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.yf.exam.core.annon.Dict; // 导入 Dict 注解,用于字段的字典数据转换
|
||||
import io.swagger.annotations.ApiModel; // 导入 Swagger 注解,用于生成 API 文档中的描述
|
||||
import io.swagger.annotations.ApiModelProperty; // 导入 Swagger 注解,用于描述类字段
|
||||
import lombok.Data; // 导入 Lombok 的 Data 注解,用于自动生成 getter、setter 等方法
|
||||
import java.util.Date; // 导入 Date 类,用于处理时间
|
||||
import java.io.Serializable; // 导入 Serializable 接口,确保该类可以序列化
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 考试记录数据传输类
|
||||
* </p>
|
||||
*
|
||||
* @author 聪明笨狗
|
||||
* @since 2020-09-21 15:13
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="考试记录", description="考试记录")
|
||||
public class UserExamDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
* <p>
|
||||
* 考试记录数据传输类
|
||||
* </p>
|
||||
* 用于封装考试记录相关数据
|
||||
*
|
||||
* @作者 聪明笨狗
|
||||
* @版本 2020-09-21 15:13
|
||||
*/
|
||||
@Data // Lombok 注解,自动为类生成 getter、setter、toString 等方法
|
||||
@ApiModel(value="考试记录", description="考试记录") // Swagger 注解,描述该类的作用,生成 API 文档时使用
|
||||
public class UserExamDTO implements Serializable { // 实现 Serializable 接口,使该类可以序列化
|
||||
|
||||
private String id;
|
||||
private static final long serialVersionUID = 1L; // 序列化版本 UID
|
||||
|
||||
@ApiModelProperty(value = "用户ID", required=true)
|
||||
private String userId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String id; // 用户ID字段
|
||||
|
||||
@Dict(dictTable = "el_exam", dicText = "title", dicCode = "id")
|
||||
@ApiModelProperty(value = "考试ID", required=true)
|
||||
private String examId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private String userId; // 用户ID字段
|
||||
|
||||
@ApiModelProperty(value = "考试次数", required=true)
|
||||
private Integer tryCount;
|
||||
/**
|
||||
* 考试ID
|
||||
*/
|
||||
@Dict(dictTable = "el_exam", dicText = "title", dicCode = "id") // 使用 Dict 注解,指定字典表及映射字段
|
||||
@ApiModelProperty(value = "考试ID", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private String examId; // 考试ID字段
|
||||
|
||||
@ApiModelProperty(value = "最高分数", required=true)
|
||||
private Integer maxScore;
|
||||
/**
|
||||
* 考试次数
|
||||
*/
|
||||
@ApiModelProperty(value = "考试次数", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private Integer tryCount; // 考试次数字段
|
||||
|
||||
@ApiModelProperty(value = "是否通过", required=true)
|
||||
private Boolean passed;
|
||||
/**
|
||||
* 最高分数
|
||||
*/
|
||||
@ApiModelProperty(value = "最高分数", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private Integer maxScore; // 最高分数字段
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 是否通过
|
||||
*/
|
||||
@ApiModelProperty(value = "是否通过", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private Boolean passed; // 是否通过字段
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间") // Swagger 注解,描述字段的作用
|
||||
private Date createTime; // 创建时间字段
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间") // Swagger 注解,描述字段的作用
|
||||
private Date updateTime; // 更新时间字段
|
||||
}
|
||||
|
@ -1,30 +1,34 @@
|
||||
package com.yf.exam.modules.user.exam.dto.request;
|
||||
package com.yf.exam.modules.user.exam.dto.request; // 包名:表示该类属于 user.exam.dto.request 包
|
||||
|
||||
import com.yf.exam.modules.user.exam.dto.UserExamDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import com.yf.exam.modules.user.exam.dto.UserExamDTO; // 导入 UserExamDTO 类,作为父类,包含通用的考试记录信息
|
||||
import io.swagger.annotations.ApiModel; // 导入 Swagger 注解,用于生成 API 文档中的描述
|
||||
import io.swagger.annotations.ApiModelProperty; // 导入 Swagger 注解,用于描述类字段
|
||||
import lombok.Data; // 导入 Lombok 的 Data 注解,用于自动生成 getter、setter 等方法
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 考试记录数据传输类
|
||||
* </p>
|
||||
*
|
||||
* @author 聪明笨狗
|
||||
* @since 2020-09-21 15:13
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="考试记录", description="考试记录")
|
||||
public class UserExamReqDTO extends UserExamDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "考试名称", required=true)
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "人员名称", required=true)
|
||||
private String realName;
|
||||
|
||||
|
||||
* <p>
|
||||
* 考试记录数据传输类
|
||||
* </p>
|
||||
* 用于封装请求中的考试记录数据
|
||||
*
|
||||
* @作者 聪明笨狗
|
||||
* @版本 2020-09-21 15:13
|
||||
*/
|
||||
@Data // Lombok 注解,自动为类生成 getter、setter、toString 等方法
|
||||
@ApiModel(value="考试记录", description="考试记录") // Swagger 注解,描述该类的作用,生成 API 文档时使用
|
||||
public class UserExamReqDTO extends UserExamDTO { // 继承 UserExamDTO 类,扩展额外的请求字段
|
||||
|
||||
private static final long serialVersionUID = 1L; // 序列化版本 UID
|
||||
|
||||
/**
|
||||
* 考试名称
|
||||
*/
|
||||
@ApiModelProperty(value = "考试名称", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private String title; // 考试名称字段
|
||||
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
@ApiModelProperty(value = "人员名称", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private String realName; // 人员名称字段
|
||||
}
|
||||
|
@ -1,29 +1,34 @@
|
||||
package com.yf.exam.modules.user.exam.dto.response;
|
||||
package com.yf.exam.modules.user.exam.dto.response; // 包名:表示该类属于 user.exam.dto.response 包
|
||||
|
||||
import com.yf.exam.modules.user.exam.dto.UserExamDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import com.yf.exam.modules.user.exam.dto.UserExamDTO; // 导入 UserExamDTO 类,作为父类,包含通用的考试记录信息
|
||||
import io.swagger.annotations.ApiModel; // 导入 Swagger 注解,用于生成 API 文档中的描述
|
||||
import io.swagger.annotations.ApiModelProperty; // 导入 Swagger 注解,用于描述类字段
|
||||
import lombok.Data; // 导入 Lombok 的 Data 注解,用于自动生成 getter、setter 等方法
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 考试记录数据传输类
|
||||
* </p>
|
||||
*
|
||||
* @author 聪明笨狗
|
||||
* @since 2020-09-21 15:13
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="考试记录", description="考试记录")
|
||||
public class UserExamRespDTO extends UserExamDTO {
|
||||
* <p>
|
||||
* 考试记录数据传输类
|
||||
* </p>
|
||||
* 用于封装响应中的考试记录数据
|
||||
*
|
||||
* @作者 聪明笨狗
|
||||
* @版本 2020-09-21 15:13
|
||||
*/
|
||||
@Data // Lombok 注解,自动为类生成 getter、setter、toString 等方法
|
||||
@ApiModel(value="考试记录", description="考试记录") // Swagger 注解,描述该类的作用,生成 API 文档时使用
|
||||
public class UserExamRespDTO extends UserExamDTO { // 继承 UserExamDTO 类,扩展额外的响应字段
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L; // 序列化版本 UID
|
||||
|
||||
/**
|
||||
* 考试名称
|
||||
*/
|
||||
@ApiModelProperty(value = "考试名称", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private String title; // 考试名称字段
|
||||
|
||||
@ApiModelProperty(value = "考试名称", required=true)
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "人员名称", required=true)
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
@ApiModelProperty(value = "人员名称", required=true) // Swagger 注解,描述字段的作用,设置为必填项
|
||||
private String realName; // 人员名称字段
|
||||
}
|
||||
|
@ -1,69 +1,72 @@
|
||||
package com.yf.exam.modules.user.exam.entity;
|
||||
package com.yf.exam.modules.user.exam.entity; // 包名:表示该类属于 user.exam.entity 包
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType; // 导入 MyBatis-Plus 注解,用于指定主键策略
|
||||
import com.baomidou.mybatisplus.annotation.TableField; // 导入 MyBatis-Plus 注解,用于指定数据库表字段
|
||||
import com.baomidou.mybatisplus.annotation.TableId; // 导入 MyBatis-Plus 注解,用于指定主键字段
|
||||
import com.baomidou.mybatisplus.annotation.TableName; // 导入 MyBatis-Plus 注解,用于指定数据库表名
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model; // 导入 MyBatis-Plus 提供的 Model 类,用于增强实体类
|
||||
import lombok.Data; // 导入 Lombok 注解,用于自动生成 getter、setter 等方法
|
||||
import java.util.Date; // 导入 Date 类,用于处理时间
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 考试记录实体类
|
||||
* </p>
|
||||
*
|
||||
* @author 聪明笨狗
|
||||
* @since 2020-09-21 15:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("el_user_exam")
|
||||
public class UserExam extends Model<UserExam> {
|
||||
* <p>
|
||||
* 考试记录实体类
|
||||
* </p>
|
||||
* 用于映射数据库中的考试记录表
|
||||
*
|
||||
* @作者 聪明笨狗
|
||||
* @版本 2020-09-21 15:13
|
||||
*/
|
||||
@Data // Lombok 注解,自动为类生成 getter、setter、toString 等方法
|
||||
@TableName("el_user_exam") // MyBatis-Plus 注解,指定该实体类对应的数据库表名为 "el_user_exam"
|
||||
public class UserExam extends Model<UserExam> { // 继承 Model 类,提供额外的 MyBatis-Plus 功能
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L; // 序列化版本 UID
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID) // MyBatis-Plus 注解,指定主键字段为 "id",主键类型为 "ASSIGN_ID"
|
||||
private String id; // ID字段
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
@TableField("user_id") // MyBatis-Plus 注解,指定数据库字段 "user_id" 对应实体类的 "userId" 字段
|
||||
private String userId; // 用户ID字段
|
||||
|
||||
/**
|
||||
* 考试ID
|
||||
*/
|
||||
@TableField("exam_id")
|
||||
private String examId;
|
||||
@TableField("exam_id") // MyBatis-Plus 注解,指定数据库字段 "exam_id" 对应实体类的 "examId" 字段
|
||||
private String examId; // 考试ID字段
|
||||
|
||||
/**
|
||||
* 考试次数
|
||||
*/
|
||||
@TableField("try_count")
|
||||
private Integer tryCount;
|
||||
@TableField("try_count") // MyBatis-Plus 注解,指定数据库字段 "try_count" 对应实体类的 "tryCount" 字段
|
||||
private Integer tryCount; // 考试次数字段
|
||||
|
||||
/**
|
||||
* 最高分数
|
||||
*/
|
||||
@TableField("max_score")
|
||||
private Integer maxScore;
|
||||
@TableField("max_score") // MyBatis-Plus 注解,指定数据库字段 "max_score" 对应实体类的 "maxScore" 字段
|
||||
private Integer maxScore; // 最高分数字段
|
||||
|
||||
/**
|
||||
* 是否通过
|
||||
*/
|
||||
private Boolean passed;
|
||||
private Boolean passed; // 是否通过字段
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private Date createTime;
|
||||
@TableField("create_time") // MyBatis-Plus 注解,指定数据库字段 "create_time" 对应实体类的 "createTime" 字段
|
||||
private Date createTime; // 创建时间字段
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField("update_time") // MyBatis-Plus 注解,指定数据库字段 "update_time" 对应实体类的 "updateTime" 字段
|
||||
private Date updateTime; // 更新时间字段
|
||||
}
|
||||
|
Loading…
Reference in new issue