添加删除所有垃圾箱邮件接口

This commit is contained in:
wans 2022-04-22 09:45:49 +08:00
parent 420a97f541
commit 056da92bec
5 changed files with 32 additions and 1 deletions

View File

@ -263,4 +263,14 @@ public class MailAppController extends DefaultBaseController {
mailService.deleteDelMail(ids); mailService.deleteDelMail(ids);
} }
@ApiOperation(value = "删除所有-垃圾箱邮件", notes = "删除所有-垃圾箱邮件")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@DeleteMapping("delete-app-del-mail-all")
public void deleteAppDelMailAll(@RequestHeader("token") String token){
mailService.deleteAppDelMailAll(token);
}
} }

View File

@ -49,4 +49,6 @@ public interface IMailDao {
MailDelDTO getDelMail(Map<String, Object> params); MailDelDTO getDelMail(Map<String, Object> params);
void deleteDelMail(String ids); void deleteDelMail(String ids);
void deleteAppDelMailAll(Map<String, Object> query);
} }

View File

@ -99,4 +99,5 @@ public interface IMailService {
void deleteAppDraftMail(String token, String ids); void deleteAppDraftMail(String token, String ids);
void deleteAppDelMailAll(String token);
} }

View File

@ -485,6 +485,17 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService
mailDao.deleteDelMail(ids); mailDao.deleteDelMail(ids);
} }
@Override
public void deleteAppDelMailAll(String token) {
AppTokenUser appTokenUser = getAppTokenUser(token);
if(appTokenUser == null || "".equals(appTokenUser.getId())){
return;
}
Map<String, Object> query = new HashMap<>();
query.put("delUserId", appTokenUser.getId());
mailDao.deleteAppDelMailAll(query);
}
@Override @Override
public SuccessResultList<List<MailDelDTO>> listPageDelMail(ListPage page) { public SuccessResultList<List<MailDelDTO>> listPageDelMail(ListPage page) {
UserInfoBO currentUser = securityComponent.getCurrentUser(); UserInfoBO currentUser = securityComponent.getCurrentUser();

View File

@ -241,13 +241,20 @@
FIND_IN_SET(id, #{ids}) FIND_IN_SET(id, #{ids})
</delete> </delete>
<!-- 删除收件箱 --> <!-- 删除删除垃圾箱邮件 -->
<delete id="deleteDelMail" parameterType="string"> <delete id="deleteDelMail" parameterType="string">
DELETE FROM oa_mail_del DELETE FROM oa_mail_del
WHERE WHERE
FIND_IN_SET(id, #{ids}) FIND_IN_SET(id, #{ids})
</delete> </delete>
<!-- 删除所有垃圾箱邮件 -->
<delete id="deleteAppDelMailAll" parameterType="map">
DELETE FROM oa_mail_del
WHERE
del_user_id = #{delUserId}
</delete>
<!-- 垃圾箱保存 --> <!-- 垃圾箱保存 -->
<insert id="saveDelMail" parameterType="map"> <insert id="saveDelMail" parameterType="map">
INSERT INTO oa_mail_del ( INSERT INTO oa_mail_del (