Browse Source

访客studentCard字段取值逻辑改为取身份证号

codingliang 11 months ago
parent
commit
a1670b9c77

+ 1 - 1
src/main/java/com/template/model/request/WelcomeVisitorRequest.java

@@ -22,7 +22,7 @@ public class WelcomeVisitorRequest implements Serializable {
     @ApiModelProperty(value = "主键ID")
     @ApiModelProperty(value = "主键ID")
     private Integer id;
     private Integer id;
 
 
-    @ApiModelProperty(value = "学生身份证号")
+    @ApiModelProperty(value = "身份证号")
     private String studentCard;
     private String studentCard;
 
 
     @ApiModelProperty(value = "访客姓名")
     @ApiModelProperty(value = "访客姓名")

+ 2 - 2
src/main/java/com/template/model/vo/WelcomeVisitorVO.java

@@ -23,8 +23,8 @@ public class WelcomeVisitorVO implements Serializable {
     @ExcelProperty("序号")
     @ExcelProperty("序号")
     private Integer num;
     private Integer num;
 
 
-    @ApiModelProperty(value = "学号/录取号")
-    @ExcelProperty("学号/录取号")
+    @ApiModelProperty(value = "身份证号")
+    @ExcelProperty("身份证号")
     private String studentCard;
     private String studentCard;
 
 
     @ApiModelProperty(value = "学生姓名")
     @ApiModelProperty(value = "学生姓名")

+ 1 - 1
src/main/java/com/template/services/impl/WelcomeStudentServiceImpl.java

@@ -219,7 +219,7 @@ public class WelcomeStudentServiceImpl extends ServiceImpl<WelcomeStudentMapper,
     @Override
     @Override
     public int countByStudentCard(String studentCard) {
     public int countByStudentCard(String studentCard) {
         LambdaQueryWrapper<WelcomeStudent> queryWrapper = new LambdaQueryWrapper<>();
         LambdaQueryWrapper<WelcomeStudent> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(WelcomeStudent::getAdmissNum, studentCard);
+        queryWrapper.eq(WelcomeStudent::getCardId, studentCard);
         return count(queryWrapper);
         return count(queryWrapper);
     }
     }
 }
 }

+ 1 - 1
src/main/java/com/template/services/impl/WelcomeVisitorServiceImpl.java

@@ -145,7 +145,7 @@ public class WelcomeVisitorServiceImpl extends ServiceImpl<WelcomeVisitorMapper,
             throw new MyCustomException(ResponseStatusEnum.SEND_PARAMS);
             throw new MyCustomException(ResponseStatusEnum.SEND_PARAMS);
         }
         }
 
 
-        // 校验学号/录取号是否存在
+        // 校验身份证号是否存在
         String studentCard = visitorRequest.getStudentCard();
         String studentCard = visitorRequest.getStudentCard();
         int existCount = studentService.countByStudentCard(studentCard);
         int existCount = studentService.countByStudentCard(studentCard);
         if (existCount <= 0) {
         if (existCount <= 0) {