apply .gitignore clean-up

Change-Id: Idd0b57a7340f0e62c85090d84c4fdb8cb5d6fe00
diff --git a/src/main/java/com/example/myproject/controller/RecommendationController.java b/src/main/java/com/example/myproject/controller/RecommendationController.java
new file mode 100644
index 0000000..d99c4d0
--- /dev/null
+++ b/src/main/java/com/example/myproject/controller/RecommendationController.java
@@ -0,0 +1,39 @@
+package com.example.myproject.controller;
+
+import com.example.myproject.entity.TorrentEntity;
+import com.example.myproject.service.PopularSeedService;
+import com.example.myproject.service.RecommendationService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/echo/recommendation")
+@Api("推荐接口")
+public class RecommendationController {
+
+    @Autowired
+    private RecommendationService recommendationService;
+
+    @Autowired
+    private PopularSeedService popularSeedService;
+
+    @GetMapping("/seeds/{userId}")
+    @ApiOperation("获取基于内容的种子推荐")
+    public List<TorrentEntity> getRecommendedSeeds(@PathVariable Long userId) {
+        return recommendationService.getRecommendedSeeds(userId);
+    }
+
+    @GetMapping("/popular")
+    @ApiOperation("获取热门种子推荐")
+    public List<TorrentEntity> getPopularSeeds(
+            @ApiParam(value = "返回数量", defaultValue = "16")
+            @RequestParam(defaultValue = "16") int limit
+    ) {
+        return popularSeedService.getPopularSeeds(limit);
+    }
+}
\ No newline at end of file