From 85ae68bdbd7e373fb6f3e6f5eb04c57e3d86efd0 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期三, 16 十月 2024 10:28:33 +0800
Subject: [PATCH] 补全缺失字段
---
exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudentServiceImpl.java | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudentServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudentServiceImpl.java
index 3aa5f6f..4ac5864 100644
--- a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudentServiceImpl.java
+++ b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudentServiceImpl.java
@@ -1,8 +1,10 @@
package com.gkhy.exam.institutionalaccess.service.serviceImpl;
+import cn.hutool.core.collection.ListUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.institutionalaccess.entity.ThStudent;
+import com.gkhy.exam.institutionalaccess.entity.ThStudentBatch;
import com.gkhy.exam.institutionalaccess.mapper.ThStudentMapper;
import com.gkhy.exam.institutionalaccess.model.vo.ThStatisticStudentVO;
import com.gkhy.exam.institutionalaccess.service.ThStudentService;
@@ -10,6 +12,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -27,13 +30,29 @@
@Override
public List<ThStudent> getByIdcards(List<String> idcards) {
- List<ThStudent> students = studentMapper.selectList(new LambdaQueryWrapper<ThStudent>().in(ThStudent::getIdcard, idcards).eq(ThStudent::getDelFlag, DeleteStatusEnum.NO.getStatus()));
- return students;
+ List<ThStudent> allStudentList = new ArrayList<>();
+ List<List<String>> split = ListUtil.split(idcards, 900);
+ for (List<String> list : split) {
+ List<ThStudent> studentList = studentMapper.getByIdCards(list);
+ allStudentList.addAll(studentList);
+ }
+ return allStudentList;
}
@Override
- public int updateByIdcard(List<ThStudent> updateStudentList) {
- return studentMapper.updateByIdcard(updateStudentList);
+ public Integer updateBatch(List<ThStudent> updateStudentList) {
+ return studentMapper.updateBatch(updateStudentList);
+ }
+
+ @Override
+ public Integer insertBatch(List<ThStudent> saveSudentList) {
+ return studentMapper.insertBatch(saveSudentList);
+ }
+
+ @Override
+ public List<ThStudent> getNameByIdcards(List<String> idcards) {
+
+ return studentMapper.getNameByIdcards(idcards);
}
--
Gitblit v1.9.2