Class PostRestControllerVisitor

java.lang.Object
com.bytedesk.forum.post.PostRestControllerVisitor

@RestController @RequestMapping("/visitor/api/v1/posts") public class PostRestControllerVisitor extends Object
论坛匿名访问接口 无需登录即可访问的公开接口
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private PostService
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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>
    getPost(Long postId)
    获取话题详情(匿名访问)
    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>
    增加浏览次数(匿名访问)
    org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<PostEntity>>
    searchPosts(PostSearchCriteria criteria, org.springframework.data.domain.Pageable pageable)
    搜索话题(匿名访问)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • postService

      @Autowired private PostService 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)
      按分类全文搜索(匿名访问)