From 62886be7c2e856f0d93ebe0e18c3861bf8b5c3ac Mon Sep 17 00:00:00 2001 From: LuoYe_MyWork Date: Thu, 20 Aug 2020 09:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E8=BF=94=E5=9B=9Etoken=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4=20?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=94=99=E8=AF=AF=E5=90=8E=E5=B0=86=E4=B8=8D?= =?UTF-8?q?=E5=9C=A8=E7=BB=AD=E8=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../java/io/qyi/e5/service/task/impl/TaskImpl.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 31261bd..812e31c 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ io.qyi e5 - 1.0.0 + 1.0.6 e5 Demo project for Spring Boot diff --git a/src/main/java/io/qyi/e5/service/task/impl/TaskImpl.java b/src/main/java/io/qyi/e5/service/task/impl/TaskImpl.java index 059a1f2..a3f2b2c 100644 --- a/src/main/java/io/qyi/e5/service/task/impl/TaskImpl.java +++ b/src/main/java/io/qyi/e5/service/task/impl/TaskImpl.java @@ -3,6 +3,7 @@ package io.qyi.e5.service.task.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.qyi.e5.outlook.entity.Outlook; 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.util.redis.RedisUtil; import org.slf4j.Logger; @@ -37,6 +38,9 @@ public class TaskImpl implements ITask { @Autowired RedisUtil redisUtil; + @Autowired + IOutlookLogService outlookLogService; + @Override @Async public void sendTaskOutlookMQ(int github_id) { @@ -78,7 +82,11 @@ public class TaskImpl implements ITask { logger.warn("未找到此用户,github_id: {}", github_id); return false; } - return outlookService.getMailList(Outlook); + boolean mailList = outlookService.getMailList(Outlook); + if (!mailList) { + outlookLogService.addLog(github_id, "error", 0, "检测到错误,下次将不再自动调用,请修正错误后再授权开启续订。" ); + } + return mailList; } /**