|
@@ -1,6 +1,8 @@
|
|
|
package com.miaxis.question.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.miaxis.common.exception.CustomException;
|
|
|
+import com.miaxis.common.exception.user.UserException;
|
|
|
import com.miaxis.question.domain.QuestionInfo;
|
|
|
import com.miaxis.question.dto.QuestionInfoDTO;
|
|
|
import com.miaxis.question.dto.QuestionInfoFlDTO;
|
|
@@ -9,6 +11,7 @@ import com.miaxis.question.dto.QuestionInfoSortUpateDTO;
|
|
|
import com.miaxis.question.mapper.QuestionInfoMapper;
|
|
|
import com.miaxis.question.service.IQuestionInfoService;
|
|
|
import com.miaxis.question.vo.*;
|
|
|
+import org.apache.ibatis.executor.ExecutorException;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -33,6 +36,25 @@ public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, Que
|
|
|
*/
|
|
|
@Override
|
|
|
public List<QuestionInfo> selectQuestionInfoList(QuestionInfoDTO questionInfoDTO){
|
|
|
+
|
|
|
+ //1:分类练习:class_sort;2:精选考题:excell_sort;3:地方专题:place_sort;4:顺序练习:seque_sort;
|
|
|
+ Integer sort = questionInfoDTO.getSort();
|
|
|
+ switch (sort){
|
|
|
+ case 1:
|
|
|
+ questionInfoDTO.setSortName("class_sort");
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ questionInfoDTO.setSortName("excell_sort");
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ questionInfoDTO.setSortName("place_sort");
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ questionInfoDTO.setSortName("seque_sort");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ throw new CustomException("请正常输入sort字段");
|
|
|
+ }
|
|
|
return questionInfoMapper.selectQuestionInfoList(questionInfoDTO);
|
|
|
}
|
|
|
|