| | |
| | | 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.ThStudyDetail; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | |
| | | public List<ThStudyDetailVO> listByBatchUuid(String batchUuid) { |
| | | return thStudyDetailMapper.listByBatchUuid(batchUuid); |
| | | } |
| | | |
| | | @Override |
| | | public List<ThStudyDetail> getByUuids(List<String> studyUuids) { |
| | | List<ThStudyDetail> allStudyDetailList = new ArrayList<>(); |
| | | List<List<String>> split = ListUtil.split(studyUuids, 900); |
| | | for (List<String> list : split) { |
| | | List<ThStudyDetail> studyDetailList = thStudyDetailMapper.getByUuids(list); |
| | | allStudyDetailList.addAll(studyDetailList); |
| | | } |
| | | return allStudyDetailList; |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertBatch(List<ThStudyDetail> list) { |
| | | return baseMapper.insertBatch(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateBatch(List<ThStudyDetail> list) { |
| | | return baseMapper.updateBatch(list); |
| | | } |
| | | |
| | | @Override |
| | | public List<ThStudyDetailVO> listByCourseUuid(String courseUuid) { |
| | | return baseMapper.listByCourseUuid(courseUuid); |
| | | } |
| | | } |