Package com.bytedesk.ai.robot_thread
Class RobotThreadService
java.lang.Object
com.bytedesk.core.base.BaseRestService<RobotThreadEntity,RobotThreadRequest,RobotThreadResponse>
com.bytedesk.ai.robot_thread.RobotThreadService
@Service
public class RobotThreadService
extends BaseRestService<RobotThreadEntity,RobotThreadRequest,RobotThreadResponse>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToResponse
(RobotThreadEntity entity) create
(RobotThreadRequest request) void
delete
(RobotThreadRequest request) void
deleteByUid
(String uid) protected RobotThreadEntity
doSave
(RobotThreadEntity entity) existsByUid
(String uid) findFirstByTopic
(String topic) handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, RobotThreadEntity entity) org.springframework.data.domain.Page<RobotThreadResponse>
queryByOrg
(RobotThreadRequest request) org.springframework.data.domain.Page<RobotThreadResponse>
queryByUser
(RobotThreadRequest request) update
(RobotThreadRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
getUidFromRequest, queryByUid, recover, save
-
Field Details
-
visitorThreadRepository
-
-
Constructor Details
-
RobotThreadService
public RobotThreadService()
-
-
Method Details
-
queryByOrg
public org.springframework.data.domain.Page<RobotThreadResponse> queryByOrg(RobotThreadRequest request) - Specified by:
queryByOrg
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
queryByUser
public org.springframework.data.domain.Page<RobotThreadResponse> queryByUser(RobotThreadRequest request) - Specified by:
queryByUser
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
findByUid
@Cacheable(value="robot_thread", key="#uid", unless="#result == null") public Optional<RobotThreadEntity> findByUid(String uid) - Specified by:
findByUid
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
existsByUid
-
findFirstByTopic
@Cacheable(value="robot_thread", key="#topic", unless="#result == null") public Optional<RobotThreadEntity> findFirstByTopic(String topic) -
create
- Specified by:
create
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
update
- Specified by:
update
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
doSave
- Specified by:
doSave
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
delete
- Specified by:
delete
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
handleOptimisticLockingFailureException
public RobotThreadEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, RobotThreadEntity entity) - Specified by:
handleOptimisticLockingFailureException
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<RobotThreadEntity,
RobotThreadRequest, RobotThreadResponse>
-