登录成功后返回token过期时间

登录错误后将不在续订
This commit is contained in:
LuoYe_MyWork 2020-08-20 09:04:45 +08:00
parent f61139af38
commit 62886be7c2
2 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,7 @@
</parent> </parent>
<groupId>io.qyi</groupId> <groupId>io.qyi</groupId>
<artifactId>e5</artifactId> <artifactId>e5</artifactId>
<version>1.0.0</version> <version>1.0.6</version>
<name>e5</name> <name>e5</name>
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>

View File

@ -3,6 +3,7 @@ package io.qyi.e5.service.task.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.qyi.e5.outlook.entity.Outlook; import io.qyi.e5.outlook.entity.Outlook;
import io.qyi.e5.outlook.service.IOutlookService; import io.qyi.e5.outlook.service.IOutlookService;
import io.qyi.e5.outlook_log.service.IOutlookLogService;
import io.qyi.e5.service.task.ITask; import io.qyi.e5.service.task.ITask;
import io.qyi.e5.util.redis.RedisUtil; import io.qyi.e5.util.redis.RedisUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -37,6 +38,9 @@ public class TaskImpl implements ITask {
@Autowired @Autowired
RedisUtil redisUtil; RedisUtil redisUtil;
@Autowired
IOutlookLogService outlookLogService;
@Override @Override
@Async @Async
public void sendTaskOutlookMQ(int github_id) { public void sendTaskOutlookMQ(int github_id) {
@ -78,7 +82,11 @@ public class TaskImpl implements ITask {
logger.warn("未找到此用户,github_id: {}", github_id); logger.warn("未找到此用户,github_id: {}", github_id);
return false; return false;
} }
return outlookService.getMailList(Outlook); boolean mailList = outlookService.getMailList(Outlook);
if (!mailList) {
outlookLogService.addLog(github_id, "error", 0, "检测到错误,下次将不再自动调用,请修正错误后再授权开启续订。" );
}
return mailList;
} }
/** /**