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()); }