diff --git a/exam-admin/src/main/java/com/yf/exam/ability/shiro/jwt/JwtUtils.java b/exam-admin/src/main/java/com/yf/exam/ability/shiro/jwt/JwtUtils.java index 4a66759..942bdc9 100644 --- a/exam-admin/src/main/java/com/yf/exam/ability/shiro/jwt/JwtUtils.java +++ b/exam-admin/src/main/java/com/yf/exam/ability/shiro/jwt/JwtUtils.java @@ -69,7 +69,7 @@ public class JwtUtils { public static String sign(String username) { Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME); Algorithm algorithm = Algorithm.HMAC256(encryptSecret(username)); - // 附带username信息 + // 附带username信息ExpiredJwtException return JWT.create() .withClaim("username", username) .withExpiresAt(date).sign(algorithm); diff --git a/exam-admin/src/main/java/com/yf/exam/ability/upload/config/UploadPathConfig.java b/exam-admin/src/main/java/com/yf/exam/ability/upload/config/UploadPathConfig.java new file mode 100644 index 0000000..fd12a1e --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/ability/upload/config/UploadPathConfig.java @@ -0,0 +1,52 @@ +package com.yf.exam.ability.upload.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * @description: 上传文件存放路径配置 + * @author: haown + * @create: 2025-07-11 15:21 + **/ +@Data +@Configuration +@ConfigurationProperties(prefix = "conf.folder") +public class UploadPathConfig { + + /** + * 身份证正面照片路径上传 + */ + private String cardFrontUrl; + + /** + * 身份证背面照片路径上传 + */ + private String cardBackUrl; + + /** + * 身份证正反面复印件 + */ + private String cardCopyUrl; + + /** + * 证件照 + */ + private String photoUrl; + + /** + * 学历证明 + */ + private String certificateUrl; + + /** + * 体检报告 + */ + private String physicalReportUrl; + + /** + * 签名图片 + */ + private String signPictureUrl; + +} diff --git a/exam-admin/src/main/java/com/yf/exam/ability/upload/controller/UploadController.java b/exam-admin/src/main/java/com/yf/exam/ability/upload/controller/UploadController.java index 4c85250..d8b7035 100644 --- a/exam-admin/src/main/java/com/yf/exam/ability/upload/controller/UploadController.java +++ b/exam-admin/src/main/java/com/yf/exam/ability/upload/controller/UploadController.java @@ -36,7 +36,7 @@ public class UploadController extends BaseController { * @param reqDTO * @return */ - @PostMapping("/common/api/file/upload") + @PostMapping("/exam/api/file/upload") @ApiOperation(value = "文件上传", notes = "此接口较为特殊,参数都通过表单方式提交,而非JSON") public ApiRest upload(@ModelAttribute UploadReqDTO reqDTO) { // 上传并返回URL diff --git a/exam-admin/src/main/java/com/yf/exam/ability/upload/dto/UploadReqDTO.java b/exam-admin/src/main/java/com/yf/exam/ability/upload/dto/UploadReqDTO.java index df2f286..7630ff2 100644 --- a/exam-admin/src/main/java/com/yf/exam/ability/upload/dto/UploadReqDTO.java +++ b/exam-admin/src/main/java/com/yf/exam/ability/upload/dto/UploadReqDTO.java @@ -19,4 +19,7 @@ public class UploadReqDTO extends BaseDTO { @ApiModelProperty(value = "上传文件内容", required=true) private MultipartFile file; + @ApiModelProperty(value = "文件类型", required=true) + private String type; + } diff --git a/exam-admin/src/main/java/com/yf/exam/ability/upload/service/impl/UploadServiceImpl.java b/exam-admin/src/main/java/com/yf/exam/ability/upload/service/impl/UploadServiceImpl.java index ef70f40..3a17628 100644 --- a/exam-admin/src/main/java/com/yf/exam/ability/upload/service/impl/UploadServiceImpl.java +++ b/exam-admin/src/main/java/com/yf/exam/ability/upload/service/impl/UploadServiceImpl.java @@ -2,26 +2,28 @@ package com.yf.exam.ability.upload.service.impl; import com.yf.exam.ability.Constant; import com.yf.exam.ability.upload.config.UploadConfig; +import com.yf.exam.ability.upload.config.UploadPathConfig; import com.yf.exam.ability.upload.dto.UploadReqDTO; import com.yf.exam.ability.upload.dto.UploadRespDTO; import com.yf.exam.ability.upload.service.UploadService; import com.yf.exam.ability.upload.utils.FileUtils; +import com.yf.exam.constant.Constants; import com.yf.exam.core.exception.ServiceException; -import lombok.extern.log4j.Log4j2; -import org.apache.commons.io.FilenameUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.FileCopyUtils; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import com.yf.exam.core.utils.StringUtils; import java.io.FileOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.regex.Matcher; import java.util.regex.Pattern; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import lombok.extern.log4j.Log4j2; +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.multipart.MultipartFile; /** @@ -35,11 +37,15 @@ public class UploadServiceImpl implements UploadService { @Autowired private UploadConfig conf; + @Autowired + private UploadPathConfig uploadPathConfig; @Override public UploadRespDTO upload(UploadReqDTO reqDTO) { - + if(StringUtils.isBlank(reqDTO.getType())){ + throw new ServiceException("请选择所要上传的路径类型"); + } // 文件内容 MultipartFile file = reqDTO.getFile(); @@ -50,6 +56,36 @@ public class UploadServiceImpl implements UploadService { } // 上传文件夹 String fileDir = conf.getDir(); + switch (reqDTO.getType()) { + //身份证正面上传 + case Constants.card_front_type: + fileDir += uploadPathConfig.getCardFrontUrl(); + break; + //身份证背面上传 + case Constants.card_back_type: + fileDir += uploadPathConfig.getCardBackUrl(); + break; + //身份证背面上传 + case Constants.card_copy_type: + fileDir += uploadPathConfig.getCardCopyUrl(); + break; + //证件照上传 + case Constants.photo_type: + fileDir += uploadPathConfig.getPhotoUrl(); + break; + //学历证明上传 + case Constants.certificate_type: + fileDir += uploadPathConfig.getCertificateUrl(); + break; + //体检报告上传 + case Constants.physical_report_type: + fileDir += uploadPathConfig.getPhysicalReportUrl(); + break; + //签名图片上传 + case Constants.sign_picture_type: + fileDir += uploadPathConfig.getSignPictureUrl(); + break; + } // 真实物理地址 String fullPath; try { diff --git a/exam-admin/src/main/java/com/yf/exam/ability/upload/utils/FileUtils.java b/exam-admin/src/main/java/com/yf/exam/ability/upload/utils/FileUtils.java index 539ecb0..3699ab5 100644 --- a/exam-admin/src/main/java/com/yf/exam/ability/upload/utils/FileUtils.java +++ b/exam-admin/src/main/java/com/yf/exam/ability/upload/utils/FileUtils.java @@ -1,17 +1,15 @@ package com.yf.exam.ability.upload.utils; import com.baomidou.mybatisplus.core.toolkit.IdWorker; -import com.yf.exam.core.utils.DateUtils; -import org.apache.commons.io.FilenameUtils; -import org.springframework.web.multipart.MultipartFile; - -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.util.Date; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.io.FilenameUtils; +import org.springframework.web.multipart.MultipartFile; /** * 文件工具类 @@ -145,9 +143,9 @@ public class FileUtils { fileName = renameFile(fileName); //获得上传的文件夹 - String dir = DateUtils.formatDate(new Date(), "yyyy/MM/dd/"); + //String dir = DateUtils.formatDate(new Date(), "yyyy/MM/dd/"); - return new StringBuffer(dir).append(fileName).toString(); + return new StringBuffer(fileName).toString(); } diff --git a/exam-admin/src/main/java/com/yf/exam/config/ShiroConfig.java b/exam-admin/src/main/java/com/yf/exam/config/ShiroConfig.java index cbb3f38..ca4d096 100644 --- a/exam-admin/src/main/java/com/yf/exam/config/ShiroConfig.java +++ b/exam-admin/src/main/java/com/yf/exam/config/ShiroConfig.java @@ -48,6 +48,7 @@ public class ShiroConfig { map.put("/exam/api/sys/user/login", "anon"); map.put("/exam/api/sys/user/reg", "anon"); map.put("/exam/api/sys/user/quick-reg", "anon"); + map.put("/exam/api/sys/user/info", "anon"); // 获取网站基本信息 map.put("/exam/api/sys/config/detail", "anon"); diff --git a/exam-admin/src/main/java/com/yf/exam/constant/Constants.java b/exam-admin/src/main/java/com/yf/exam/constant/Constants.java new file mode 100644 index 0000000..c91a1ea --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/constant/Constants.java @@ -0,0 +1,47 @@ +package com.yf.exam.constant; + +/** + * 通用常量信息 + * + * @author haoen + */ +public class Constants { + + /** + * 身份证正面照片路径上传 + */ + public static final String card_front_type = "cardFrontUrl"; + + /** + * 身份证背面照片路径上传 + */ + public static final String card_back_type = "cardBackUrl"; + + /** + * 身份证正反面复印件路径上传 + */ + public static final String card_copy_type = "cardCopyUrl"; + + /** + * 证件照路径上传 + */ + public static final String photo_type = "photoUrl"; + + /** + * 学历证明 + */ + public static final String certificate_type = "certificateUrl"; + + /** + * 健康体检报告 + */ + public static final String physical_report_type = "physicalReportUrl"; + + /** + * 签字照片 + */ + public static final String sign_picture_type = "signPictureUrl"; + + + +} diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/controller/ExamController.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/controller/ExamController.java index e5583f2..a05407c 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/exam/controller/ExamController.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/controller/ExamController.java @@ -16,6 +16,8 @@ import com.yf.exam.modules.exam.entity.Exam; import com.yf.exam.modules.exam.service.ExamService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import java.util.Date; +import java.util.List; import org.apache.shiro.authz.annotation.RequiresRoles; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; @@ -23,8 +25,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; -import java.util.Date; - /** *

* 考试控制器 @@ -103,11 +103,11 @@ public class ExamController extends BaseController { /** - * 分页查找 + * 模拟考试列表 * @param reqDTO * @return */ - @ApiOperation(value = "考试视角") + @ApiOperation(value = "模拟考试列表") @RequestMapping(value = "/online-paging", method = { RequestMethod.POST}) public ApiRest> myPaging(@RequestBody PagingReqDTO reqDTO) { @@ -147,5 +147,17 @@ public class ExamController extends BaseController { return super.success(page); } + /** + * 查询可考试列表 + * @param reqDTO + * @return + */ + @ApiOperation(value = "查询可考试列表") + @RequestMapping(value = "/getExamList", method = { RequestMethod.GET}) + public ApiRest getExamList(ExamDTO reqDTO) { + List list = baseService.getExamList(reqDTO); + return super.success(list); + } + } diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/controller/ExamRegistrationController.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/controller/ExamRegistrationController.java new file mode 100644 index 0000000..f6d04d1 --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/controller/ExamRegistrationController.java @@ -0,0 +1,40 @@ +package com.yf.exam.modules.exam.controller; + +import com.yf.exam.core.api.ApiRest; +import com.yf.exam.core.api.controller.BaseController; +import com.yf.exam.modules.exam.dto.ExamRegistrationDTO; +import com.yf.exam.modules.exam.service.ExamRegistrationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/** + * @description: 考试报名控制器 + * @author: haown + * @create: 2025-07-11 10:14 + **/ +@Api(tags={"考试报名"}) +@RestController +@RequestMapping("/exam/api/exam/registration") +public class ExamRegistrationController extends BaseController { + + @Autowired + private ExamRegistrationService baseService; + + /** + * 添加或修改 + * @param reqDTO + * @return + */ + @ApiOperation(value = "添加或修改") + @RequestMapping(value = "/save", method = { RequestMethod.POST}) + public ApiRest save(@RequestBody ExamRegistrationDTO reqDTO) { + //复制参数 + baseService.save(reqDTO); + return super.success(); + } +} diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/dto/ExamDTO.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/dto/ExamDTO.java index 90f86f1..03511eb 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/exam/dto/ExamDTO.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/dto/ExamDTO.java @@ -4,12 +4,14 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.yf.exam.modules.paper.enums.ExamState; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.Date; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; -import java.io.Serializable; -import java.util.Date; - /** *

* 考试数据传输类 @@ -38,21 +40,44 @@ public class ExamDTO implements Serializable { @ApiModelProperty(value = "1公开2部门3定员", required=true) private Integer openType; - @ApiModelProperty(value = "考试状态", required=true) + /** + * 考试类型(1:模拟考试,2:正式考试) + * */ + @ApiModelProperty(value = "考试类型(1:模拟考试,2:正式考试)", required=true) + private Integer examType; + + + @ApiModelProperty(value = "考试状态", required=true) private Integer state; @ApiModelProperty(value = "是否限时", required=true) private Boolean timeLimit; - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "开始时间", required=true) - private Date startTime; + /** + * 开始日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "开始日期", required=true) + private LocalDate startDate; - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") + /** + * 结束日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "结束日期", required=true) + private LocalDate endDate; + + @JsonFormat(timezone = "GMT+8", pattern = "HH:mm") + @DateTimeFormat(pattern = "HH:mm") + @ApiModelProperty(value = "开始时间", required=true) + private LocalTime startTime; + + @JsonFormat(timezone = "GMT+8", pattern = "HH:mm") + @DateTimeFormat(pattern = "HH:mm") @ApiModelProperty(value = "结束时间", required=true) - private Date endTime; + private LocalTime endTime; @ApiModelProperty(value = "创建时间", required=true) private Date createTime; @@ -69,7 +94,11 @@ public class ExamDTO implements Serializable { @ApiModelProperty(value = "及格分数", required=true) private Integer qualifyScore; - + /** + * 考试费用 + */ + @ApiModelProperty(value = "考试费用", required=true) + private BigDecimal examFee; /** @@ -80,16 +109,16 @@ public class ExamDTO implements Serializable { if(this.timeLimit!=null && this.timeLimit){ - if(System.currentTimeMillis() < startTime.getTime() ){ + if(startDate.isAfter(LocalDate.now())){ return ExamState.READY_START; } - if(System.currentTimeMillis() > endTime.getTime()){ + if(endDate.isBefore(LocalDate.now())){ return ExamState.OVERDUE; } - if(System.currentTimeMillis() > startTime.getTime() - && System.currentTimeMillis() < endTime.getTime() + if(startDate.isBefore(LocalDate.now()) + && endDate.isAfter(LocalDate.now()) && !ExamState.DISABLED.equals(this.state)){ return ExamState.ENABLE; } diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/dto/ExamRegistrationDTO.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/dto/ExamRegistrationDTO.java new file mode 100644 index 0000000..5282461 --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/dto/ExamRegistrationDTO.java @@ -0,0 +1,173 @@ +package com.yf.exam.modules.exam.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.time.LocalDate; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @description: 考试报名数据传输类 + * @author: haown + * @create: 2025-07-11 10:05 + **/ +@Data +@ApiModel(value="报名", description="报名") +public class ExamRegistrationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @ApiModelProperty(value = "ID", required=true) + private String id; + + /** + * 用户主键 + */ + @ApiModelProperty(value = "用户主键", required=true) + private String userId; + + /** + * 用户名(考生账号的用户名是身份证号) + */ + @ApiModelProperty(value = "用户名(考生账号的用户名是身份证号)", required=true) + private String userName; + + /** + * 真实姓名 + */ + @ApiModelProperty(value = "姓名", required=true) + private String realName; + + /** + * 手机号 + */ + @ApiModelProperty(value = "手机号", required=true) + private String phone; + + /** + * 考试表主键 + */ + @ApiModelProperty(value = "考试表主键", required=true) + private String examId; + + /** + * 考试名称 + */ + @ApiModelProperty(value = "考试名称", required=true) + private String title; + + /** + * 电子邮箱 + */ + @ApiModelProperty(value = "电子邮箱", required=true) + private String email; + + /** + * 通讯地址 + */ + @ApiModelProperty(value = "通讯地址", required=true) + private String address; + + /** + * 最高学历,1:初中,2:高中/中专,3:大专及以上 + */ + @ApiModelProperty(value = "最高学历,1:初中,2:高中/中专,3:大专及以上", required=true) + private Integer education; + + /** + * 毕业院校 + */ + @ApiModelProperty(value = "毕业院校", required=true) + private String graduateSchool; + + /** + * 专业 + */ + @ApiModelProperty(value = "专业", required=true) + private String major; + + /** + * 报考类别(1:普通医疗护理员,2:老年医疗护理员,3:孕产妇和新生儿医疗护理员) + */ + @ApiModelProperty(value = "报考类别(1:普通医疗护理员,2:老年医疗护理员,3:孕产妇和新生儿医疗护理员)", required=true) + private Integer regType; + + /** + * 培训机构 + */ + @ApiModelProperty(value = "培训机构") + private String trainInstitution; + + /** + * 培训开始时间 + */ + @ApiModelProperty(value = "培训开始时间") + private LocalDate trainStartDate; + + /** + * 培训结束时间 + */ + @ApiModelProperty(value = "培训结束时间") + private LocalDate trainEndDate; + + /** + * 身份证正面照片 + */ + @ApiModelProperty(value = "身份证正面照片") + private String cardFront; + + /** + * 身份证背面照片 + */ + @ApiModelProperty(value = "身份证背面照片") + private String cardBack; + + /** + * 身份证正反面复印件 + */ + @ApiModelProperty(value = "身份证正反面复印件") + private String cardCopy; + + /** + * 证件照 + */ + @ApiModelProperty(value = "证件照", required=true) + private String photo; + + /** + * 学历证明 + */ + @ApiModelProperty(value = "学历证明", required=true) + private String certificate; + + /** + * 健康体检报告 + */ + @ApiModelProperty(value = "健康体检报告", required=true) + private String physicalReport; + + /** + * 签名图片 + */ + @ApiModelProperty(value = "签名图片", required=true) + private String signPicture; + + /** + * 报名时间 + */ + @ApiModelProperty(value = "报名时间", required=true) + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate regTime; + + /** + * 考试状态(0:未考试,1:已考试) + */ + @ApiModelProperty(value = "考试状态(0:未考试,1:已考试)", required=true) + private Integer examState; +} diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/entity/Exam.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/entity/Exam.java index e198c69..6aea68e 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/exam/entity/Exam.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/entity/Exam.java @@ -5,8 +5,11 @@ 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.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalTime; import java.util.Date; +import lombok.Data; /** *

@@ -44,6 +47,11 @@ public class Exam extends Model { @TableField("open_type") private Integer openType; + /** + * 考试类型(1:模拟考试,2:正式考试) + * */ + private Integer examType; + /** * 考试状态 */ @@ -55,17 +63,29 @@ public class Exam extends Model { @TableField("time_limit") private Boolean timeLimit; + /** + * 开始日期 + */ + @TableField("start_date") + private LocalDate startDate; + + /** + * 结束日期 + */ + @TableField("end_date") + private LocalDate endDate; + /** * 开始时间 */ @TableField("start_time") - private Date startTime; + private LocalTime startTime; /** * 结束时间 */ @TableField("end_time") - private Date endTime; + private LocalTime endTime; /** * 创建时间 @@ -96,5 +116,11 @@ public class Exam extends Model { */ @TableField("qualify_score") private Integer qualifyScore; + + /** + * 考试费用 + */ + @TableField("exam_fee") + private BigDecimal examFee; } diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/entity/ExamRegistration.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/entity/ExamRegistration.java new file mode 100644 index 0000000..ff444d7 --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/entity/ExamRegistration.java @@ -0,0 +1,166 @@ +package com.yf.exam.modules.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 java.time.LocalDate; +import java.util.Date; +import lombok.Data; + +/** + * @description: 考试报名信息表 + * @author: haown + * @create: 2025-07-11 09:31 + **/ +@Data +@TableName("el_exam_registration") +public class ExamRegistration extends Model { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + @TableId(value = "id", type = IdType.ASSIGN_ID) + private String id; + + /** + * 用户主键 + */ + @TableField("user_id") + private String userId; + + /** + * 用户名(考生账号的用户名是身份证号) + */ + @TableField("user_name") + private String userName; + + /** + * 真实姓名 + */ + @TableField("real_name") + private String realName; + + /** + * 手机号 + */ + @TableField("phone") + private String phone; + + /** + * 考试表主键 + */ + @TableField("exam_id") + private String examId; + + /** + * 考试名称 + */ + private String title; + + /** + * 电子邮箱 + */ + private String email; + + /** + * 通讯地址 + */ + private String address; + + /** + * 最高学历,1:初中,2:高中/中专,3:大专及以上 + */ + private Integer education; + + /** + * 毕业院校 + */ + private String graduateSchool; + + /** + * 专业 + */ + private String major; + + /** + * 报考类别(1:普通医疗护理员,2:老年医疗护理员,3:孕产妇和新生儿医疗护理员) + */ + private Integer regType; + + /** + * 培训机构 + */ + private String trainInstitution; + + /** + * 培训开始时间 + */ + private LocalDate trainStartDate; + + /** + * 培训结束时间 + */ + private LocalDate trainEndDate; + + /** + * 身份证正面照片 + */ + private String cardFront; + + /** + * 身份证背面照片 + */ + private String cardBack; + + /** + * 身份证正反面复印件 + */ + private String cardCopy; + + /** + * 证件照 + */ + private String photo; + + /** + * 学历证明 + */ + private String certificate; + + /** + * 健康体检报告 + */ + private String physicalReport; + + /** + * 签名图片 + */ + private String signPicture; + + /** + * 报名时间 + */ + private LocalDate regTime; + + /** + * 考试状态(0:未考试,1:已考试) + */ + private Integer examState; + + /** + * 创建时间 + */ + @TableField("create_time") + private Date createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private Date updateTime; + +} diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/mapper/ExamMapper.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/mapper/ExamMapper.java index 1ce4504..1818107 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/exam/mapper/ExamMapper.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/mapper/ExamMapper.java @@ -4,9 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.yf.exam.modules.exam.dto.ExamDTO; -import com.yf.exam.modules.exam.dto.response.ExamReviewRespDTO; import com.yf.exam.modules.exam.dto.response.ExamOnlineRespDTO; +import com.yf.exam.modules.exam.dto.response.ExamReviewRespDTO; import com.yf.exam.modules.exam.entity.Exam; +import java.util.List; import org.apache.ibatis.annotations.Param; /** @@ -42,4 +43,11 @@ public interface ExamMapper extends BaseMapper { * @return */ IPage online(Page page, @Param("query") ExamDTO query); + + /** + * 查询可预约考试列表 + * @param query + * @return + */ + List getExamList(@Param("query") ExamDTO query); } diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/mapper/ExamRegistrationMapper.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/mapper/ExamRegistrationMapper.java new file mode 100644 index 0000000..57c6892 --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/mapper/ExamRegistrationMapper.java @@ -0,0 +1,15 @@ +package com.yf.exam.modules.exam.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yf.exam.modules.exam.entity.ExamRegistration; + +/** + *

+ * 考试报名Mapper + *

+ * + * @author haown + * @since 2025-07-11 10:25 + */ +public interface ExamRegistrationMapper extends BaseMapper { +} diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/service/ExamRegistrationService.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/ExamRegistrationService.java new file mode 100644 index 0000000..0147cb6 --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/ExamRegistrationService.java @@ -0,0 +1,22 @@ +package com.yf.exam.modules.exam.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.yf.exam.modules.exam.dto.ExamRegistrationDTO; +import com.yf.exam.modules.exam.entity.ExamRegistration; + +/** + *

+ * 考试报名业务类 + *

+ * + * @author haown + * @since 2025-07-11 10:20 + */ +public interface ExamRegistrationService extends IService { + + /** + * 保存报名信息 + * @param reqDTO + */ + void save(ExamRegistrationDTO reqDTO); +} diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/service/ExamService.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/ExamService.java index 3f75664..839aaf3 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/exam/service/ExamService.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/ExamService.java @@ -8,6 +8,7 @@ import com.yf.exam.modules.exam.dto.request.ExamSaveReqDTO; import com.yf.exam.modules.exam.dto.response.ExamOnlineRespDTO; import com.yf.exam.modules.exam.dto.response.ExamReviewRespDTO; import com.yf.exam.modules.exam.entity.Exam; +import java.util.List; /** *

@@ -61,4 +62,12 @@ public interface ExamService extends IService { * @return */ IPage reviewPaging(PagingReqDTO reqDTO); + + /** + * 查询可预约考试列表 + * @param reqDTO + * @return + */ + List getExamList(ExamDTO reqDTO); + } diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/service/impl/ExamRegistrationServiceImpl.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/impl/ExamRegistrationServiceImpl.java new file mode 100644 index 0000000..fd31980 --- /dev/null +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/impl/ExamRegistrationServiceImpl.java @@ -0,0 +1,38 @@ +package com.yf.exam.modules.exam.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.yf.exam.modules.exam.dto.ExamRegistrationDTO; +import com.yf.exam.modules.exam.entity.ExamRegistration; +import com.yf.exam.modules.exam.mapper.ExamRegistrationMapper; +import com.yf.exam.modules.exam.service.ExamRegistrationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +/** + * @description: 考试报名业务实现类 + * @author: haown + * @create: 2025-07-11 10:22 + **/ +@Service +public class ExamRegistrationServiceImpl extends ServiceImpl implements ExamRegistrationService { + + @Override + public void save(ExamRegistrationDTO reqDTO) { + // ID + String id = reqDTO.getId(); + + if(StringUtils.isBlank(id)){ + id = IdWorker.getIdStr(); + } + + //复制参数 + ExamRegistration entity = new ExamRegistration(); + + // 复制基本数据 + BeanUtils.copyProperties(reqDTO, entity); + entity.setId(id); + this.saveOrUpdate(entity); + } +} diff --git a/exam-admin/src/main/java/com/yf/exam/modules/exam/service/impl/ExamServiceImpl.java b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/impl/ExamServiceImpl.java index 7451bd9..f8f11bf 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/exam/service/impl/ExamServiceImpl.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/exam/service/impl/ExamServiceImpl.java @@ -19,7 +19,9 @@ import com.yf.exam.modules.exam.mapper.ExamMapper; import com.yf.exam.modules.exam.service.ExamDepartService; import com.yf.exam.modules.exam.service.ExamRepoService; import com.yf.exam.modules.exam.service.ExamService; +import java.time.LocalDate; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DuplicateKeyException; import org.springframework.stereotype.Service; @@ -62,7 +64,7 @@ public class ExamServiceImpl extends ServiceImpl implements Ex // 复制基本数据 - BeanMapper.copy(reqDTO, entity); + BeanUtils.copyProperties(reqDTO, entity); entity.setId(id); // 修复状态 @@ -152,8 +154,19 @@ public class ExamServiceImpl extends ServiceImpl implements Ex return pageData; } + /** + * 查询可预约考试列表 + * @param reqDTO + * @return + */ + @Override public List getExamList(ExamDTO reqDTO) { + reqDTO.setExamType(2); + reqDTO.setStartDate(LocalDate.now()); + List list = baseMapper.getExamList(reqDTO); + return list; + } - /** + /** * 计算分值 * @param reqDTO */ diff --git a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/controller/SysUserController.java b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/controller/SysUserController.java index 757c5e3..f570f0e 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/controller/SysUserController.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/controller/SysUserController.java @@ -59,7 +59,7 @@ public class SysUserController extends BaseController { * @return */ @CrossOrigin - @ApiOperation(value = "用户登录") + @ApiOperation(value = "用户退出") @RequestMapping(value = "/logout", method = {RequestMethod.POST}) public ApiRest logout(HttpServletRequest request) { String token = request.getHeader("token"); diff --git a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/SysUserDTO.java b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/SysUserDTO.java index e8831b3..0cf44b5 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/SysUserDTO.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/SysUserDTO.java @@ -2,10 +2,9 @@ package com.yf.exam.modules.sys.user.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - import java.io.Serializable; import java.util.Date; +import lombok.Data; /** *

@@ -31,6 +30,9 @@ public class SysUserDTO implements Serializable { @ApiModelProperty(value = "真实姓名", required=true) private String realName; + @ApiModelProperty(value = "手机号") + private String phone; + @ApiModelProperty(value = "密码", required=true) private String password; diff --git a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/response/SysUserLoginDTO.java b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/response/SysUserLoginDTO.java index 17362b5..320d820 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/response/SysUserLoginDTO.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/dto/response/SysUserLoginDTO.java @@ -31,6 +31,9 @@ public class SysUserLoginDTO implements Serializable { @ApiModelProperty(value = "真实姓名", required=true) private String realName; + @ApiModelProperty(value = "手机号", required=true) + private String phone; + @ApiModelProperty(value = "角色列表", required=true) private String roleIds; diff --git a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/entity/SysUser.java b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/entity/SysUser.java index 7651f68..852fb0d 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/entity/SysUser.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/entity/SysUser.java @@ -30,7 +30,7 @@ public class SysUser extends Model { private String id; /** - * 用户名 + * 用户名(考生账号的用户名是身份证号) */ @TableField("user_name") private String userName; @@ -41,6 +41,12 @@ public class SysUser extends Model { @TableField("real_name") private String realName; + /** + * 手机号 + */ + @TableField("phone") + private String phone; + /** * 密码 */ diff --git a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/service/impl/SysUserServiceImpl.java b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/service/impl/SysUserServiceImpl.java index 20290ea..9c1e536 100644 --- a/exam-admin/src/main/java/com/yf/exam/modules/sys/user/service/impl/SysUserServiceImpl.java +++ b/exam-admin/src/main/java/com/yf/exam/modules/sys/user/service/impl/SysUserServiceImpl.java @@ -192,7 +192,7 @@ public class SysUserServiceImpl extends ServiceImpl impl int count = this.count(wrapper); if(count > 0){ - throw new ServiceException(1, "用户名已存在,换一个吧!"); + throw new ServiceException(1, "您已注册过该系统,请直接登录!"); } @@ -201,6 +201,7 @@ public class SysUserServiceImpl extends ServiceImpl impl user.setId(IdWorker.getIdStr()); user.setUserName(reqDTO.getUserName()); user.setRealName(reqDTO.getRealName()); + user.setPhone(reqDTO.getPhone()); PassInfo passInfo = PassHandler.buildPassword(reqDTO.getPassword()); user.setPassword(passInfo.getPassword()); user.setSalt(passInfo.getSalt()); diff --git a/exam-admin/src/main/resources/application-dev.yml b/exam-admin/src/main/resources/application-dev.yml index 49877dc..088eb63 100644 --- a/exam-admin/src/main/resources/application-dev.yml +++ b/exam-admin/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://192.168.16.64:3306/yf_exam_lite?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true + url: jdbc:mysql://8.131.93.145:54081/yf_exam_lite?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true username: root password: 1qaz!@#$ # druid相关配置 @@ -54,13 +54,27 @@ spring: conf: upload: # 物理文件存储位置,以/结束,windows已正斜杠,如:d:/exam-upload/ - dir: /Users/van/Documents/work/upload/ + dir: D:/exam-upload/ # 访问地址,注意不要去除/upload/file/,此节点为虚拟标识符 # 如:http://localhost:8101/upload/file/exam.jpg,对应物理文件为:/data/upload/exam.jpg - url: http://localhost:8201/upload/file/ + url: http://8.131.93.145:54012/upload/file/ # 允许上传的文件后缀 allow-extensions: jpg,jpeg,png - + folder: + # 身份证正面存储文件夹名称 + card_front_url: cardfront/ + # 身份证背面存储文件夹名称 + card_back_url: cardback/ + # 身份证正反面复印件 + card_copy_url: cardcopy/ + # 证件照 + photo_url: photo/ + # 学历证明 + certificate_url: certificate/ + # 体检报告 + physical_report_url: physicalreport/ + # 签名图片 + sign_picture_url: signpicture/ # 开启文档 swagger: enable: true diff --git a/exam-admin/src/main/resources/application-local.yml b/exam-admin/src/main/resources/application-local.yml index df48055..5c0117c 100644 --- a/exam-admin/src/main/resources/application-local.yml +++ b/exam-admin/src/main/resources/application-local.yml @@ -88,9 +88,24 @@ conf: dir: /data/upload/ # 访问地址,注意不要去除/upload/file/,此节点为虚拟标识符 # 如:http://localhost:8101/upload/file/exam.jpg,对应物理文件为:/data/upload/exam.jpg - url: http://localhost:8101/upload/file/ + url: http://8.131.93.145:54012/upload/file/ # 允许上传的文件后缀 allow-extensions: jpg,jpeg,png + folder: + # 身份证正面存储文件夹名称 + card_front_url: cardfront/ + # 身份证背面存储文件夹名称 + card_back_url: cardback/ + # 身份证正反面复印件 + card_copy_url: cardcopy/ + # 证件照 + photo_url: photo/ + # 学历证明 + certificate_url: certificate/ + # 体检报告 + physical_report_url: physicalreport/ + # 签名图片 + sign_picture_url: signpicture/ # 开启文档 swagger: diff --git a/exam-admin/src/main/resources/mapper/exam/ExamMapper.xml b/exam-admin/src/main/resources/mapper/exam/ExamMapper.xml index 8203a3b..acb5c5e 100644 --- a/exam-admin/src/main/resources/mapper/exam/ExamMapper.xml +++ b/exam-admin/src/main/resources/mapper/exam/ExamMapper.xml @@ -10,8 +10,10 @@ - - + + + + @@ -21,7 +23,7 @@ - `id`,`title`,`content`,`open_type`,`join_type`,`level`,`state`,`time_limit`,`start_time`,`end_time`,`create_time`,`update_time`,`total_score`,`total_time`,`qualify_score` + `id`,`title`,`content`,`open_type`,`join_type`,`level`,`state`,`time_limit`,`start_date`,`end_date`,`start_time`,`end_time`,`create_time`,`update_time`,`total_score`,`total_time`,`qualify_score` @@ -49,11 +51,11 @@ AND open_type = #{query.openType} - - AND start_time >= #{query.startTime} + + AND start_date >= #{query.startDate} - - AND end_time <= #{query.endTime} + + AND end_date <= #{query.endDate} @@ -93,4 +95,23 @@ + + diff --git a/exam-admin/src/main/resources/mapper/exam/ExamRegistrationMapper.xml b/exam-admin/src/main/resources/mapper/exam/ExamRegistrationMapper.xml new file mode 100644 index 0000000..f2497af --- /dev/null +++ b/exam-admin/src/main/resources/mapper/exam/ExamRegistrationMapper.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id,user_id,user_name,real_name,phone,exam_id,title,email,address,education,graduate_school,major,reg_type, + train_institution,train_start_date,train_end_date,card_front,card_back,card_copy,photo,certificate,physical_report,sign_picture, + reg_time,exam_state,create_time,update_time + + + + diff --git a/exam-admin/src/main/resources/mapper/sys/user/SysUserMapper.xml b/exam-admin/src/main/resources/mapper/sys/user/SysUserMapper.xml index 7d9c81f..584251b 100644 --- a/exam-admin/src/main/resources/mapper/sys/user/SysUserMapper.xml +++ b/exam-admin/src/main/resources/mapper/sys/user/SysUserMapper.xml @@ -7,6 +7,7 @@ + @@ -18,7 +19,7 @@ - `id`,`user_name`,`real_name`,`password`,`salt`,`role_ids`,`depart_id`,`create_time`,`update_time`,`state` + `id`,`user_name`,`real_name`,phone,`password`,`salt`,`role_ids`,`depart_id`,`create_time`,`update_time`,`state` diff --git a/exam-admin/target/classes/application-dev.yml b/exam-admin/target/classes/application-dev.yml index 49877dc..088eb63 100644 --- a/exam-admin/target/classes/application-dev.yml +++ b/exam-admin/target/classes/application-dev.yml @@ -4,7 +4,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://192.168.16.64:3306/yf_exam_lite?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true + url: jdbc:mysql://8.131.93.145:54081/yf_exam_lite?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true username: root password: 1qaz!@#$ # druid相关配置 @@ -54,13 +54,27 @@ spring: conf: upload: # 物理文件存储位置,以/结束,windows已正斜杠,如:d:/exam-upload/ - dir: /Users/van/Documents/work/upload/ + dir: D:/exam-upload/ # 访问地址,注意不要去除/upload/file/,此节点为虚拟标识符 # 如:http://localhost:8101/upload/file/exam.jpg,对应物理文件为:/data/upload/exam.jpg - url: http://localhost:8201/upload/file/ + url: http://8.131.93.145:54012/upload/file/ # 允许上传的文件后缀 allow-extensions: jpg,jpeg,png - + folder: + # 身份证正面存储文件夹名称 + card_front_url: cardfront/ + # 身份证背面存储文件夹名称 + card_back_url: cardback/ + # 身份证正反面复印件 + card_copy_url: cardcopy/ + # 证件照 + photo_url: photo/ + # 学历证明 + certificate_url: certificate/ + # 体检报告 + physical_report_url: physicalreport/ + # 签名图片 + sign_picture_url: signpicture/ # 开启文档 swagger: enable: true diff --git a/exam-admin/target/classes/application-local.yml b/exam-admin/target/classes/application-local.yml index df48055..5c0117c 100644 --- a/exam-admin/target/classes/application-local.yml +++ b/exam-admin/target/classes/application-local.yml @@ -88,9 +88,24 @@ conf: dir: /data/upload/ # 访问地址,注意不要去除/upload/file/,此节点为虚拟标识符 # 如:http://localhost:8101/upload/file/exam.jpg,对应物理文件为:/data/upload/exam.jpg - url: http://localhost:8101/upload/file/ + url: http://8.131.93.145:54012/upload/file/ # 允许上传的文件后缀 allow-extensions: jpg,jpeg,png + folder: + # 身份证正面存储文件夹名称 + card_front_url: cardfront/ + # 身份证背面存储文件夹名称 + card_back_url: cardback/ + # 身份证正反面复印件 + card_copy_url: cardcopy/ + # 证件照 + photo_url: photo/ + # 学历证明 + certificate_url: certificate/ + # 体检报告 + physical_report_url: physicalreport/ + # 签名图片 + sign_picture_url: signpicture/ # 开启文档 swagger: diff --git a/exam-admin/target/classes/mapper/exam/ExamMapper.xml b/exam-admin/target/classes/mapper/exam/ExamMapper.xml index 8203a3b..acb5c5e 100644 --- a/exam-admin/target/classes/mapper/exam/ExamMapper.xml +++ b/exam-admin/target/classes/mapper/exam/ExamMapper.xml @@ -10,8 +10,10 @@ - - + + + + @@ -21,7 +23,7 @@ - `id`,`title`,`content`,`open_type`,`join_type`,`level`,`state`,`time_limit`,`start_time`,`end_time`,`create_time`,`update_time`,`total_score`,`total_time`,`qualify_score` + `id`,`title`,`content`,`open_type`,`join_type`,`level`,`state`,`time_limit`,`start_date`,`end_date`,`start_time`,`end_time`,`create_time`,`update_time`,`total_score`,`total_time`,`qualify_score` @@ -49,11 +51,11 @@ AND open_type = #{query.openType} - - AND start_time >= #{query.startTime} + + AND start_date >= #{query.startDate} - - AND end_time <= #{query.endTime} + + AND end_date <= #{query.endDate} @@ -93,4 +95,23 @@ + + diff --git a/exam-admin/target/classes/mapper/sys/user/SysUserMapper.xml b/exam-admin/target/classes/mapper/sys/user/SysUserMapper.xml index 7d9c81f..584251b 100644 --- a/exam-admin/target/classes/mapper/sys/user/SysUserMapper.xml +++ b/exam-admin/target/classes/mapper/sys/user/SysUserMapper.xml @@ -7,6 +7,7 @@ + @@ -18,7 +19,7 @@ - `id`,`user_name`,`real_name`,`password`,`salt`,`role_ids`,`depart_id`,`create_time`,`update_time`,`state` + `id`,`user_name`,`real_name`,phone,`password`,`salt`,`role_ids`,`depart_id`,`create_time`,`update_time`,`state`