diff --git a/.idea/.cache/.Apifox_Helper/.toolWindow.db b/.idea/.cache/.Apifox_Helper/.toolWindow.db
index 7b57fac..fd168ed 100644
Binary files a/.idea/.cache/.Apifox_Helper/.toolWindow.db and b/.idea/.cache/.Apifox_Helper/.toolWindow.db differ
diff --git a/.idea/ApifoxUploaderProjectSetting.xml b/.idea/ApifoxUploaderProjectSetting.xml
index f7f3101..01b4d2b 100644
--- a/.idea/ApifoxUploaderProjectSetting.xml
+++ b/.idea/ApifoxUploaderProjectSetting.xml
@@ -7,9 +7,11 @@
+
+
-
-
+
+
\ No newline at end of file
diff --git a/video-comment/pom.xml b/video-comment/pom.xml
index 42f9011..25ad03e 100644
--- a/video-comment/pom.xml
+++ b/video-comment/pom.xml
@@ -12,10 +12,116 @@
video-comment
+
com.nuaa.video
video-common
${project.version}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ com.mysql
+ mysql-connector-j
+ runtime
+
+
+
+
+ com.baomidou
+ mybatis-plus-spring-boot3-starter
+ 3.5.11
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+
+ cn.hutool
+ hutool-all
+ 5.8.26
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/CommentApplication.java b/video-comment/src/main/java/com/nuaa/video/comment/CommentApplication.java
index 2757cf2..1a9e319 100644
--- a/video-comment/src/main/java/com/nuaa/video/comment/CommentApplication.java
+++ b/video-comment/src/main/java/com/nuaa/video/comment/CommentApplication.java
@@ -1,11 +1,18 @@
package com.nuaa.video.comment;
+import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+/**
+ * 评论服务启动类
+ */
@SpringBootApplication
@EnableDiscoveryClient
+@EnableFeignClients
+@MapperScan("com.nuaa.video.comment.mapper")
public class CommentApplication {
public static void main(String[] args) {
SpringApplication.run(CommentApplication.class, args);
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/config/SecurityConfig.java b/video-comment/src/main/java/com/nuaa/video/comment/config/SecurityConfig.java
new file mode 100644
index 0000000..5176064
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/config/SecurityConfig.java
@@ -0,0 +1,41 @@
+package com.nuaa.video.comment.config;
+
+import com.nuaa.video.comment.filter.JwtAuthenticationFilter;
+import lombok.RequiredArgsConstructor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.web.SecurityFilterChain;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+
+/**
+ * 安全配置类
+ */
+@Configuration
+@EnableWebSecurity
+@RequiredArgsConstructor
+public class SecurityConfig {
+
+ private final JwtAuthenticationFilter jwtAuthenticationFilter;
+
+ @Bean
+ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+ http
+ .csrf(csrf -> csrf.disable())
+ .cors(cors -> cors.disable())
+ .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
+ .authorizeHttpRequests(auth -> auth
+ .requestMatchers(
+ "/comment/public/**",
+ "/actuator/**",
+ "/error"
+ ).permitAll()
+ .anyRequest().authenticated()
+ )
+ .addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
+
+ return http.build();
+ }
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/controller/CommentController.java b/video-comment/src/main/java/com/nuaa/video/comment/controller/CommentController.java
new file mode 100644
index 0000000..1884ddb
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/controller/CommentController.java
@@ -0,0 +1,141 @@
+package com.nuaa.video.comment.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.nuaa.video.comment.dto.CommentAddDTO;
+import com.nuaa.video.comment.dto.CommentQueryDTO;
+import com.nuaa.video.comment.service.CommentService;
+import com.nuaa.video.comment.vo.CommentStatVO;
+import com.nuaa.video.comment.vo.CommentVO;
+import com.nuaa.video.common.model.vo.Result;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 评论控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("/comment")
+@RequiredArgsConstructor
+public class CommentController {
+
+ private final CommentService commentService;
+
+ /**
+ * 添加评论
+ */
+ @PostMapping
+ public Result addComment(@RequestBody @Valid CommentAddDTO commentDTO, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentService.addComment(commentDTO, userId);
+ }
+
+ /**
+ * 获取评论列表(公开接口)
+ */
+ @GetMapping("/public/list")
+ public Result> getCommentList(CommentQueryDTO queryDTO, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ return commentService.getCommentList(queryDTO, userId);
+ }
+
+ /**
+ * 获取评论详情(公开接口)
+ */
+ @GetMapping("/public/detail/{id}")
+ public Result getCommentDetail(@PathVariable Long id, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ return commentService.getCommentDetail(id, userId);
+ }
+
+ /**
+ * 删除评论
+ */
+ @DeleteMapping("/{id}")
+ public Result deleteComment(@PathVariable Long id, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentService.deleteComment(id, userId);
+ }
+
+ /**
+ * 点赞评论
+ */
+ @PostMapping("/like/{id}")
+ public Result likeComment(@PathVariable Long id, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentService.likeComment(id, userId);
+ }
+
+ /**
+ * 取消点赞评论
+ */
+ @DeleteMapping("/like/{id}")
+ public Result unlikeComment(@PathVariable Long id, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentService.unlikeComment(id, userId);
+ }
+
+ /**
+ * 置顶评论
+ */
+ @PostMapping("/top/{id}")
+ public Result topComment(
+ @PathVariable Long id,
+ @RequestParam Long videoId,
+ HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentService.topComment(id, userId, videoId);
+ }
+
+ /**
+ * 取消置顶评论
+ */
+ @DeleteMapping("/top/{id}")
+ public Result untopComment(
+ @PathVariable Long id,
+ @RequestParam Long videoId,
+ HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentService.untopComment(id, userId, videoId);
+ }
+
+ /**
+ * 获取评论统计信息(公开接口)
+ */
+ @GetMapping("/public/stat/{videoId}")
+ public Result getCommentStat(@PathVariable Long videoId) {
+ return commentService.getCommentStat(videoId);
+ }
+
+ /**
+ * 从请求中获取用户ID
+ */
+ private Long getUserIdFromRequest(HttpServletRequest request) {
+ Object userIdObj = request.getAttribute("userId");
+ if (userIdObj instanceof Long) {
+ return (Long) userIdObj;
+ }
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/controller/ReplyController.java b/video-comment/src/main/java/com/nuaa/video/comment/controller/ReplyController.java
new file mode 100644
index 0000000..fd48c87
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/controller/ReplyController.java
@@ -0,0 +1,110 @@
+package com.nuaa.video.comment.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.nuaa.video.comment.dto.ReplyAddDTO;
+import com.nuaa.video.comment.service.CommentReplyService;
+import com.nuaa.video.comment.vo.ReplyVO;
+import com.nuaa.video.common.model.vo.Result;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.Valid;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 回复控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("/comment/reply")
+@RequiredArgsConstructor
+public class ReplyController {
+
+ private final CommentReplyService commentReplyService;
+
+ /**
+ * 添加回复
+ */
+ @PostMapping
+ public Result addReply(@RequestBody @Valid ReplyAddDTO replyDTO, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentReplyService.addReply(replyDTO, userId);
+ }
+
+ /**
+ * 获取评论的回复列表(公开接口)
+ */
+ @GetMapping("/public/list/{commentId}")
+ public Result> getReplyList(
+ @PathVariable Long commentId,
+ @RequestParam(value = "page", defaultValue = "1") Integer page,
+ @RequestParam(value = "size", defaultValue = "10") Integer size,
+ HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ return commentReplyService.getReplyList(commentId, page, size, userId);
+ }
+
+ /**
+ * 获取评论的热门回复(公开接口)
+ */
+ @GetMapping("/public/hot/{commentId}")
+ public Result> getHotReplies(
+ @PathVariable Long commentId,
+ @RequestParam(value = "limit", defaultValue = "3") Integer limit,
+ HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ return commentReplyService.getHotReplies(commentId, limit, userId);
+ }
+
+ /**
+ * 删除回复
+ */
+ @DeleteMapping("/{id}")
+ public Result deleteReply(@PathVariable Long id, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentReplyService.deleteReply(id, userId);
+ }
+
+ /**
+ * 点赞回复
+ */
+ @PostMapping("/like/{id}")
+ public Result likeReply(@PathVariable Long id, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentReplyService.likeReply(id, userId);
+ }
+
+ /**
+ * 取消点赞回复
+ */
+ @DeleteMapping("/like/{id}")
+ public Result unlikeReply(@PathVariable Long id, HttpServletRequest request) {
+ Long userId = getUserIdFromRequest(request);
+ if (userId == null) {
+ return Result.error("未登录");
+ }
+ return commentReplyService.unlikeReply(id, userId);
+ }
+
+ /**
+ * 从请求中获取用户ID
+ */
+ private Long getUserIdFromRequest(HttpServletRequest request) {
+ Object userIdObj = request.getAttribute("userId");
+ if (userIdObj instanceof Long) {
+ return (Long) userIdObj;
+ }
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/dto/CommentAddDTO.java b/video-comment/src/main/java/com/nuaa/video/comment/dto/CommentAddDTO.java
new file mode 100644
index 0000000..c11c11c
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/dto/CommentAddDTO.java
@@ -0,0 +1,29 @@
+package com.nuaa.video.comment.dto;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 评论添加DTO
+ */
+@Data
+public class CommentAddDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 视频ID
+ */
+ @NotNull(message = "视频ID不能为空")
+ private Long videoId;
+
+ /**
+ * 评论内容
+ */
+ @NotBlank(message = "评论内容不能为空")
+ @Size(max = 500, message = "评论内容最多500字")
+ private String content;
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/dto/CommentQueryDTO.java b/video-comment/src/main/java/com/nuaa/video/comment/dto/CommentQueryDTO.java
new file mode 100644
index 0000000..d5f3a44
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/dto/CommentQueryDTO.java
@@ -0,0 +1,43 @@
+package com.nuaa.video.comment.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 评论查询DTO
+ */
+@Data
+public class CommentQueryDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 视频ID
+ */
+ private Long videoId;
+
+ /**
+ * 用户ID
+ */
+ private Long userId;
+
+ /**
+ * 排序字段
+ */
+ private String orderBy;
+
+ /**
+ * 排序方向
+ */
+ private String orderDirection;
+
+ /**
+ * 页码
+ */
+ private Integer pageNum = 1;
+
+ /**
+ * 每页条数
+ */
+ private Integer pageSize = 10;
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/dto/ReplyAddDTO.java b/video-comment/src/main/java/com/nuaa/video/comment/dto/ReplyAddDTO.java
new file mode 100644
index 0000000..ce8670c
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/dto/ReplyAddDTO.java
@@ -0,0 +1,40 @@
+package com.nuaa.video.comment.dto;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 回复添加DTO
+ */
+@Data
+public class ReplyAddDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 评论ID
+ */
+ @NotNull(message = "评论ID不能为空")
+ private Long commentId;
+
+ /**
+ * 视频ID
+ */
+ @NotNull(message = "视频ID不能为空")
+ private Long videoId;
+
+ /**
+ * 回复目标用户ID
+ */
+ private Long replyToId;
+
+ /**
+ * 回复内容
+ */
+ @NotBlank(message = "回复内容不能为空")
+ @Size(max = 500, message = "回复内容最多500字")
+ private String content;
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/entity/Comment.java b/video-comment/src/main/java/com/nuaa/video/comment/entity/Comment.java
new file mode 100644
index 0000000..65befbf
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/entity/Comment.java
@@ -0,0 +1,98 @@
+package com.nuaa.video.comment.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 评论实体
+ */
+@Data
+@TableName("comment")
+public class Comment implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 评论ID
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 视频ID
+ */
+ private Long videoId;
+
+ /**
+ * 用户ID
+ */
+ private Long userId;
+
+ /**
+ * 评论内容
+ */
+ private String content;
+
+ /**
+ * 点赞数
+ */
+ private Integer likeCount;
+
+ /**
+ * 回复数
+ */
+ private Integer replyCount;
+
+ /**
+ * 置顶状态(0:普通,1:置顶)
+ */
+ private Integer topStatus;
+
+ /**
+ * 状态(0:删除,1:正常)
+ */
+ private Integer status;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 创建时间
+ */
+ private LocalDateTime createTime;
+
+ /**
+ * 更新时间
+ */
+ private LocalDateTime updateTime;
+
+ /**
+ * 用户昵称(非数据库字段)
+ */
+ @TableField(exist = false)
+ private String userNickname;
+
+ /**
+ * 用户头像(非数据库字段)
+ */
+ @TableField(exist = false)
+ private String userAvatar;
+
+ /**
+ * 是否已点赞(非数据库字段)
+ */
+ @TableField(exist = false)
+ private Boolean isLiked;
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/entity/CommentLike.java b/video-comment/src/main/java/com/nuaa/video/comment/entity/CommentLike.java
new file mode 100644
index 0000000..a94cb86
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/entity/CommentLike.java
@@ -0,0 +1,44 @@
+package com.nuaa.video.comment.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 评论点赞实体
+ */
+@Data
+@TableName("comment_like")
+public class CommentLike implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键ID
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 评论ID
+ */
+ private Long commentId;
+
+ /**
+ * 用户ID
+ */
+ private Long userId;
+
+ /**
+ * 类型(1:评论,2:回复)
+ */
+ private Integer type;
+
+ /**
+ * 创建时间
+ */
+ private LocalDateTime createTime;
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/entity/CommentReply.java b/video-comment/src/main/java/com/nuaa/video/comment/entity/CommentReply.java
new file mode 100644
index 0000000..d6b7795
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/entity/CommentReply.java
@@ -0,0 +1,110 @@
+package com.nuaa.video.comment.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 评论回复实体
+ */
+@Data
+@TableName("comment_reply")
+public class CommentReply implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 回复ID
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 评论ID
+ */
+ private Long commentId;
+
+ /**
+ * 视频ID
+ */
+ private Long videoId;
+
+ /**
+ * 用户ID
+ */
+ private Long userId;
+
+ /**
+ * 回复目标用户ID
+ */
+ private Long replyToId;
+
+ /**
+ * 回复内容
+ */
+ private String content;
+
+ /**
+ * 点赞数
+ */
+ private Integer likeCount;
+
+ /**
+ * 状态(0:删除,1:正常)
+ */
+ private Integer status;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 创建时间
+ */
+ private LocalDateTime createTime;
+
+ /**
+ * 更新时间
+ */
+ private LocalDateTime updateTime;
+
+ /**
+ * 用户昵称(非数据库字段)
+ */
+ @TableField(exist = false)
+ private String userNickname;
+
+ /**
+ * 用户头像(非数据库字段)
+ */
+ @TableField(exist = false)
+ private String userAvatar;
+
+ /**
+ * 回复目标用户昵称(非数据库字段)
+ */
+ @TableField(exist = false)
+ private String replyToNickname;
+
+ /**
+ * 回复目标用户头像(非数据库字段)
+ */
+ @TableField(exist = false)
+ private String replyToAvatar;
+
+ /**
+ * 是否已点赞(非数据库字段)
+ */
+ @TableField(exist = false)
+ private Boolean isLiked;
+}
\ No newline at end of file
diff --git a/video-comment/src/main/java/com/nuaa/video/comment/feign/ContentFeignClient.java b/video-comment/src/main/java/com/nuaa/video/comment/feign/ContentFeignClient.java
new file mode 100644
index 0000000..2a5b100
--- /dev/null
+++ b/video-comment/src/main/java/com/nuaa/video/comment/feign/ContentFeignClient.java
@@ -0,0 +1,37 @@
+package com.nuaa.video.comment.feign;
+
+import com.nuaa.video.common.model.vo.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestHeader;
+
+/**
+ * 内容服务Feign客户端
+ */
+@FeignClient(name = "video-content", fallbackFactory = ContentFeignClientFallbackFactory.class)
+public interface ContentFeignClient {
+
+ /**
+ * 获取视频信息
+ *
+ * @param id 视频ID
+ * @return 视频信息
+ */
+ @GetMapping("/content/video/{id}")
+ Result