diff --git a/pom.xml b/pom.xml
index a916eae..46ef961 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,8 +76,15 @@
com.alibaba
fastjson
- 1.2.62
+ 1.2.68
+
+
+ com.google.code.gson
+ gson
+ 2.8.6
+
+
mysql
mysql-connector-java
diff --git a/src/main/java/io/qyi/e5/controller/TestController.java b/src/main/java/io/qyi/e5/controller/TestController.java
index 9dd7839..eb15c77 100644
--- a/src/main/java/io/qyi/e5/controller/TestController.java
+++ b/src/main/java/io/qyi/e5/controller/TestController.java
@@ -1,5 +1,9 @@
package io.qyi.e5.controller;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.google.gson.Gson;
+import io.qyi.e5.outlook.entity.Outlook;
+import io.qyi.e5.outlook.service.IOutlookService;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
@@ -22,12 +26,15 @@ public class TestController {
@Autowired
RabbitTemplate rabbitTemplate;
+ @Autowired
+ IOutlookService outlookService;
+
@GetMapping("/send")
public void aaa() {
CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
+ Outlook Outlook = outlookService.getOne(new QueryWrapper().eq("github_id", 19658189));
-
- rabbitTemplate.convertAndSend("delay", "delay", "ttt", message -> {
+ rabbitTemplate.convertAndSend("delay", "delay", Outlook, message -> {
MessageProperties messageProperties = message.getMessageProperties();
// 设置这条消息的过期时间
messageProperties.setExpiration("5000");
diff --git a/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java b/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java
index 5286c7d..25feff2 100644
--- a/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java
+++ b/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java
@@ -171,7 +171,6 @@ public class OutlookServiceImpl extends ServiceImpl impl
String s = OkHttpRequestUtils.doGet("https://graph.microsoft.com/v1.0/me/messages?$select=sender,subject", head, null);
logger.info("请求邮件列表返回数据:" + s);
return s;
-
}
diff --git a/src/main/java/io/qyi/e5/outlook_log/controller/OutlookLogController.java b/src/main/java/io/qyi/e5/outlook_log/controller/OutlookLogController.java
index bb23a65..57a17bc 100644
--- a/src/main/java/io/qyi/e5/outlook_log/controller/OutlookLogController.java
+++ b/src/main/java/io/qyi/e5/outlook_log/controller/OutlookLogController.java
@@ -2,6 +2,7 @@ package io.qyi.e5.outlook_log.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.google.gson.Gson;
import io.qyi.e5.config.security.UsernamePasswordAuthenticationToken;
import io.qyi.e5.outlook.entity.Outlook;
import io.qyi.e5.outlook.service.IOutlookService;
@@ -16,6 +17,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@@ -45,24 +47,16 @@ public class OutlookLogController {
private int pageSize;
@GetMapping("/findLog")
+ @ResponseBody
public String findLog(Model model){
UsernamePasswordAuthenticationToken authentication = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();
int github_id = authentication.getGithub_id();
- /*QueryWrapper wrapper = new QueryWrapper();
- wrapper.eq("github_id", github_id);
- Page page = new Page<>(8,pageSize);
-
- IPage