From 992ce097ffe678439409978f09fd7bc5b4788b1e Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Mon, 8 Jul 2024 16:39:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/controller/manager/PaperManager.java | 6 ++++++ .../java/com/ruoyi/system/domain/paper/dto/PaperDTO.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java index d7fd52a..23fa78f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/PaperManager.java @@ -81,6 +81,10 @@ public class PaperManager { private ISysJobService jobService; + @Autowired + private ISysUserService userService; + + @Resource private UserExamManager userExamManager; @@ -490,6 +494,8 @@ public class PaperManager { // 试题基本信息 ElPaper paper = paperService.getById(paperId); ExamResultRespDTO respDTO = Convert.convert(ExamResultRespDTO.class, paper); + SysUser user = userService.getById(paper.getUserId()); + respDTO.setUserName(user.getUserName()); List quList = paperQuService.listForPaperResult(paperId); respDTO.setQuList(quList); return respDTO; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/paper/dto/PaperDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/paper/dto/PaperDTO.java index b6b6a93..d629b45 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/paper/dto/PaperDTO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/paper/dto/PaperDTO.java @@ -28,6 +28,9 @@ public class PaperDTO implements Serializable { @ApiModelProperty(value = "用户ID") private Long userId; + @ApiModelProperty(value = "用户名") + private String userName; + @ApiModelProperty(value = "部门ID") private String departId;