From 2ddbd99aa5b2e396f96c6daba60fe1ac2573d9fb Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Sat, 18 May 2024 11:53:54 +0800
Subject: [PATCH] 新增RSS 订阅链接

---
 snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java b/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java
index 69f7351..26834c9 100644
--- a/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java
+++ b/snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java
@@ -30,7 +30,6 @@
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.PageUtil;
 import cn.hutool.core.util.StrUtil;
-import cn.hutool.crypto.SecureUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.validation.annotation.Validated;
@@ -84,7 +83,7 @@
     @PostMapping("/blogArticle/add")
     @BusinessLog(title = "外部blog系统_blog文章_增加", opType = LogAnnotionOpTypeEnum.ADD)
     public ResponseData add(@RequestBody @Validated(BlogArticleAddDto.add.class) BlogArticleAddDto addDto) {
-        if (!SecureUtil.md5(addDto.getSecret()).equals(ConstantContextHolder.getPushCode())) {
+        if (!addDto.getSecret().equals(ConstantContextHolder.getPushCode())) {
             throw new BlogException("口令错误..");
         }
 
@@ -152,6 +151,7 @@
         param.put("pageSize", queryDto.getPageSize());
         param.put("typeId", queryDto.getTypeId());
         param.put("fileType", queryDto.getFileType());
+        param.put("faceExcludeFile", MyConstant.faceExcludeFile);
 
         String blogSourcePrefix = ConstantContextHolder.getBlogSourcePrefix();
 
@@ -200,15 +200,19 @@
         Map<String, Object> param = new HashMap<>(16);
         param.put("pageNo", PageUtil.getStart(queryDto.getPageNo() - 1, queryDto.getPageSize()));
         param.put("pageSize", queryDto.getPageSize());
+        param.put("id", queryDto.getId());
 
-        if (queryDto.getActiveKey().equals(MyConstant.platformType.type_2)) {
-            param.put("typeIds", new Long[]{10L});//临时id,后续需要修改(前方高能分类)
+        if (queryDto.getActiveKey().equals(MyConstant.platformType.type_1)) {
+            param.put("typeIds", new Long[]{66L});//临时id
+            param.put("fileType", MyConstant.FileType.fileTypeVideo_3);
+        } else if (queryDto.getActiveKey().equals(MyConstant.platformType.type_2)) {
+            param.put("typeIds", new Long[]{55L});//临时id,后续需要修改(前方高能分类)
             param.put("fileType", MyConstant.FileType.fileTypeVideo_3);
         } else if (queryDto.getActiveKey().equals(MyConstant.platformType.type_3)) {
-            param.put("typeIds", new Long[]{99L});//临时id,后续需要修改
-            param.put("fileType", MyConstant.FileType.fileTypePhoto_9);
+            param.put("typeIds", new Long[]{99L});//临时id,后续需要修改(图组)
+            param.put("fileType", MyConstant.FileType.fileTypePictures_5);
         } else {
-            param.put("typeIds", new Long[]{4L});//临时id,后续需要修改(音乐分类)
+            param.put("typeIds", new Long[]{66L});//临时id,后续需要修改(音乐分类)
             param.put("fileType", MyConstant.FileType.fileTypeVideo_3);
         }
 
@@ -275,6 +279,14 @@
 
         BeanUtil.copyProperties(find, vo);
 
+        //补充视频组,图片组的url
+        if (StrUtil.isNotEmpty(vo.getPictureIds())) {
+            vo.setPictureUrlList(this.getBlogSourceURLBatch(Arrays.stream(vo.getPictureIds().split(SymbolConstant.COMMA)).collect(Collectors.toList())));
+        }
+        if (StrUtil.isNotEmpty(vo.getVideoIds())) {
+            vo.setVideoUrlList(this.getBlogSourceURLBatch(Arrays.stream(vo.getVideoIds().split(SymbolConstant.COMMA)).collect(Collectors.toList())));
+        }
+
 
         String tempURL = this.getBlogSourceURL(find.getArticleFileId());
 

--
Gitblit v1.9.1