From 29e15e9651d96df7dc6bce08e46ede64dfe132fa Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Fri, 22 Apr 2022 10:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9E=83=E5=9C=BE=E7=AE=B1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E4=BB=B6=E4=BA=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/api/mail/MailAppController.java | 1 - .../tenlion/systemoa/pojo/dtos/mail/MailDelDTO.java | 2 ++ .../systemoa/service/mail/impl/MailServiceImpl.java | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/mail/MailAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/mail/MailAppController.java index 6c3d5eb..2d4b403 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/mail/MailAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/mail/MailAppController.java @@ -269,7 +269,6 @@ public class MailAppController extends DefaultBaseController { }) @DeleteMapping("delete-app-del-mail-all") public void deleteAppDelMailAll(@RequestHeader("token") String token){ - mailService.deleteAppDelMailAll(token); } diff --git a/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/mail/MailDelDTO.java b/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/mail/MailDelDTO.java index 3b874c4..87de5f4 100644 --- a/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/mail/MailDelDTO.java +++ b/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/mail/MailDelDTO.java @@ -41,6 +41,8 @@ public class MailDelDTO { private String content; @ApiModelProperty(name = "creator", value = "发件人ID") private String creator; + @ApiModelProperty(name = "creatorNames", value = "发件人名字") + private String creatorNames; @ApiModelProperty(name = "gmtCreate", value = "发件时间") private String gmtCreate; @ApiModelProperty(name = "sourceFrom", value = "来源") diff --git a/src/main/java/cn/com/tenlion/systemoa/service/mail/impl/MailServiceImpl.java b/src/main/java/cn/com/tenlion/systemoa/service/mail/impl/MailServiceImpl.java index 714e019..d153edf 100644 --- a/src/main/java/cn/com/tenlion/systemoa/service/mail/impl/MailServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemoa/service/mail/impl/MailServiceImpl.java @@ -146,6 +146,13 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService params.put("userId", appTokenUser.getId()); PageHelper.startPage(page.getPage(), page.getRows()); List list = mailDao.listInboxMail(params); + // 处理发件人 + for (MailInboxDTO item : list){ + String creatorId = item.getCreator(); + UserDTO userDTO = userService.get(creatorId); + String creatorNames = userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]"; + item.setCreatorNames(creatorNames); + } // 处理抄送情况 for(MailInboxDTO item : list){ if(item.getCopyForIds() == null || "".equals(item.getCopyForIds())){ @@ -520,6 +527,12 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService Map params = page.getParams(); params.put("delUserId", appTokenUser.getId()); List list = mailDao.listDelMail(params); + for(MailDelDTO item : list){ + UserDTO userDTO = userService.get(item.getCreator()); + String creatorNames = userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]"; + item.setCreatorNames(creatorNames); + } + PageInfo pageInfo = new PageInfo<>(list); return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal()); }