|
|
@@ -3,6 +3,7 @@ package com.fs.course.controller;
|
|
|
import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
+import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
@@ -10,6 +11,8 @@ import com.fs.course.domain.FsCourseAnswerLogs;
|
|
|
import com.fs.course.param.FsCourseAnswerLogsParam;
|
|
|
import com.fs.course.service.IFsCourseAnswerLogsService;
|
|
|
import com.fs.course.vo.FsCourseAnswerLogsListVO;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -35,17 +38,26 @@ public class FsCourseAnswerLogsController extends BaseController
|
|
|
* 查询答题日志列表
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('course:courseAnswerLog:list')")
|
|
|
- @GetMapping("/list")
|
|
|
- public TableDataInfo list(FsCourseAnswerLogsParam param)
|
|
|
+ @PostMapping("/list")
|
|
|
+ public R list(@RequestBody FsCourseAnswerLogsParam param)
|
|
|
{
|
|
|
- startPage();
|
|
|
+ if(param.getPageNum() == null) {
|
|
|
+ param.setPageNum(1);
|
|
|
+ }
|
|
|
+ if(param.getPageSize() == null) {
|
|
|
+ param.setPageSize(10);
|
|
|
+ }
|
|
|
|
|
|
if (param.getPhoneMk() != null && param.getPhoneMk() != "") {
|
|
|
param.setPhone(encryptPhone(param.getPhoneMk()));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ PageHelper.startPage(param.getPageNum(), param.getPageSize());
|
|
|
+
|
|
|
List<FsCourseAnswerLogsListVO> list = fsCourseAnswerLogsService.selectFsCourseAnswerLogsListVO(param);
|
|
|
- return getDataTable(list);
|
|
|
+
|
|
|
+ return R.ok().put("data",new PageInfo<>(list));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -53,8 +65,8 @@ public class FsCourseAnswerLogsController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('course:courseAnswerLog:export')")
|
|
|
@Log(title = "答题日志", businessType = BusinessType.EXPORT)
|
|
|
- @GetMapping("/export")
|
|
|
- public AjaxResult export(FsCourseAnswerLogsParam param)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public AjaxResult export(@RequestBody FsCourseAnswerLogsParam param)
|
|
|
{
|
|
|
if (param.getPhoneMk() != null && param.getPhoneMk() != "") {
|
|
|
param.setPhone(encryptPhone(param.getPhoneMk()));
|