|
|
@@ -1,5 +1,6 @@
|
|
|
package com.ruoyi.web.controller.front;
|
|
|
|
|
|
+import com.alibaba.fastjson2.util.DateUtils;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
@@ -8,6 +9,7 @@ import com.ruoyi.learn.service.ILearnWrongBookService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@Api(tags = "前端V2 错题本")
|
|
|
@@ -32,11 +34,15 @@ public class FrontWrongBookController extends BaseController {
|
|
|
|
|
|
@ApiOperation("错题列表")
|
|
|
@GetMapping("wrongQuestions")
|
|
|
- public TableDataInfo wrongQuestions(@ApiParam("科目id") @RequestParam Long subjectId,
|
|
|
+ public TableDataInfo wrongQuestions(@ApiParam("科目id") @RequestParam(required = false) Long subjectId,
|
|
|
+ @ApiParam("开始日期yyyy-MM-dd") @RequestParam(required = false) String start,
|
|
|
+ @ApiParam("结束时间yyyy-MM-dd") @RequestParam(required = false) String end,
|
|
|
@ApiParam(value = "页数", example = "1") @RequestParam Integer pageNum,
|
|
|
@ApiParam(value = "页大小", example = "15") @RequestParam Integer pageSize) {
|
|
|
startPage();
|
|
|
- return getDataTable(wrongBookService.findWrongQuestions(subjectId));
|
|
|
+ return getDataTable(wrongBookService.findWrongQuestions(subjectId,
|
|
|
+ StringUtils.isNotBlank(start) ? DateUtils.parseDate(start, "yyyy-MM-dd") : null,
|
|
|
+ StringUtils.isNotBlank(end) ? DateUtils.parseDate(end, "yyyy-MM-dd") : null));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("错题考卷列表")
|