From 2502b12e05029149f0cd5aea6c25bc419520cc4f Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 03 六月 2025 11:43:24 +0800
Subject: [PATCH] 视频主页部分接口

---
 framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

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 bf978a9..fcc57e9 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
@@ -6,6 +6,7 @@
 import cn.lili.modules.lmk.domain.entity.VideoTag;
 import cn.lili.modules.lmk.domain.entity.VideoTagRef;
 import cn.lili.modules.lmk.domain.form.*;
+import cn.lili.modules.lmk.domain.query.AuthorVideoQuery;
 import cn.lili.modules.lmk.domain.query.ManagerVideoQuery;
 import cn.lili.modules.lmk.domain.vo.*;
 import cn.lili.modules.lmk.enums.general.TagCreateTypeEnum;
@@ -315,4 +316,25 @@
         footprintService.saveFootprint(footPrint);
         return Result.ok();
     }
+
+    @Override
+    public Result getAuthorInfo(String authorId) {
+        VideoAccountVO vo = baseMapper.getAuthorInfo(authorId, UserContext.getCurrentUserId());
+        vo.setSelf(authorId.equals(UserContext.getCurrentUserId()));
+        // 鏌ヨ鑾疯禐鏁�
+        List<String> videoIds = baseMapper.getVideoIdsByAuthor(authorId);
+        if (CollectionUtils.isNotEmpty(videoIds)) {
+            vo.setLikeNum(baseMapper.countAuthorVideoCollectNum(videoIds));
+        } else {
+            vo.setLikeNum(0L);
+        }
+        return Result.ok().data(vo);
+    }
+
+    @Override
+    public Result getAuthorVideoPage(AuthorVideoQuery query) {
+        IPage<WxVideoVO> page = PageUtil.getPage(query, WxVideoVO.class);
+        baseMapper.getAuthorVideoPage(page, query);
+        return Result.ok().data(page.getRecords()).total(page.getTotal());
+    }
 }

--
Gitblit v1.8.0