package com.gkhy.exam.institutionalaccess.service.serviceImpl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.gkhy.exam.institutionalaccess.entity.ThStudentCourse;
|
import com.gkhy.exam.institutionalaccess.mapper.ThStudentCourseMapper;
|
import com.gkhy.exam.institutionalaccess.model.vo.ThStatisticStudentVO;
|
import com.gkhy.exam.institutionalaccess.model.vo.ThStudentCourseVO;
|
import com.gkhy.exam.institutionalaccess.service.ThStudentCourseService;
|
import com.ruoyi.common.enums.coalmineEnums.DeleteStatusEnum;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.Collections;
|
import java.util.List;
|
|
|
@Service("ThStudentCourseService")
|
public class ThStudentCourseServiceImpl extends ServiceImpl<ThStudentCourseMapper, ThStudentCourse> implements ThStudentCourseService {
|
@Autowired
|
private ThStudentCourseMapper studentCourseMapper;
|
@Override
|
public List<ThStudentCourse> getByIdCards(List<String> idcards) {
|
|
return studentCourseMapper.selectList(new LambdaQueryWrapper<ThStudentCourse>().in(ThStudentCourse::getIdcard, idcards));
|
}
|
|
@Override
|
public List<ThStatisticStudentVO> statisticByBatchUuid() {
|
return studentCourseMapper.statisticByBatchUuid();
|
}
|
|
|
@Override
|
public List<ThStudentCourse> listByInstitutionId(Long institutionId) {
|
return studentCourseMapper.selectList(new LambdaQueryWrapper<ThStudentCourse>().eq(ThStudentCourse::getInstitutionId, institutionId));
|
}
|
|
@Override
|
public List<ThStatisticStudentVO> statisticByCourseUuid() {
|
return studentCourseMapper.statisticByCourseUuid();
|
}
|
|
@Override
|
public List<ThStudentCourseVO> getListByBatchUuid(String batchUuid) {
|
return studentCourseMapper.getListByBatchUuid(batchUuid);
|
}
|
|
@Override
|
public void updateByBatchUuid(String batchUuid) {
|
studentCourseMapper.updateByBatchUuid(batchUuid);
|
}
|
|
@Override
|
public List<ThStudentCourse> getByIdcardAndBatchUuid(String idcard, String batchUuid) {
|
List<ThStudentCourse> thStudentCourse = studentCourseMapper.selectList(new LambdaQueryWrapper<ThStudentCourse>().eq(ThStudentCourse::getIdcard, idcard)
|
.eq(ThStudentCourse::getBatchUuid, batchUuid).eq(ThStudentCourse::getDelFlag, DeleteStatusEnum.NO.getStatus()));
|
return thStudentCourse;
|
}
|
}
|