Quellcode durchsuchen

/recommend 接口最多可获取 100 页数据

reghao vor 1 Jahr
Ursprung
Commit
a9b6754a64

+ 2 - 1
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/controller/VideoQueryController.java

@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -83,7 +84,7 @@ public class VideoQueryController {
     @GetMapping(value = "/recommend", produces = MediaType.APPLICATION_JSON_VALUE)
     public String getRecommendVideos(@RequestParam(value = "nextId", required = false) String nextId) {
         if (Integer.parseInt(nextId) > 100) {
-            return WebResult.failWithMsg("已经到底啦~ 重新开始吧");
+            return WebResult.success(Collections.emptyList());
         }
 
         long userId = UserContext.getUser();