教育训练处考试制证系统后端
zhangf
2024-07-24 790c2ba4a0b46edf191e3bac84931f796bd42b8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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.ThStudyAuth;
import com.gkhy.exam.institutionalaccess.mapper.ThStudyAuthMapper;
import com.gkhy.exam.institutionalaccess.model.vo.ThStudyAuthVO;
import com.gkhy.exam.institutionalaccess.service.ThStudyAuthService;
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("ThStudyAuthService")
public class ThStudyAuthServiceImpl extends ServiceImpl<ThStudyAuthMapper,ThStudyAuth> implements ThStudyAuthService {
    @Autowired
    private ThStudyAuthMapper thStudyAuthMapper;
 
    @Override
    public List<String> getUuidByStudyDetaiId(String studyDetaiId) {
        return thStudyAuthMapper.getUuidByStudyDetaiId(studyDetaiId);
    }
 
    @Override
    public List<ThStudyAuth> getByStudyDetaiUuids(List<String> studyUuids) {
        List<ThStudyAuth> allAuthList = new ArrayList<>();
        List<List<String>> split = ListUtil.split(studyUuids, 900);
        for (List<String> list : split) {
            List<ThStudyAuth> authList = thStudyAuthMapper.getByStudyDetaiUuids(list);
            allAuthList.addAll(authList);
        }
 
        return allAuthList;
    }
 
    @Override
    public Integer insetBatch(List<ThStudyAuth> thStudyAuthList) {
        return baseMapper.insertBatch(thStudyAuthList);
    }
 
 
}