Package com.bytedesk.forum.post
Class PostRestControllerVisitor
java.lang.Object
com.bytedesk.forum.post.PostRestControllerVisitor
@RestController
@RequestMapping("/visitor/api/v1/posts")
public class PostRestControllerVisitor
extends Object
论坛匿名访问接口
无需登录即可访问的公开接口
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>>fullTextSearch(String keyword, org.springframework.data.domain.Pageable pageable) 全文搜索(匿名访问)org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>>fullTextSearchByCategory(String keyword, Long categoryId, org.springframework.data.domain.Pageable pageable) 按分类全文搜索(匿名访问)org.springframework.http.ResponseEntity<PostEntity>获取话题详情(匿名访问)org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>>getPosts(org.springframework.data.domain.Pageable pageable) 获取话题列表(匿名访问)org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>>getPostsByCategory(Long categoryId, org.springframework.data.domain.Pageable pageable) 按分类获取话题列表(匿名访问)org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>>getPostsByUser(Long userId, org.springframework.data.domain.Pageable pageable) 按用户获取话题列表(匿名访问)org.springframework.http.ResponseEntity<Void>incrementViewCount(Long postId) 增加浏览次数(匿名访问)org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>>searchPosts(PostSearchCriteria criteria, org.springframework.data.domain.Pageable pageable) 搜索话题(匿名访问)
-
Field Details
-
postService
-
-
Constructor Details
-
PostRestControllerVisitor
public PostRestControllerVisitor()
-
-
Method Details
-
getPosts
@GetMapping public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>> getPosts(org.springframework.data.domain.Pageable pageable) 获取话题列表(匿名访问) -
getPost
@GetMapping("/{postId}") public org.springframework.http.ResponseEntity<PostEntity> getPost(@PathVariable Long postId) 获取话题详情(匿名访问) -
getPostsByCategory
@GetMapping("/category/{categoryId}") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>> getPostsByCategory(@PathVariable Long categoryId, org.springframework.data.domain.Pageable pageable) 按分类获取话题列表(匿名访问) -
getPostsByUser
@GetMapping("/user/{userId}") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>> getPostsByUser(@PathVariable Long userId, org.springframework.data.domain.Pageable pageable) 按用户获取话题列表(匿名访问) -
incrementViewCount
@PostMapping("/{postId}/view") public org.springframework.http.ResponseEntity<Void> incrementViewCount(@PathVariable Long postId) 增加浏览次数(匿名访问) -
searchPosts
@PostMapping("/search") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>> searchPosts(@RequestBody PostSearchCriteria criteria, org.springframework.data.domain.Pageable pageable) 搜索话题(匿名访问) -
fullTextSearch
@GetMapping("/search/fulltext") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>> fullTextSearch(@RequestParam String keyword, org.springframework.data.domain.Pageable pageable) 全文搜索(匿名访问) -
fullTextSearchByCategory
@GetMapping("/search/fulltext/category/{categoryId}") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>> fullTextSearchByCategory(@RequestParam String keyword, @PathVariable Long categoryId, org.springframework.data.domain.Pageable pageable) 按分类全文搜索(匿名访问)
-