Package com.bytedesk.service.agent
Class AgentRestController
java.lang.Object
com.bytedesk.core.base.BaseRestController<AgentRequest,AgentRestService>
com.bytedesk.service.agent.AgentRestController
@RestController
@RequestMapping("/api/v1/agent")
@Description("Agent Management Controller - Customer service agent management and chat APIs")
public class AgentRestController
extends BaseRestController<AgentRequest,AgentRestService>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AgentRestServiceprivate final ExecutorServiceprivate final RobotService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?>acceptByAgent(ThreadRequest request) org.springframework.http.ResponseEntity<?>create(AgentRequest request) 通用的create实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法org.springframework.http.ResponseEntity<?>delete(AgentRequest request) 通用的delete实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法voiddestroy()export(AgentRequest request, jakarta.servlet.http.HttpServletResponse response) exportorg.springframework.http.ResponseEntity<?>queryByOrg(AgentRequest request) 通用的queryByOrg实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法org.springframework.http.ResponseEntity<?>queryByUid(AgentRequest request) 通用的queryByUid实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法org.springframework.http.ResponseEntity<?>queryByUser(AgentRequest request) 通用的queryByUser实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法org.springframework.http.ResponseEntity<?>queryByUserUid(AgentRequest request) org.springframework.web.servlet.mvc.method.annotation.SseEmittersendAgentSseMessage(String message) org.springframework.http.ResponseEntity<?>update(AgentRequest request) 通用的update实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法org.springframework.http.ResponseEntity<?>updateAutoReply(AgentRequest request) org.springframework.http.ResponseEntity<?>updateAvatar(AgentRequest request) org.springframework.http.ResponseEntity<?>updateStatus(AgentRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestController
deleteByOrgUid, exportTemplate, getService
-
Field Details
-
agentRestService
-
robotService
-
executorService
-
-
Constructor Details
-
AgentRestController
public AgentRestController()
-
-
Method Details
-
queryByOrg
@ActionAnnotation(title="\u5ba2\u670d", action="\u7ec4\u7ec7\u67e5\u8be2", description="query agent by org") @PreAuthorize("hasAuthority(\'AGENT_READ\')") public org.springframework.http.ResponseEntity<?> queryByOrg(AgentRequest request) Description copied from class:BaseRestController通用的queryByOrg实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法- Overrides:
queryByOrgin classBaseRestController<AgentRequest,AgentRestService>
-
queryByUser
@ActionAnnotation(title="\u5ba2\u670d", action="\u7528\u6237\u67e5\u8be2", description="query agent by user") @PreAuthorize("hasAuthority(\'AGENT_READ\')") public org.springframework.http.ResponseEntity<?> queryByUser(AgentRequest request) Description copied from class:BaseRestController通用的queryByUser实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法- Overrides:
queryByUserin classBaseRestController<AgentRequest,AgentRestService>
-
queryByUserUid
@ActionAnnotation(title="\u5ba2\u670d", action="\u7528\u6237UID\u67e5\u8be2", description="query agent by user uid") @PreAuthorize("hasAuthority(\'AGENT_READ\')") @GetMapping("/query/user/uid") public org.springframework.http.ResponseEntity<?> queryByUserUid(AgentRequest request) -
queryByUid
@ActionAnnotation(title="\u5ba2\u670d", action="\u67e5\u8be2\u8be6\u60c5", description="query agent by uid") @PreAuthorize("hasAuthority(\'AGENT_READ\')") public org.springframework.http.ResponseEntity<?> queryByUid(AgentRequest request) Description copied from class:BaseRestController通用的queryByUid实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法- Overrides:
queryByUidin classBaseRestController<AgentRequest,AgentRestService>
-
acceptByAgent
@ActionAnnotation(title="\u4f1a\u8bdd", action="accept", description="accept thread") @PostMapping("/accept") public org.springframework.http.ResponseEntity<?> acceptByAgent(@RequestBody ThreadRequest request) -
create
@ActionAnnotation(title="\u5ba2\u670d", action="\u65b0\u5efa", description="create agent") @PreAuthorize("hasAuthority(\'AGENT_CREATE\')") public org.springframework.http.ResponseEntity<?> create(@RequestBody AgentRequest request) Description copied from class:BaseRestController通用的create实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法- Overrides:
createin classBaseRestController<AgentRequest,AgentRestService>
-
update
@ActionAnnotation(title="\u5ba2\u670d", action="\u66f4\u65b0", description="update agent") @PreAuthorize("hasAuthority(\'AGENT_UPDATE\')") public org.springframework.http.ResponseEntity<?> update(@RequestBody AgentRequest request) Description copied from class:BaseRestController通用的update实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法- Overrides:
updatein classBaseRestController<AgentRequest,AgentRestService>
-
updateAvatar
@PreAuthorize("hasAuthority(\'AGENT_UPDATE\')") @ActionAnnotation(title="\u5ba2\u670d", action="\u66f4\u65b0\u5934\u50cf", description="update agent avatar") @PostMapping("/update/avatar") public org.springframework.http.ResponseEntity<?> updateAvatar(@RequestBody AgentRequest request) -
updateStatus
@PreAuthorize("hasAuthority(\'AGENT_UPDATE\')") @ActionAnnotation(title="\u5ba2\u670d", action="\u66f4\u65b0\u72b6\u6001", description="update agent status") @PostMapping("/update/status") public org.springframework.http.ResponseEntity<?> updateStatus(@RequestBody AgentRequest request) -
updateAutoReply
@PreAuthorize("hasAuthority(\'AGENT_UPDATE\')") @ActionAnnotation(title="\u5ba2\u670d", action="\u66f4\u65b0\u81ea\u52a8\u56de\u590d", description="update agent autoreply") @PostMapping("/update/autoreply") public org.springframework.http.ResponseEntity<?> updateAutoReply(@RequestBody AgentRequest request) -
delete
@PreAuthorize("hasAuthority(\'AGENT_DELETE\')") @ActionAnnotation(title="\u5ba2\u670d", action="\u5220\u9664", description="delete agent") public org.springframework.http.ResponseEntity<?> delete(@RequestBody AgentRequest request) Description copied from class:BaseRestController通用的delete实现 减少子类重复代码 注意:由于泛型擦除,需要使用PageableRequest.class来查找方法- Overrides:
deletein classBaseRestController<AgentRequest,AgentRestService>
-
export
@PreAuthorize("hasAuthority(\'AGENT_EXPORT\')") @ActionAnnotation(title="\u5ba2\u670d", action="\u5bfc\u51fa", description="export agent") @GetMapping("/export") public Object export(AgentRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from class:BaseRestControllerexport- Overrides:
exportin classBaseRestController<AgentRequest,AgentRestService> - Parameters:
request- role- Returns:
- json
-
sendAgentSseMessage
@BlackIpFilter(title="black", action="sendAgentSseMessage") @BlackUserFilter(title="black", action="sendAgentSseMessage") @TabooJsonFilter(title="\u654f\u611f\u8bcd", action="sendAgentSseMessage") @ActionAnnotation(title="\u5ba2\u670d", action="sendAgentSseMessage", description="sendAgentSseMessage") @GetMapping(value="/message/sse", produces="text/event-stream") public org.springframework.web.servlet.mvc.method.annotation.SseEmitter sendAgentSseMessage(@RequestParam("message") String message) -
destroy
public void destroy()
-