|
@@ -1,14 +1,12 @@
|
|
|
package com.tzld.longarticle.recommend.server.web.recommend;
|
|
package com.tzld.longarticle.recommend.server.web.recommend;
|
|
|
|
|
|
|
|
import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
|
|
import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
|
|
|
|
|
+import com.tzld.longarticle.recommend.server.model.entity.crawler.Article;
|
|
|
import com.tzld.longarticle.recommend.server.model.param.ArticleFindSourceParam;
|
|
import com.tzld.longarticle.recommend.server.model.param.ArticleFindSourceParam;
|
|
|
import com.tzld.longarticle.recommend.server.service.recommend.ArticleService;
|
|
import com.tzld.longarticle.recommend.server.service.recommend.ArticleService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/article")
|
|
@RequestMapping("/article")
|
|
@@ -24,4 +22,9 @@ public class ArticleController {
|
|
|
return CommonResponse.success();
|
|
return CommonResponse.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @GetMapping("/getArticleByRootSourceId")
|
|
|
|
|
+ public CommonResponse<Article> getArticleByRootSourceId(@RequestParam String rootSourceId) {
|
|
|
|
|
+ return CommonResponse.success(service.getArticleByRootSourceId(rootSourceId));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|