|
@@ -5,11 +5,10 @@ import com.miaxis.common.core.controller.BaseController;
|
|
|
import com.miaxis.common.core.domain.Response;
|
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
import com.miaxis.common.enums.BusinessTypeEnum;
|
|
|
-import com.miaxis.question.dto.QuestionInfoSortDTO;
|
|
|
-import com.miaxis.question.dto.QuestionInfoSortUpateDTO;
|
|
|
+import com.miaxis.question.domain.QuestionInfo;
|
|
|
+import com.miaxis.question.dto.*;
|
|
|
import com.miaxis.question.service.IQuestionInfoService;
|
|
|
-import com.miaxis.question.vo.QuestionInfoExcelTypeVo;
|
|
|
-import com.miaxis.question.vo.QuestionInfoExcelVo;
|
|
|
+import com.miaxis.question.vo.*;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@@ -25,7 +24,7 @@ import java.util.List;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("pc/question/info")
|
|
|
-@Api(tags={"【pc-题库排序】"})
|
|
|
+@Api(tags={"【pc-题库】"})
|
|
|
public class PcQuestionInfoController extends BaseController{
|
|
|
@Autowired
|
|
|
private IQuestionInfoService questionInfoService;
|
|
@@ -33,7 +32,6 @@ public class PcQuestionInfoController extends BaseController{
|
|
|
/**
|
|
|
* 查询题库列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('question:info:list')")
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperation("查询题库列表")
|
|
|
@ApiImplicitParams({
|
|
@@ -70,25 +68,13 @@ public class PcQuestionInfoController extends BaseController{
|
|
|
|
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
-// * 导出题库列表
|
|
|
-// */
|
|
|
-// @PreAuthorize("@ss.hasPermi('question:info:export')")
|
|
|
-// @Log(title = "题库", businessType = BusinessTypeEnum.EXPORT)
|
|
|
-// @GetMapping("/export")
|
|
|
-// @ApiOperation("导出题库列表Excel")
|
|
|
-// public Response<String> export(@ModelAttribute QuestionInfo questionInfo){
|
|
|
-// List<QuestionInfo> list = questionInfoService.selectQuestionInfoList(questionInfo);
|
|
|
-// ExcelUtil<QuestionInfo> util = new ExcelUtil<QuestionInfo>(QuestionInfo.class);
|
|
|
-// return util.exportExcel(list, "info");
|
|
|
-// }
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 根据专题类型获取具体分类
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('question:info:list')")
|
|
|
@GetMapping(value = "/issueType")
|
|
|
@ApiOperation("根据专题类型获取具体分类")
|
|
|
public Response<List<QuestionInfoExcelTypeVo>> getTypes(Integer subject,Integer issueTypeValue)
|
|
@@ -101,7 +87,6 @@ public class PcQuestionInfoController extends BaseController{
|
|
|
/**
|
|
|
* 修改题库
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('question:info:edit')")
|
|
|
@Log(title = "题库", businessType = BusinessTypeEnum.UPDATE)
|
|
|
@PutMapping
|
|
|
@ApiOperation("修改顺序")
|
|
@@ -132,4 +117,123 @@ public class PcQuestionInfoController extends BaseController{
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询题库列表
|
|
|
+ */
|
|
|
+ @GetMapping("/list")
|
|
|
+ @ApiOperation("查询题库列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
|
|
|
+ @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
|
|
|
+ })
|
|
|
+ public ResponsePageInfo<QuestionInfo> list(@ModelAttribute QuestionInfoDTO questionInfoDTO){
|
|
|
+ startPage();
|
|
|
+ List<QuestionInfo> list = questionInfoService.selectQuestionInfoList(questionInfoDTO);
|
|
|
+ return toResponsePageInfo(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取题库详细信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ @ApiOperation("获取题库详细信息")
|
|
|
+ public Response<QuestionInfo> getInfo(
|
|
|
+ @ApiParam(name = "id", value = "题库参数", required = true)
|
|
|
+ @PathVariable("id") Long id
|
|
|
+ ){
|
|
|
+ return Response.success(questionInfoService.getById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取题库详细信息多个题库
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/getQuestionInfoByIds")
|
|
|
+ @ApiOperation("获取题库详细信息批量取题")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "ids",value = "题目ids" ,dataType = "List", required = true)})
|
|
|
+ public ResponsePageInfo<QuestionInfo> getQuestionInfoByIds(Long[] ids){
|
|
|
+ List<QuestionInfo> list = questionInfoService.selectQuestionInfoListByIds(ids);
|
|
|
+ return toResponsePageInfo(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取精选分类
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/selectJxQuestionInfo")
|
|
|
+ @ApiOperation("获取精选题分类")
|
|
|
+ public Response<List<QuestionInfoJxVO>> selectJxQuestionInfo(@ModelAttribute QuestionInfoFlDTO questionInfoFlDTO) {
|
|
|
+ return Response.success(questionInfoService.selectJxQuestionInfo(questionInfoFlDTO));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取地方分类
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/selectDfQuestionInfo")
|
|
|
+ @ApiOperation("获取地方题分类")
|
|
|
+ public Response<List<QuestionInfoDfVO>> selectDfQuestionInfo(@ModelAttribute QuestionInfoFlDTO questionInfoFlDTO) {
|
|
|
+ return Response.success(questionInfoService.selectDfQuestionInfo(questionInfoFlDTO));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取分类专题分类
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/selectFlQuestionInfo")
|
|
|
+ @ApiOperation("获取分类专题分类")
|
|
|
+ public Response<List<QuestionInfoFlVO>> selectFlQuestionInfo(@ModelAttribute QuestionInfoFlDTO questionInfoFlDTO) {
|
|
|
+ return Response.success(questionInfoService.selectFlQuestionInfo(questionInfoFlDTO));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取顺序练习分类
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/selectSxQuestionInfo")
|
|
|
+ @ApiOperation("获取顺序练习分类")
|
|
|
+ public Response<List<QuestionInfoSxVO>> selectSxQuestionInfo(@ModelAttribute QuestionInfoFlDTO questionInfoFlDTO) {
|
|
|
+
|
|
|
+
|
|
|
+ return Response.success(questionInfoService.selectSxQuestionInfo(questionInfoFlDTO));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询题库列表(非会员)
|
|
|
+ */
|
|
|
+ @GetMapping("/normalList")
|
|
|
+ @ApiOperation("查询题库列表(非会员)")
|
|
|
+ public ResponsePageInfo<QuestionInfo> normalList(@ModelAttribute QuestionInfoDTO questionInfoDTO){
|
|
|
+ List<QuestionInfo> list = questionInfoService.selectNormalQuestionInfoList(questionInfoDTO);
|
|
|
+ return toResponsePageInfo(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询模拟考试科目1与4题库
|
|
|
+ */
|
|
|
+ @GetMapping("/selectTestK14QuestionInfoList")
|
|
|
+ @ApiOperation("取模拟考试题库")
|
|
|
+ public ResponsePageInfo<QuestionInfo> selectTestK14QuestionInfoList(@ModelAttribute QuestionInfoTestDTO questionInfoTestDTO){
|
|
|
+ List<QuestionInfo> list = questionInfoService.selectTestK14QuestionInfoList(questionInfoTestDTO);
|
|
|
+ return toResponsePageInfo(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询秘密卷
|
|
|
+ */
|
|
|
+ @GetMapping("/selectMiQuestionInfoList")
|
|
|
+ @ApiOperation("查询秘密卷")
|
|
|
+ public ResponsePageInfo<QuestionInfo> selectMiQuestionInfoList(@ModelAttribute QuestionInfoMiDTO questionInfoMiDTO){
|
|
|
+ List<QuestionInfo> list = questionInfoService.selectMiQuestionInfoList(questionInfoMiDTO);
|
|
|
+ return toResponsePageInfo(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|