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 2d4b403..5a83fd4 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 @@ -212,9 +212,10 @@ public class MailAppController extends DefaultBaseController { }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("get-app-recover-del-mail/{ids}") - public void getAppRecoverDelMail(@RequestHeader("token") String token, - @PathVariable("ids") String ids){ + public SuccessResult getAppRecoverDelMail(@RequestHeader("token") String token, + @PathVariable("ids") String ids){ mailService.getRecoverDelMail(ids); + return new SuccessResult(); } @ApiOperation(value = "删除-发件箱邮件", notes = "删除-发件箱邮件") @@ -224,9 +225,10 @@ public class MailAppController extends DefaultBaseController { }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @DeleteMapping("delete-app-send-mail/{ids}") - public void deleteAppSendMail(@RequestHeader("token") String token, - @PathVariable("ids") String ids){ + public SuccessResult deleteAppSendMail(@RequestHeader("token") String token, + @PathVariable("ids") String ids){ mailService.deleteAppSendMail(token, ids); + return new SuccessResult(); } @ApiOperation(value = "删除-收件箱邮件", notes = "删除-收件箱邮件") @@ -236,9 +238,10 @@ public class MailAppController extends DefaultBaseController { }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @DeleteMapping("delete-app-inbox-mail/{ids}") - public void deleteAppInboxMail(@RequestHeader("token") String token, - @PathVariable("ids") String ids){ + public SuccessResult deleteAppInboxMail(@RequestHeader("token") String token, + @PathVariable("ids") String ids){ mailService.deleteAppInboxMail(token, ids); + return new SuccessResult(); } @ApiOperation(value = "删除-草稿箱邮件", notes = "删除-草稿箱邮件") @@ -247,9 +250,10 @@ public class MailAppController extends DefaultBaseController { @ApiImplicitParam(name = "ids", value = "取mailId,多个mailId用逗号拼接", paramType = "path") }) @DeleteMapping("delete-app-draft-mail/{ids}") - public void deleteAppDraftMail(@RequestHeader("token") String token, - @PathVariable("ids") String ids){ + public SuccessResult deleteAppDraftMail(@RequestHeader("token") String token, + @PathVariable("ids") String ids){ mailService.deleteAppDraftMail(token, ids); + return new SuccessResult(); } @ApiOperation(value = "删除-垃圾箱邮件", notes = "删除-垃圾箱邮件") @@ -258,9 +262,10 @@ public class MailAppController extends DefaultBaseController { @ApiImplicitParam(name = "ids", value = "取id,多个id用逗号拼接", paramType = "path") }) @DeleteMapping("delete-app-del-mail/{ids}") - public void deleteAppDelMail(@RequestHeader("token") String token, - @PathVariable("ids") String ids){ + public SuccessResult deleteAppDelMail(@RequestHeader("token") String token, + @PathVariable("ids") String ids){ mailService.deleteDelMail(ids); + return new SuccessResult(); } @ApiOperation(value = "删除所有-垃圾箱邮件", notes = "删除所有-垃圾箱邮件") @@ -268,8 +273,9 @@ public class MailAppController extends DefaultBaseController { @ApiImplicitParam(name = "token", value = "token", paramType = "header") }) @DeleteMapping("delete-app-del-mail-all") - public void deleteAppDelMailAll(@RequestHeader("token") String token){ + public SuccessResult deleteAppDelMailAll(@RequestHeader("token") String token){ mailService.deleteAppDelMailAll(token); + return new SuccessResult(); } } 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 87de5f4..05d844b 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 @@ -45,7 +45,7 @@ public class MailDelDTO { private String creatorNames; @ApiModelProperty(name = "gmtCreate", value = "发件时间") private String gmtCreate; - @ApiModelProperty(name = "sourceFrom", value = "来源") + @ApiModelProperty(name = "sourceFrom", value = "来源(send:发件箱,inbox:收件箱,draft:草稿箱)") private String sourceFrom; @ApiModelProperty(name = "delUserId", value = "删除人") private String delUserId; 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 d153edf..d3869fc 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 @@ -546,6 +546,9 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService @Override public MailDelDTO getAppDelMail(String token, Map params) { MailDelDTO dto = mailDao.getDelMail(params); + UserDTO userDTO = userService.get(dto.getCreator()); + String creatorNames = userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]"; + dto.setCreatorNames(creatorNames); return dto; } diff --git a/src/main/resources/mybatis/mapper/mail/mail-mapper.xml b/src/main/resources/mybatis/mapper/mail/mail-mapper.xml index 00936d6..1d9dc14 100644 --- a/src/main/resources/mybatis/mapper/mail/mail-mapper.xml +++ b/src/main/resources/mybatis/mapper/mail/mail-mapper.xml @@ -183,37 +183,37 @@ UPDATE oa_mail_send_draft SET mail_id = #{mailId} - + ,recipient_ids = #{recipientIds} - + ,recipient_names = #{recipientNames} - + ,copy_for_ids = #{copyForIds} - + ,copy_for_names = #{copyForNames} - + ,secret_ids = #{secretIds} - + ,secret_names = #{secretNames} - + ,title = #{title} - + ,mail_files = #{mailFiles} - + ,content_rich = #{contentRich} - + ,content = #{content} - + ,gmt_create = #{gmtCreate} WHERE