tianze-pro/web/src/main/java/com/ibeetl/jlw/dao/StudentDao.java

110 lines
3.7 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.ibeetl.jlw.dao;
import cn.hutool.core.util.ObjectUtil;
import com.ibeetl.jlw.entity.CourseInfo;
import com.ibeetl.jlw.entity.Student;
import com.ibeetl.jlw.entity.StudentExtendSchoolInfo;
import com.ibeetl.jlw.entity.api.student.StudentActiveInfo;
import com.ibeetl.jlw.entity.dto.StudentEditPasswordDTO;
import com.ibeetl.jlw.entity.vo.StudentLogAnalysisVO;
import com.ibeetl.jlw.entity.vo.StudentLoginLogVO;
import com.ibeetl.jlw.entity.vo.StudentUseLogVO;
import com.ibeetl.jlw.web.query.StudentQuery;
import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.SqlResource;
import org.beetl.sql.mapper.annotation.Update;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* Student Dao
*/
// 实际可以不用加Repository注解调用的地方注入时候Idea会报红看着难受
@Repository
@SqlResource("jlw.student")
public interface StudentDao extends BaseMapper<Student>{
PageQuery queryByConditionQuery(PageQuery query);
PageQuery<Student> queryByCondition(PageQuery query);
PageQuery<Student> queryByCondition2Student(PageQuery query);
@Update
void deleteStudentByIds(String ids);
@Update
void batchAppendCodeDelByIds(String ids);
@Update
void deleteByIds(String ids);
List<Map<String,Object>> getExcelValues (StudentQuery studentQuery);
List<Map<String,Object>> getExcelValues2Competition (StudentQuery studentQuery);
Student getByUserId(Long userId);
Student getByAccount(String account);
List<Student> getByIds (String studentIds);
default Student getById (Long studentId) {
List<Student> byIds = getByIds(studentId.toString());
return ObjectUtil.isNotEmpty(byIds)? byIds.get(0): null;
}
List<Student> getStudentLog (StudentQuery studentQuery);
PageQuery<StudentUseLogVO> queryStudentUseLogByCondition(PageQuery query);
/**
* 系统日志-使用日志
* @param query
* @return
*/
PageQuery<StudentUseLogVO> queryStudentTeacherOrUseLogBy(PageQuery query);
PageQuery<StudentLoginLogVO> queryStudentLoginLogByCondition(PageQuery query);
/**
* 登录日志
* @param query
* @return
*/
PageQuery<StudentLoginLogVO> queryUserLoginLogByCondition(PageQuery query);
PageQuery<StudentLogAnalysisVO> queryStudentLogAnalysisByCondition(PageQuery query);
/**
* 统计报表-总人数统计
* @param query
* @return
*/
PageQuery<StudentLogAnalysisVO> queryStatisticalStatementNumberPeopleByCondition(PageQuery query);
List<Student> getValuesByQuery (StudentQuery studentQuery);
PageQuery<Student> getPracticePerformanceStatistic (PageQuery query);
List<Student> getPracticePerformanceStatisticInfo (StudentQuery studentQuery);
List<Student> getPracticeProgress (StudentQuery studentQuery);
PageQuery<CourseInfo> getErrorStatistics (PageQuery query);
/**
* 获取学生的学校信息
* 班级-专业-院系-院校
*
* @param studentIds
* @return
*/
@Cacheable(value = "studentDao:getStudentExtendSchoolInfo", key = "#studentIds", unless="#result == null || #result.size() == 0")
List<StudentExtendSchoolInfo> getStudentExtendSchoolInfo(String studentIds);
/**
* 通过用户ID查询
* @param userIds
* @return
*/
List<StudentExtendSchoolInfo> getStudentExtendSchoolInfoListByUserIds(String userIds);
/**
* 学生端-修改密码,数据库验证
* @param dto
* @return
*/
Student getStudentByStudentEditPasswordDTO(StudentEditPasswordDTO dto);
StudentActiveInfo studentActiveInfo(Long studentId, Long userId);
}