修改老师端客观题查询接口

master
xiaoCJ
parent 6e97c6c3f9
commit 93b1b0778a

@ -257,8 +257,8 @@ public class ObjectiveApi {
@ApiOperation("本地excel导入试题")
@PostMapping("insertObjectiveByExcel")
@Transactional
Boolean importTopicByLocal(@RequestParam MultipartFile file,
@RequestParam String schoolId) throws IOException, InvalidFormatException {
Boolean importTopicByLocal(@RequestParam MultipartFile file,
@RequestParam String schoolId) throws IOException, InvalidFormatException {
if (file == null) {
return false;
}
@ -428,10 +428,10 @@ public class ObjectiveApi {
@ApiOperation("根据客观题IDList批量查询客观题")
@PostMapping("selectBatchByIdList")
private List<SysObjectiveQuestions> selectBatchByIdList(@RequestBody List<String> objectIdList) {
SysObjectiveQuestionsExample example = new SysObjectiveQuestionsExample();
example.createCriteria().andObjectiveIdIn(objectIdList);
List<SysObjectiveQuestions> sysObjectiveQuestions = sysObjectiveQuestionMapper.selectByExample(example);
return sysObjectiveQuestions;
SysObjectiveQuestionsExample example = new SysObjectiveQuestionsExample();
example.createCriteria().andObjectiveIdIn(objectIdList);
List<SysObjectiveQuestions> sysObjectiveQuestions = sysObjectiveQuestionMapper.selectByExample(example);
return sysObjectiveQuestions;
}
/**
@ -652,7 +652,6 @@ public class ObjectiveApi {
@ApiOperation("获取所选客观题数量及分数")
@PostMapping("getChooseObjCountAndSorce")
private Map<String, BigDecimal> getChooseObjCountAndSorce(@RequestBody List<String> objectIdList) {
Map<String, BigDecimal> chooseObjCountAndSorce = sysObjectiveQuestionMapper.getChooseObjCountAndSorce(objectIdList);
return chooseObjCountAndSorce;
}
@ -665,8 +664,9 @@ public class ObjectiveApi {
private List<SysObjectiveQuestionsDto> selectObjByType(@RequestParam String type,
@RequestParam String schoolId,
@RequestParam String systemOwner) {
List<SysObjectiveQuestionsDto> sysObjectiveQuestionsDtos = sysObjectiveQuestionMapper.selectObjByType(type, schoolId);
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
String oneId = sysOneCatalogs.getOneId();
List<SysObjectiveQuestionsDto> sysObjectiveQuestionsDtos = sysObjectiveQuestionMapper.selectObjByType(type, schoolId, oneId);
return sysObjectiveQuestionsDtos;
}
}

@ -145,7 +145,8 @@ public class ResourceApi {
public List<SysResourceDto> selectResourceByChapterId(@RequestParam String oneId, //这里传的是一级的名称
@RequestParam(required = false) String threeId) {
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(oneId);
return sysResourceMapper.selectResource(sysOneCatalogs.getOneId(), null, threeId, null, null);
List<SysResourceDto> sysResourceDtos = sysResourceMapper.selectResource(sysOneCatalogs.getOneId(), null, threeId, null, null);
return sysResourceDtos;
}

@ -5,7 +5,6 @@ import com.sztzjy.resource_center.entity.SysObjectiveQuestionsExample;
import com.sztzjy.resource_center.entity.dto.SysObjectiveQuestionsDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.math.BigDecimal;
import java.util.List;
@ -56,5 +55,7 @@ public interface SysObjectiveQuestionsMapper {
Map<String, BigDecimal> getChooseObjCountAndSorce(@Param("list") List<String> objectIdList);
List<SysObjectiveQuestionsDto> selectObjByType(@Param("type") String type,@Param("schoolId") String schoolId);
List<SysObjectiveQuestionsDto> selectObjByType(@Param("type") String type,
@Param("schoolId") String schoolId,
@Param("oneId") String oneId);
}

@ -492,6 +492,7 @@
FROM sys_objective_questions s
JOIN sys_topic_and_course sc on s.objective_id = sc.topic_id
WHERE s.source in ('管理员', #{schoolId})
and sc.one_id = #{oneId}
and s.is_delete = FALSE
and s.type = #{type}
</select>

Loading…
Cancel
Save