From 764a0fb1f27f9d7e3634686af47580a6f42b1ae3 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 09 六月 2025 23:08:23 +0800
Subject: [PATCH] framework不引xxl-job依赖及配置,consumer、job模块单独引入

---
 framework/pom.xml                                                              |    6 +-----
 lmk-job/src/main/java/cn/lili/config/XxlJobConfig.java                         |    0 
 consumer/pom.xml                                                               |    5 +++++
 lmk-job/pom.xml                                                                |    7 +++++++
 framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java |   18 +++++++++---------
 consumer/src/main/java/cn/lili/config/XxlJobConfig.java                        |    0 
 6 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/consumer/pom.xml b/consumer/pom.xml
index e28f63e..fad02f7 100644
--- a/consumer/pom.xml
+++ b/consumer/pom.xml
@@ -18,6 +18,11 @@
             <artifactId>framework</artifactId>
             <version>${revision}</version>
         </dependency>
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>${xxl-job}</version>
+        </dependency>
     </dependencies>
 
     <repositories>
diff --git a/framework/src/main/java/cn/lili/config/XxlJobConfig.java b/consumer/src/main/java/cn/lili/config/XxlJobConfig.java
similarity index 100%
rename from framework/src/main/java/cn/lili/config/XxlJobConfig.java
rename to consumer/src/main/java/cn/lili/config/XxlJobConfig.java
diff --git a/framework/pom.xml b/framework/pom.xml
index 4bc2af7..fbe9bf9 100644
--- a/framework/pom.xml
+++ b/framework/pom.xml
@@ -22,11 +22,7 @@
             <version>3.1.0</version>
         </dependency>
 
-        <dependency>
-            <groupId>com.xuxueli</groupId>
-            <artifactId>xxl-job-core</artifactId>
-            <version>${xxl-job}</version>
-        </dependency>
+
 
         <dependency>
             <groupId>com.qiniu</groupId>
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
index 30e5b32..fd8bf5d 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
@@ -132,7 +132,7 @@
         Assert.notNull(vo, "璁板綍涓嶅瓨鍦�");
         List<SimpleVideoTagVO> tags = videoTagRefService.getTagsByVideoIds(Arrays.asList(id));
         vo.setTagList(tags);
-//        vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
+        vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
         return Result.ok().data(vo);
     }
 
@@ -297,8 +297,8 @@
                 v.setGoods(new VideoGoodsVO());
                 v.setTagList(tagMap.get(v.getId()));
                 v.setCollected(CollectionUtils.isNotEmpty(collectMap.get(v.getId())));
-//                v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey()));
-                v.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
+                v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey()));
+//                v.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
                 v.setCoverUrl(cosUtil.getPreviewUrl(v.getCoverFileKey()));
                 v.setSubscribeThisAuthor(subscribes.contains(v.getAuthorId()));
             });
@@ -359,8 +359,8 @@
         baseMapper.getAuthorVideoPage(page, query);
         for (WxVideoVO vo : page.getRecords()) {
             vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverFileKey()));
-//            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
-            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
+            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
+//            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
             vo.setOptions(VideoSupportOpEnum.getVideoOpByStatus(vo.getStatus()));
         }
         return Result.ok().data(page.getRecords()).total(page.getTotal());
@@ -372,8 +372,8 @@
         baseMapper.getAuthorCollectVideoPage(page, query);
         for (WxVideoVO vo : page.getRecords()) {
             vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverFileKey()));
-//            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
-            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
+            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
+//            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
             vo.setCollected(Boolean.TRUE);
         }
         return Result.ok().data(page.getRecords()).total(page.getTotal());
@@ -401,8 +401,8 @@
             return Result.error("瑙嗛涓嶅瓨鍦�");
         }
         vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverFileKey()));
-//        vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
-        vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
+        vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
+//        vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
         List<WxVideoTagForm> tags = videoTagRefService.getTagsByVideoIds(Arrays.asList(vo.getId()))
                 .stream()
                 .map(i -> {
diff --git a/lmk-job/pom.xml b/lmk-job/pom.xml
index 22cbc1a..fc6f902 100644
--- a/lmk-job/pom.xml
+++ b/lmk-job/pom.xml
@@ -19,6 +19,13 @@
             <artifactId>framework</artifactId>
             <version>${revision}</version>
         </dependency>
+
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>${xxl-job}</version>
+        </dependency>
+
     </dependencies>
 
     <build>
diff --git a/framework/src/main/java/cn/lili/config/XxlJobConfig.java b/lmk-job/src/main/java/cn/lili/config/XxlJobConfig.java
similarity index 100%
copy from framework/src/main/java/cn/lili/config/XxlJobConfig.java
copy to lmk-job/src/main/java/cn/lili/config/XxlJobConfig.java

--
Gitblit v1.8.0