Package com.bytedesk.kbase.article
Class ArticleRestController
java.lang.Object
com.bytedesk.core.base.BaseRestController<ArticleRequest,ArticleRestService>
com.bytedesk.kbase.article.ArticleRestController
@RestController
@RequestMapping("/api/v1/article")
@Description("Article Management Controller - Knowledge base article content management APIs")
public class ArticleRestController
extends BaseRestController<ArticleRequest,ArticleRestService>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArticleElasticServiceprivate final ArticleRestServiceprivate ArticleVectorService -
Constructor Summary
ConstructorsConstructorDescriptionArticleRestController(ArticleRestService articleRestService, ArticleElasticService articleElasticService) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?>create(ArticleRequest request) 通用的create实现 减少子类重复代码org.springframework.http.ResponseEntity<?>delete(ArticleRequest request) 通用的delete实现 减少子类重复代码export(ArticleRequest request, jakarta.servlet.http.HttpServletResponse response) exportorg.springframework.http.ResponseEntity<?>queryByOrg(ArticleRequest request) 通用的queryByOrg实现 减少子类重复代码org.springframework.http.ResponseEntity<?>queryByUid(ArticleRequest request) 通用的queryByUid实现 减少子类重复代码org.springframework.http.ResponseEntity<?>queryByUser(ArticleRequest request) 通用的queryByUser实现 减少子类重复代码org.springframework.http.ResponseEntity<?>searchElastic(ArticleRequest request) org.springframework.http.ResponseEntity<?>update(ArticleRequest request) 通用的update实现 减少子类重复代码org.springframework.http.ResponseEntity<?>updateAllIndex(ArticleRequest request) org.springframework.http.ResponseEntity<?>updateAllVectorIndex(ArticleRequest request) org.springframework.http.ResponseEntity<?>updateIndex(ArticleRequest request) org.springframework.http.ResponseEntity<?>updateVectorIndex(ArticleRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestController
deleteByOrgUid, exportTemplate, getService
-
Field Details
-
articleRestService
-
articleElasticService
-
articleVectorService
-
-
Constructor Details
-
ArticleRestController
public ArticleRestController(ArticleRestService articleRestService, ArticleElasticService articleElasticService)
-
-
Method Details
-
queryByOrg
Description copied from class:BaseRestController通用的queryByOrg实现 减少子类重复代码- Overrides:
queryByOrgin classBaseRestController<ArticleRequest,ArticleRestService>
-
queryByUser
Description copied from class:BaseRestController通用的queryByUser实现 减少子类重复代码- Overrides:
queryByUserin classBaseRestController<ArticleRequest,ArticleRestService>
-
queryByUid
Description copied from class:BaseRestController通用的queryByUid实现 减少子类重复代码- Overrides:
queryByUidin classBaseRestController<ArticleRequest,ArticleRestService>
-
create
@ActionAnnotation(title="\u6587\u7ae0", action="\u65b0\u5efa", description="create article") public org.springframework.http.ResponseEntity<?> create(@RequestBody ArticleRequest request) Description copied from class:BaseRestController通用的create实现 减少子类重复代码- Overrides:
createin classBaseRestController<ArticleRequest,ArticleRestService>
-
update
@ActionAnnotation(title="\u6587\u7ae0", action="\u66f4\u65b0", description="update article") public org.springframework.http.ResponseEntity<?> update(@RequestBody ArticleRequest request) Description copied from class:BaseRestController通用的update实现 减少子类重复代码- Overrides:
updatein classBaseRestController<ArticleRequest,ArticleRestService>
-
delete
@ActionAnnotation(title="\u6587\u7ae0", action="\u5220\u9664", description="delete article") public org.springframework.http.ResponseEntity<?> delete(@RequestBody ArticleRequest request) Description copied from class:BaseRestController通用的delete实现 减少子类重复代码- Overrides:
deletein classBaseRestController<ArticleRequest,ArticleRestService>
-
export
@ActionAnnotation(title="\u6587\u7ae0", action="\u5bfc\u51fa", description="export article") @PreAuthorize("hasAuthority(\'KBASE_EXPORT\')") public Object export(ArticleRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from class:BaseRestControllerexport- Overrides:
exportin classBaseRestController<ArticleRequest,ArticleRestService> - Parameters:
request- role- Returns:
- json
-
updateIndex
@ActionAnnotation(title="\u6587\u7ae0", action="\u66f4\u65b0\u7d22\u5f15", description="update article index") @PostMapping("/updateIndex") public org.springframework.http.ResponseEntity<?> updateIndex(@RequestBody ArticleRequest request) -
updateVectorIndex
@ActionAnnotation(title="\u6587\u7ae0", action="\u66f4\u65b0\u5411\u91cf\u7d22\u5f15", description="update article vector index") @PostMapping("/updateVectorIndex") public org.springframework.http.ResponseEntity<?> updateVectorIndex(@RequestBody ArticleRequest request) -
updateAllIndex
@ActionAnnotation(title="\u6587\u7ae0", action="\u66f4\u65b0\u6240\u6709\u7d22\u5f15", description="update all article index") @PostMapping("/updateAllIndex") public org.springframework.http.ResponseEntity<?> updateAllIndex(@RequestBody ArticleRequest request) -
updateAllVectorIndex
@ActionAnnotation(title="\u6587\u7ae0", action="\u66f4\u65b0\u6240\u6709\u5411\u91cf\u7d22\u5f15", description="update all article vector index") @PostMapping("/updateAllVectorIndex") public org.springframework.http.ResponseEntity<?> updateAllVectorIndex(@RequestBody ArticleRequest request) -
searchElastic
@GetMapping("/search") public org.springframework.http.ResponseEntity<?> searchElastic(ArticleRequest request)
-