From 6878457f4448e750ca20d7770e7afb056d0153d0 Mon Sep 17 00:00:00 2001
From: YXY <932687738@qq.com>
Date: Sun, 12 Mar 2023 22:39:24 +0800
Subject: [PATCH] change package
---
pom.xml | 2 +-
.../main/java/com/ruoyi/RuoYiApplication.java | 4 ---
.../com/ruoyi/common/base/LarkRequest.java | 1 +
ruoyi-flyingbook/pom.xml | 1 +
.../LarkHelper/LarkTokenHelper.java | 6 +----
.../RuoyiFlyingbookApplication.java | 2 +-
.../flyingbook/config/DocxSample.java | 2 +-
.../flyingbook/config/RawApiCall.java | 2 +-
.../controller/EventController.java | 26 ++++++++-----------
.../controller/EventControllers.java | 2 +-
.../{ => ruoyi}/flyingbook/domain/Event.java | 2 +-
.../flyingbook/domain/EventLog.java | 2 +-
.../domain/LarkCompanyRelation.java | 2 +-
.../flyingbook/domain/LarkTableRelation.java | 2 +-
.../flyingbook/mapper/EventLogMapper.java | 4 +--
.../flyingbook/mapper/EventMapper.java | 4 +--
.../mapper/LarkCompanyRelationMapper.java | 4 +--
.../mapper/LarkTableRelationMapper.java | 4 +--
.../flyingbook/service/IEventLogService.java | 4 +--
.../flyingbook/service/IEventService.java | 4 +--
.../service/ILarkCompanyRelationService.java | 4 +--
.../service/ILarkTableRelationService.java | 4 +--
.../service/impl/EventLogServiceImpl.java | 8 +++---
.../service/impl/EventServiceImpl.java | 8 +++---
.../impl/LarkCompanyRelationServiceImpl.java | 8 +++---
.../impl/LarkTableRelationServiceImpl.java | 8 +++---
.../flyingbook/strategy/ApprovalCallback.java | 25 +++++++++++-------
.../flyingbook/strategy/CallbackAbstract.java | 2 +-
.../main/resources/mapper/EventLogMapper.xml | 10 +++----
.../src/main/resources/mapper/EventMapper.xml | 10 +++----
.../mapper/LarkCompanyRelationMapper.xml | 10 +++----
.../mapper/LarkTableRelationMapper.xml | 10 +++----
32 files changed, 92 insertions(+), 95 deletions(-)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/LarkHelper/LarkTokenHelper.java (93%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/RuoyiFlyingbookApplication.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/config/DocxSample.java (98%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/config/RawApiCall.java (97%)
rename {ruoyi-admin/src/main/java/com/ruoyi/web => ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook}/controller/EventController.java (63%)
rename {ruoyi-admin/src/main/java/com/ruoyi/web => ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook}/controller/EventControllers.java (99%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/domain/Event.java (97%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/domain/EventLog.java (98%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/domain/LarkCompanyRelation.java (98%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/domain/LarkTableRelation.java (98%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/mapper/EventLogMapper.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/mapper/EventMapper.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/mapper/LarkCompanyRelationMapper.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/mapper/LarkTableRelationMapper.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/IEventLogService.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/IEventService.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/ILarkCompanyRelationService.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/ILarkTableRelationService.java (94%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/impl/EventLogServiceImpl.java (91%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/impl/EventServiceImpl.java (91%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/impl/LarkCompanyRelationServiceImpl.java (92%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/service/impl/LarkTableRelationServiceImpl.java (92%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/strategy/ApprovalCallback.java (75%)
rename ruoyi-flyingbook/src/main/java/com/{ => ruoyi}/flyingbook/strategy/CallbackAbstract.java (85%)
diff --git a/pom.xml b/pom.xml
index af91428..cb370af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -218,7 +218,7 @@
com.ruoyi
ruoyi-flyingbook
- ${ruoyi.version}
+ 3.4.1-SNAPSHOT
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
index 2cf8a50..70adbb6 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
@@ -20,8 +20,4 @@ public class RuoYiApplication
SpringApplication.run(RuoYiApplication.class, args);
}
- @Bean
- public ServletAdapter getServletAdapter() {
- return new ServletAdapter();
- }
}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/base/LarkRequest.java b/ruoyi-common/src/main/java/com/ruoyi/common/base/LarkRequest.java
index 4964483..728456a 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/base/LarkRequest.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/base/LarkRequest.java
@@ -9,4 +9,5 @@ import lombok.Data;
@Data
public class LarkRequest {
private Long eventId;
+ private String message;
}
diff --git a/ruoyi-flyingbook/pom.xml b/ruoyi-flyingbook/pom.xml
index 18babe5..26b17c9 100644
--- a/ruoyi-flyingbook/pom.xml
+++ b/ruoyi-flyingbook/pom.xml
@@ -7,6 +7,7 @@
com.ruoyi
3.4.0
+ 3.4.1-SNAPSHOT
ruoyi-flyingbook
ruoyi-flyingbook
Demo project for Spring Boot
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/LarkHelper/LarkTokenHelper.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/LarkHelper/LarkTokenHelper.java
similarity index 93%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/LarkHelper/LarkTokenHelper.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/LarkHelper/LarkTokenHelper.java
index fd78fa3..aa04d6c 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/LarkHelper/LarkTokenHelper.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/LarkHelper/LarkTokenHelper.java
@@ -1,11 +1,7 @@
-package com.flyingbook.LarkHelper;
+package com.ruoyi.flyingbook.LarkHelper;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
-import com.lark.oapi.Client;
-import com.lark.oapi.core.request.RequestOptions;
-import com.lark.oapi.core.response.RawResponse;
-import com.lark.oapi.core.token.AccessTokenType;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/RuoyiFlyingbookApplication.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/RuoyiFlyingbookApplication.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/RuoyiFlyingbookApplication.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/RuoyiFlyingbookApplication.java
index 9a47537..dd5f1a0 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/RuoyiFlyingbookApplication.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/RuoyiFlyingbookApplication.java
@@ -1,4 +1,4 @@
-package com.flyingbook;
+package com.ruoyi.flyingbook;
import com.lark.oapi.sdk.servlet.ext.ServletAdapter;
import org.springframework.boot.SpringApplication;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/config/DocxSample.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/config/DocxSample.java
similarity index 98%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/config/DocxSample.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/config/DocxSample.java
index c188257..c622c38 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/config/DocxSample.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/config/DocxSample.java
@@ -1,4 +1,4 @@
-package com.flyingbook.config;
+package com.ruoyi.flyingbook.config;
import com.lark.oapi.Client;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/config/RawApiCall.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/config/RawApiCall.java
similarity index 97%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/config/RawApiCall.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/config/RawApiCall.java
index 2ed7a91..fd5db3d 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/config/RawApiCall.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/config/RawApiCall.java
@@ -1,4 +1,4 @@
-package com.flyingbook.config;
+package com.ruoyi.flyingbook.config;
import com.lark.oapi.Client;
import com.lark.oapi.core.enums.AppType;
import com.lark.oapi.core.response.RawResponse;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EventController.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/controller/EventController.java
similarity index 63%
rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/EventController.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/controller/EventController.java
index c8c04f6..0de8c0d 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EventController.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/controller/EventController.java
@@ -1,24 +1,14 @@
-package com.ruoyi.web.controller;
+package com.ruoyi.flyingbook.controller;
import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.base.LarkRequest;
+import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.utils.DecryptUtil;
-import com.sun.org.apache.bcel.internal.generic.IfInstruction;
+import com.ruoyi.flyingbook.strategy.ApprovalCallback;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
-import com.lark.oapi.core.utils.Jsons;
-import com.lark.oapi.event.EventDispatcher;
-import com.lark.oapi.service.contact.v3.ContactService;
-import com.lark.oapi.service.contact.v3.model.P2UserCreatedV3;
-import com.lark.oapi.service.im.v1.ImService;
-import com.lark.oapi.service.im.v1.model.P1MessageReadV1;
-import com.lark.oapi.service.im.v1.model.P2MessageReadV1;
-import com.lark.oapi.service.im.v1.model.P2MessageReceiveV1;
-import com.lark.oapi.sdk.servlet.ext.ServletAdapter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -27,7 +17,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
@Slf4j
@RestController
@RequestMapping("/event/test1")
-public class EventController {
+public class EventController extends BaseController {
+
+ @Autowired
+ private ApprovalCallback approvalCallback;
//3. 创建路由处理器
@PostMapping("/approval")
@@ -45,6 +38,9 @@ public class EventController {
result = jsonObject.getString("challenge");
log.info("/event/test1/approval request:{} challenge:{}", jsonObject.toJSONString(), result);
}
+ LarkRequest larkRequest = new LarkRequest();
+ larkRequest.setMessage(result);
+ approvalCallback.execute(larkRequest);
return result;
}
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EventControllers.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/controller/EventControllers.java
similarity index 99%
rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/EventControllers.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/controller/EventControllers.java
index 4706bb7..6c6cdca 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/EventControllers.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/controller/EventControllers.java
@@ -1,4 +1,4 @@
-package com.ruoyi.web.controller;
+package com.ruoyi.flyingbook.controller;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.utils.DecryptUtil;
import lombok.extern.slf4j.Slf4j;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/Event.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/Event.java
similarity index 97%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/domain/Event.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/Event.java
index c289027..56a86a8 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/Event.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/Event.java
@@ -1,4 +1,4 @@
-package com.flyingbook.domain;
+package com.ruoyi.flyingbook.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/EventLog.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/EventLog.java
similarity index 98%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/domain/EventLog.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/EventLog.java
index bfcf155..a84d57b 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/EventLog.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/EventLog.java
@@ -1,4 +1,4 @@
-package com.flyingbook.domain;
+package com.ruoyi.flyingbook.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/LarkCompanyRelation.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/LarkCompanyRelation.java
similarity index 98%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/domain/LarkCompanyRelation.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/LarkCompanyRelation.java
index e1fd3e7..d9e03b6 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/LarkCompanyRelation.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/LarkCompanyRelation.java
@@ -1,4 +1,4 @@
-package com.flyingbook.domain;
+package com.ruoyi.flyingbook.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/LarkTableRelation.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/LarkTableRelation.java
similarity index 98%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/domain/LarkTableRelation.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/LarkTableRelation.java
index 7318286..5f1f7bc 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/domain/LarkTableRelation.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/domain/LarkTableRelation.java
@@ -1,4 +1,4 @@
-package com.flyingbook.domain;
+package com.ruoyi.flyingbook.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/EventLogMapper.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/EventLogMapper.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/EventLogMapper.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/EventLogMapper.java
index df29c65..af10514 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/EventLogMapper.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/EventLogMapper.java
@@ -1,7 +1,7 @@
-package com.flyingbook.mapper;
+package com.ruoyi.flyingbook.mapper;
-import com.flyingbook.domain.EventLog;
+import com.ruoyi.flyingbook.domain.EventLog;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/EventMapper.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/EventMapper.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/EventMapper.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/EventMapper.java
index 8a17a58..3f237e4 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/EventMapper.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/EventMapper.java
@@ -1,7 +1,7 @@
-package com.flyingbook.mapper;
+package com.ruoyi.flyingbook.mapper;
-import com.flyingbook.domain.Event;
+import com.ruoyi.flyingbook.domain.Event;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/LarkCompanyRelationMapper.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/LarkCompanyRelationMapper.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/LarkCompanyRelationMapper.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/LarkCompanyRelationMapper.java
index dec71f8..64ad41a 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/LarkCompanyRelationMapper.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/LarkCompanyRelationMapper.java
@@ -1,7 +1,7 @@
-package com.flyingbook.mapper;
+package com.ruoyi.flyingbook.mapper;
-import com.flyingbook.domain.LarkCompanyRelation;
+import com.ruoyi.flyingbook.domain.LarkCompanyRelation;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/LarkTableRelationMapper.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/LarkTableRelationMapper.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/LarkTableRelationMapper.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/LarkTableRelationMapper.java
index 6f40c50..9efe617 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/mapper/LarkTableRelationMapper.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/mapper/LarkTableRelationMapper.java
@@ -1,7 +1,7 @@
-package com.flyingbook.mapper;
+package com.ruoyi.flyingbook.mapper;
-import com.flyingbook.domain.LarkTableRelation;
+import com.ruoyi.flyingbook.domain.LarkTableRelation;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/IEventLogService.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/IEventLogService.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/IEventLogService.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/IEventLogService.java
index 35efa88..5ee0d25 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/IEventLogService.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/IEventLogService.java
@@ -1,7 +1,7 @@
-package com.flyingbook.service;
+package com.ruoyi.flyingbook.service;
-import com.flyingbook.domain.EventLog;
+import com.ruoyi.flyingbook.domain.EventLog;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/IEventService.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/IEventService.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/IEventService.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/IEventService.java
index a97183a..57afc98 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/IEventService.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/IEventService.java
@@ -1,7 +1,7 @@
-package com.flyingbook.service;
+package com.ruoyi.flyingbook.service;
-import com.flyingbook.domain.Event;
+import com.ruoyi.flyingbook.domain.Event;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/ILarkCompanyRelationService.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/ILarkCompanyRelationService.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/ILarkCompanyRelationService.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/ILarkCompanyRelationService.java
index 1d5a74b..9fbba5e 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/ILarkCompanyRelationService.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/ILarkCompanyRelationService.java
@@ -1,7 +1,7 @@
-package com.flyingbook.service;
+package com.ruoyi.flyingbook.service;
-import com.flyingbook.domain.LarkCompanyRelation;
+import com.ruoyi.flyingbook.domain.LarkCompanyRelation;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/ILarkTableRelationService.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/ILarkTableRelationService.java
similarity index 94%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/ILarkTableRelationService.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/ILarkTableRelationService.java
index 46dc468..22e6bdd 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/ILarkTableRelationService.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/ILarkTableRelationService.java
@@ -1,7 +1,7 @@
-package com.flyingbook.service;
+package com.ruoyi.flyingbook.service;
-import com.flyingbook.domain.LarkTableRelation;
+import com.ruoyi.flyingbook.domain.LarkTableRelation;
import java.util.List;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/EventLogServiceImpl.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/EventLogServiceImpl.java
similarity index 91%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/EventLogServiceImpl.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/EventLogServiceImpl.java
index 593e207..827a50c 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/EventLogServiceImpl.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/EventLogServiceImpl.java
@@ -1,10 +1,10 @@
-package com.flyingbook.service.impl;
+package com.ruoyi.flyingbook.service.impl;
import java.util.List;
-import com.flyingbook.domain.EventLog;
-import com.flyingbook.mapper.EventLogMapper;
-import com.flyingbook.service.IEventLogService;
+import com.ruoyi.flyingbook.domain.EventLog;
+import com.ruoyi.flyingbook.mapper.EventLogMapper;
+import com.ruoyi.flyingbook.service.IEventLogService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/EventServiceImpl.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/EventServiceImpl.java
similarity index 91%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/EventServiceImpl.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/EventServiceImpl.java
index 7eae668..98bd8b1 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/EventServiceImpl.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/EventServiceImpl.java
@@ -1,9 +1,9 @@
-package com.flyingbook.service.impl;
+package com.ruoyi.flyingbook.service.impl;
-import com.flyingbook.domain.Event;
-import com.flyingbook.mapper.EventMapper;
-import com.flyingbook.service.IEventService;
+import com.ruoyi.flyingbook.domain.Event;
+import com.ruoyi.flyingbook.mapper.EventMapper;
+import com.ruoyi.flyingbook.service.IEventService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/LarkCompanyRelationServiceImpl.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/LarkCompanyRelationServiceImpl.java
similarity index 92%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/LarkCompanyRelationServiceImpl.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/LarkCompanyRelationServiceImpl.java
index 885e1e2..30c489d 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/LarkCompanyRelationServiceImpl.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/LarkCompanyRelationServiceImpl.java
@@ -1,10 +1,10 @@
-package com.flyingbook.service.impl;
+package com.ruoyi.flyingbook.service.impl;
import java.util.List;
-import com.flyingbook.domain.LarkCompanyRelation;
-import com.flyingbook.mapper.LarkCompanyRelationMapper;
-import com.flyingbook.service.ILarkCompanyRelationService;
+import com.ruoyi.flyingbook.domain.LarkCompanyRelation;
+import com.ruoyi.flyingbook.mapper.LarkCompanyRelationMapper;
+import com.ruoyi.flyingbook.service.ILarkCompanyRelationService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/LarkTableRelationServiceImpl.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/LarkTableRelationServiceImpl.java
similarity index 92%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/LarkTableRelationServiceImpl.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/LarkTableRelationServiceImpl.java
index d2e7876..4e5b2cc 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/service/impl/LarkTableRelationServiceImpl.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/service/impl/LarkTableRelationServiceImpl.java
@@ -1,10 +1,10 @@
-package com.flyingbook.service.impl;
+package com.ruoyi.flyingbook.service.impl;
import java.util.List;
-import com.flyingbook.domain.LarkTableRelation;
-import com.flyingbook.mapper.LarkTableRelationMapper;
-import com.flyingbook.service.ILarkTableRelationService;
+import com.ruoyi.flyingbook.domain.LarkTableRelation;
+import com.ruoyi.flyingbook.mapper.LarkTableRelationMapper;
+import com.ruoyi.flyingbook.service.ILarkTableRelationService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/strategy/ApprovalCallback.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/strategy/ApprovalCallback.java
similarity index 75%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/strategy/ApprovalCallback.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/strategy/ApprovalCallback.java
index 5da8ea0..622c0a2 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/strategy/ApprovalCallback.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/strategy/ApprovalCallback.java
@@ -1,9 +1,9 @@
-package com.flyingbook.strategy;
+package com.ruoyi.flyingbook.strategy;
-import com.flyingbook.domain.Event;
-import com.flyingbook.domain.EventLog;
-import com.flyingbook.service.IEventLogService;
-import com.flyingbook.service.IEventService;
+import com.ruoyi.flyingbook.domain.Event;
+import com.ruoyi.flyingbook.domain.EventLog;
+import com.ruoyi.flyingbook.service.IEventLogService;
+import com.ruoyi.flyingbook.service.IEventService;
import com.ruoyi.common.base.LarkRequest;
import com.ruoyi.common.constant.RedisConstants;
import com.ruoyi.common.enums.EventOperateStatus;
@@ -12,7 +12,7 @@ import com.ruoyi.common.enums.FlagStatus;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
import java.util.Date;
@@ -21,7 +21,7 @@ import java.util.Date;
* @create 2023-03-12 15:58
*/
@Slf4j
-@Component("approvalCallback")
+@Service
public class ApprovalCallback extends CallbackAbstract {
@Autowired
@@ -34,7 +34,7 @@ public class ApprovalCallback extends CallbackAbstract {
@Override
protected Boolean check(LarkRequest request) {
String message = "";
- return Boolean.FALSE;
+ return Boolean.TRUE;
}
@Override
@@ -44,7 +44,7 @@ public class ApprovalCallback extends CallbackAbstract {
@Override
protected void businessProcessing(LarkRequest request) {
- String message = "aaa";
+ String message = request.getMessage();
Event event = this.buildDto(message);
int i = eventService.insertEvent(event);
request.setEventId(event.getId());
@@ -53,13 +53,20 @@ public class ApprovalCallback extends CallbackAbstract {
@Override
protected void endHandle(LarkRequest request) {
+ if (request.getEventId() == null){
+ return;
+ }
redisTemplate.opsForList().rightPush(RedisConstants.MULTIDIMENSIONALTABULARFEEDBACK,request.getEventId());
EventLog eventLog = new EventLog();
+ eventLog.setCreateBy("Syetem");
+ eventLog.setCreateTime(new Date());
eventLog.setFlag(FlagStatus.OK.getCode());
eventLog.setOperateStatus(EventOperateStatus.PENDING.getCode());
eventLog.setOperateType(EventOperateType.CALL_BACK.getCode());
eventLog.setEventId(request.getEventId());
eventLogService.insertEventLog(eventLog);
+ Object o = redisTemplate.opsForList().leftPop(RedisConstants.MULTIDIMENSIONALTABULARFEEDBACK);
+ System.out.println(String.valueOf(o));
}
@Override
diff --git a/ruoyi-flyingbook/src/main/java/com/flyingbook/strategy/CallbackAbstract.java b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/strategy/CallbackAbstract.java
similarity index 85%
rename from ruoyi-flyingbook/src/main/java/com/flyingbook/strategy/CallbackAbstract.java
rename to ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/strategy/CallbackAbstract.java
index 755f474..b2112fe 100644
--- a/ruoyi-flyingbook/src/main/java/com/flyingbook/strategy/CallbackAbstract.java
+++ b/ruoyi-flyingbook/src/main/java/com/ruoyi/flyingbook/strategy/CallbackAbstract.java
@@ -1,4 +1,4 @@
-package com.flyingbook.strategy;
+package com.ruoyi.flyingbook.strategy;
import com.ruoyi.common.service.LarkOperateAbstract;
import lombok.extern.slf4j.Slf4j;
diff --git a/ruoyi-flyingbook/src/main/resources/mapper/EventLogMapper.xml b/ruoyi-flyingbook/src/main/resources/mapper/EventLogMapper.xml
index b6dfe2f..cbf0bcc 100644
--- a/ruoyi-flyingbook/src/main/resources/mapper/EventLogMapper.xml
+++ b/ruoyi-flyingbook/src/main/resources/mapper/EventLogMapper.xml
@@ -2,9 +2,9 @@
-
+
-
+
@@ -39,7 +39,7 @@
from event_log
-