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 AgentRestService
private final ExecutorService
private final RobotService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?>
acceptByAgent
(ThreadRequest request) org.springframework.http.ResponseEntity<?>
create
(AgentRequest request) 通用的create实现 减少子类重复代码org.springframework.http.ResponseEntity<?>
delete
(AgentRequest request) 通用的delete实现 减少子类重复代码void
destroy()
export
(AgentRequest request, jakarta.servlet.http.HttpServletResponse response) exportorg.springframework.http.ResponseEntity<?>
queryByOrg
(AgentRequest request) 通用的queryByOrg实现 减少子类重复代码org.springframework.http.ResponseEntity<?>
queryByUid
(AgentRequest request) 通用的queryByUid实现 减少子类重复代码org.springframework.http.ResponseEntity<?>
queryByUser
(AgentRequest request) 通用的queryByUser实现 减少子类重复代码org.springframework.web.servlet.mvc.method.annotation.SseEmitter
sendAgentSseMessage
(String message) org.springframework.http.ResponseEntity<?>
syncCurrentThreadCount
(AgentRequest request) org.springframework.http.ResponseEntity<?>
update
(AgentRequest request) 通用的update实现 减少子类重复代码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
Description copied from class:BaseRestController
通用的queryByOrg实现 减少子类重复代码- Overrides:
queryByOrg
in classBaseRestController<AgentRequest,
AgentRestService>
-
queryByUser
Description copied from class:BaseRestController
通用的queryByUser实现 减少子类重复代码- Overrides:
queryByUser
in classBaseRestController<AgentRequest,
AgentRestService>
-
queryByUid
Description copied from class:BaseRestController
通用的queryByUid实现 减少子类重复代码- Overrides:
queryByUid
in classBaseRestController<AgentRequest,
AgentRestService>
-
acceptByAgent
@ActionAnnotation(title="\u4f1a\u8bdd", action="accept", description="accept thread") @PostMapping("/accept") public org.springframework.http.ResponseEntity<?> acceptByAgent(@RequestBody ThreadRequest request) -
syncCurrentThreadCount
@ActionAnnotation(title="\u5ba2\u670d", action="syncCurrentThreadCount", description="sync agent current thread count") @PostMapping("/sync/current/thread/count") public org.springframework.http.ResponseEntity<?> syncCurrentThreadCount(@RequestBody AgentRequest request) -
create
@ActionAnnotation(title="\u5ba2\u670d", action="\u65b0\u5efa", description="create agent") public org.springframework.http.ResponseEntity<?> create(@RequestBody AgentRequest request) Description copied from class:BaseRestController
通用的create实现 减少子类重复代码- Overrides:
create
in classBaseRestController<AgentRequest,
AgentRestService>
-
update
@ActionAnnotation(title="\u5ba2\u670d", action="\u66f4\u65b0", description="update agent") public org.springframework.http.ResponseEntity<?> update(@RequestBody AgentRequest request) Description copied from class:BaseRestController
通用的update实现 减少子类重复代码- Overrides:
update
in classBaseRestController<AgentRequest,
AgentRestService>
-
updateAvatar
@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
@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
@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实现 减少子类重复代码- Overrides:
delete
in classBaseRestController<AgentRequest,
AgentRestService>
-
export
Description copied from class:BaseRestController
export- Overrides:
export
in 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()
-