| | |
| | | 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.ThCourse; |
| | | import com.gkhy.exam.institutionalaccess.mapper.ThCourseMapper; |
| | | import com.gkhy.exam.institutionalaccess.model.query.ThCourseQuery; |
| | | import com.gkhy.exam.institutionalaccess.model.resp.ThCourseRespDTO; |
| | | import com.gkhy.exam.institutionalaccess.service.ThCourseService; |
| | | 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; |
| | | |
| | | |
| | |
| | | private ThCourseMapper courseMapper; |
| | | |
| | | @Override |
| | | public List<ThCourse> listByPage(ThCourseQuery query) { |
| | | public List<ThCourseRespDTO> listByPage(ThCourseQuery query) { |
| | | return courseMapper.listByPage(query); |
| | | } |
| | | |
| | |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<ThCourse> getByUuidList(List<String> courseUuids) { |
| | | List<ThCourse> allList = new ArrayList<>(); |
| | | //分批量查询 |
| | | List<List<String>> list = ListUtil.split(courseUuids, 900); |
| | | for (List<String> uuids : list) { |
| | | List<ThCourse> courseListList = courseMapper.getByUuidList(uuids); |
| | | allList.addAll(courseListList); |
| | | |
| | | } |
| | | |
| | | return allList; |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertBatch(List<ThCourse> courseList) { |
| | | return courseMapper.insertBatch(courseList); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateBatch(List<ThCourse> courseList) { |
| | | return courseMapper.updateBatch(courseList); |
| | | } |
| | | |
| | | @Override |
| | | public List<ThCourse> getCourseNameByUuids(List<String> courseUuids) { |
| | | List<ThCourse> courseListList = courseMapper.getCourseNameByUuids(courseUuids); |
| | | return courseListList; |
| | | } |
| | | } |