修改邮件问题
This commit is contained in:
parent
761100fb6d
commit
0038450b57
@ -53,12 +53,10 @@ public class MailAppController extends DefaultBaseController {
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get-app-user-unread-mail")
|
||||
public SuccessResult getAppUserUnreadMail(@RequestHeader("token") String token){
|
||||
public SuccessResultData getAppUserUnreadMail(@RequestHeader("token") String token){
|
||||
Map<String, Object> params = requestParams();
|
||||
Integer unreadCounts = mailService.getAppUserUnreadMail(token, params);
|
||||
params.clear();
|
||||
params.put("unreadCounts", unreadCounts);
|
||||
return new SuccessResultData<>(params);
|
||||
return new SuccessResultData<>(unreadCounts);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量发送内部邮件接口", notes = "批量发送内部邮件接口")
|
||||
|
@ -63,7 +63,15 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService
|
||||
params.clear();
|
||||
params.put("userId", appTokenUser.getId());
|
||||
List<MailInboxDTO> list = mailDao.listInboxMail(params);
|
||||
return list == null ? 0 : list.size();
|
||||
int unreadCount = 0;
|
||||
for(MailInboxDTO item : list){
|
||||
params.put("id", item.getId());
|
||||
Map<String, Object> userMailReadTag = mailDao.getUserMailReadTag(params);
|
||||
if(userMailReadTag == null){
|
||||
unreadCount++;
|
||||
}
|
||||
}
|
||||
return unreadCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,6 +80,7 @@
|
||||
WHERE
|
||||
id = #{id}
|
||||
AND user_id = #{userId}
|
||||
ORDER BY read_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user