|
|
package com.ibeetl.jlw.dao;
|
|
|
|
|
|
import com.ibeetl.jlw.entity.CourseInfo;
|
|
|
import com.ibeetl.jlw.entity.ResourcesQuestion;
|
|
|
import com.ibeetl.jlw.entity.vo.QuestionTypeCountVO;
|
|
|
import com.ibeetl.jlw.enums.MatchTypeEnum;
|
|
|
import com.ibeetl.jlw.enums.QuestionBusinessTypeEnum;
|
|
|
import com.ibeetl.jlw.web.query.CourseInfoQuery;
|
|
|
import com.ibeetl.jlw.web.query.ResourcesQuestionQuery;
|
|
|
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.stereotype.Repository;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* ResourcesQuestion Dao
|
|
|
*/
|
|
|
// 实际可以不用加Repository注解,调用的地方注入时候,Idea会报红,看着难受
|
|
|
@Repository
|
|
|
@SqlResource("jlw.resourcesQuestion")
|
|
|
public interface ResourcesQuestionDao extends BaseMapper<ResourcesQuestion>{
|
|
|
PageQuery<ResourcesQuestion> queryByCondition(PageQuery query);
|
|
|
@Update
|
|
|
void deleteResourcesQuestionByIds(String ids);
|
|
|
List<ResourcesQuestion> getByIds (String resourcesQuestionIds);
|
|
|
List<ResourcesQuestion> getValuesByQuery (ResourcesQuestionQuery resourcesQuestionQuery);
|
|
|
List<CourseInfo> getValuesToCourseInfo(CourseInfoQuery courseInfoQuery);
|
|
|
List<ResourcesQuestion> getValuesByQueryNotWithPermission(ResourcesQuestionQuery resourcesQuestionQuery);
|
|
|
/**
|
|
|
* 根据课程ID获取下面的题目类型和类型下的总题数
|
|
|
* @param courseInfoId
|
|
|
* @return
|
|
|
*/
|
|
|
List<QuestionTypeCountVO> getGroupQuestionTypeCount(Long courseInfoId);
|
|
|
|
|
|
int checkUnique(ResourcesQuestion question);
|
|
|
|
|
|
/**
|
|
|
* 获取数据库中的课程或者章节ID
|
|
|
*
|
|
|
* @param courseInfoTitle 导入的标题,取出课程名称部分
|
|
|
* @param importCourseId 导入的标题,取出课程或者章节ID
|
|
|
* @param matchType 匹配类型
|
|
|
* @param businessType 来源类型
|
|
|
* @return
|
|
|
*/
|
|
|
Long getCourseInfoByBusinessTypeAndTitle(String courseInfoTitle, String importCourseId, MatchTypeEnum matchType, QuestionBusinessTypeEnum businessType);
|
|
|
} |