diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java index 283be66..b15e1cd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/exam/UserExamController.java @@ -4,7 +4,6 @@ import cn.hutool.core.convert.Convert; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; @@ -86,7 +85,6 @@ public class UserExamController extends BaseController { @ResponseBody public TableDataInfo myGrades(UserExamReqDTO reqDTO) { startPage(); - reqDTO.setUserId(getUserId()); List list = userExamManager.selectExamList(reqDTO); return getDataTable(list); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserExamManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserExamManager.java index 5463012..4718df5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserExamManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/UserExamManager.java @@ -18,6 +18,8 @@ import java.util.Date; import java.util.List; import java.util.Objects; +import static com.ruoyi.common.utils.ShiroUtils.getUserId; + /** * packageName com.ruoyi.web.controller.manager * @@ -48,6 +50,7 @@ public class UserExamManager { * @return java.util.List */ public List selectExamList(UserExamReqDTO reqDTO) { + reqDTO.setUserId(getUserId()); return elUserExamService.selectExamList(reqDTO); }