垃圾箱添加发件人信息

This commit is contained in:
wans 2022-04-22 10:50:06 +08:00
parent 056da92bec
commit 29e15e9651
3 changed files with 15 additions and 1 deletions

View File

@ -269,7 +269,6 @@ public class MailAppController extends DefaultBaseController {
}) })
@DeleteMapping("delete-app-del-mail-all") @DeleteMapping("delete-app-del-mail-all")
public void deleteAppDelMailAll(@RequestHeader("token") String token){ public void deleteAppDelMailAll(@RequestHeader("token") String token){
mailService.deleteAppDelMailAll(token); mailService.deleteAppDelMailAll(token);
} }

View File

@ -41,6 +41,8 @@ public class MailDelDTO {
private String content; private String content;
@ApiModelProperty(name = "creator", value = "发件人ID") @ApiModelProperty(name = "creator", value = "发件人ID")
private String creator; private String creator;
@ApiModelProperty(name = "creatorNames", value = "发件人名字")
private String creatorNames;
@ApiModelProperty(name = "gmtCreate", value = "发件时间") @ApiModelProperty(name = "gmtCreate", value = "发件时间")
private String gmtCreate; private String gmtCreate;
@ApiModelProperty(name = "sourceFrom", value = "来源") @ApiModelProperty(name = "sourceFrom", value = "来源")

View File

@ -146,6 +146,13 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService
params.put("userId", appTokenUser.getId()); params.put("userId", appTokenUser.getId());
PageHelper.startPage(page.getPage(), page.getRows()); PageHelper.startPage(page.getPage(), page.getRows());
List<MailInboxDTO> list = mailDao.listInboxMail(params); List<MailInboxDTO> 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){ for(MailInboxDTO item : list){
if(item.getCopyForIds() == null || "".equals(item.getCopyForIds())){ if(item.getCopyForIds() == null || "".equals(item.getCopyForIds())){
@ -520,6 +527,12 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService
Map<String, Object> params = page.getParams(); Map<String, Object> params = page.getParams();
params.put("delUserId", appTokenUser.getId()); params.put("delUserId", appTokenUser.getId());
List<MailDelDTO> list = mailDao.listDelMail(params); List<MailDelDTO> list = mailDao.listDelMail(params);
for(MailDelDTO item : list){
UserDTO userDTO = userService.get(item.getCreator());
String creatorNames = userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]";
item.setCreatorNames(creatorNames);
}
PageInfo<MailDelDTO> pageInfo = new PageInfo<>(list); PageInfo<MailDelDTO> pageInfo = new PageInfo<>(list);
return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal()); return new SuccessResultList<>(list, pageInfo.getPageNum(), pageInfo.getTotal());
} }