From 790c2ba4a0b46edf191e3bac84931f796bd42b8f Mon Sep 17 00:00:00 2001
From: zhangf <1603559716@qq.com>
Date: 星期三, 24 七月 2024 09:02:49 +0800
Subject: [PATCH] 三方对接接口优化

---
 exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThExamRecordServiceImpl.java |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThExamRecordServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThExamRecordServiceImpl.java
new file mode 100644
index 0000000..8c990dd
--- /dev/null
+++ b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThExamRecordServiceImpl.java
@@ -0,0 +1,48 @@
+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.ThExamRecord;
+import com.gkhy.exam.institutionalaccess.mapper.ThExamRecordMapper;
+import com.gkhy.exam.institutionalaccess.model.query.ThExamRecordQuery;
+import com.gkhy.exam.institutionalaccess.model.vo.ThExamRecordVO;
+import com.gkhy.exam.institutionalaccess.service.ThExamRecordService;
+import com.ruoyi.common.enums.coalmineEnums.DeleteStatusEnum;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+@Service("ThExamRecordService")
+public class ThExamRecordServiceImpl extends ServiceImpl<ThExamRecordMapper, ThExamRecord> implements ThExamRecordService {
+    @Autowired
+    private ThExamRecordMapper thExamRecordMapper;
+    @Override
+    public List<ThExamRecord> listByInstitutionId(Long institutionId) {
+        return thExamRecordMapper.selectList(new LambdaQueryWrapper<ThExamRecord>().eq(ThExamRecord::getInstitutionId, institutionId).eq(ThExamRecord::getDelFlag, DeleteStatusEnum.NO.getStatus()));
+    }
+
+    @Override
+    public List<ThExamRecordVO> listByPage(ThExamRecordQuery query) {
+        return thExamRecordMapper.listByPage(query);
+    }
+
+    @Override
+    public List<ThExamRecord> getByUuids(List<String> examUuids) {
+        List<ThExamRecord> allExamRecordList = new ArrayList<>();
+        List<List<String>> split = ListUtil.split(examUuids, 900);
+        for (List<String> list : split) {
+            List<ThExamRecord> examRecordList = thExamRecordMapper.getByUuids(list);
+            allExamRecordList.addAll(examRecordList);
+        }
+
+        return allExamRecordList;
+    }
+    @Override
+    public Integer insertBatch(List<ThExamRecord> examRecordList){
+        return baseMapper.insertBatch(examRecordList);
+    }
+}

--
Gitblit v1.9.2