Package com.bytedesk.core.thread
Class ThreadSpecification
java.lang.Object
com.bytedesk.core.base.BaseSpecification<ThreadEntity,ThreadRequest>
com.bytedesk.core.thread.ThreadSpecification
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.data.jpa.domain.Specification<ThreadEntity>search(ThreadRequest request, AuthService authService) static org.springframework.data.jpa.domain.Specification<ThreadEntity>searchForUser(ThreadRequest request, String userUid, String orgUid) User(登录) 侧客服会话查询: - 仅返回当前客服“参与”的会话(owner / invites / monitors / assistants / ticketors) - 合并相同 topic,仅取 updatedAt 最新的一条 - 与会话列表展示行为对齐:updatedAt 倒序static org.springframework.data.jpa.domain.Specification<ThreadEntity>searchForVisitor(ThreadRequest request, String visitorUid) Visitor(匿名) 侧会话查询: - 不依赖 AuthService(无登录态) - 不做 orgUid/superUser 权限校验 - 通过 thread_user(JSON) 中包含 visitorUid 来过滤 - 与历史 native query 行为对齐:updatedAt 倒序Methods inherited from class com.bytedesk.core.base.BaseSpecification
getBasicPredicates, getBasicPredicatesNoOrg, getBasicPredicatesWithLevel, search, validateIsSuperUserPermission, validateSuperUserPermission
-
Constructor Details
-
ThreadSpecification
public ThreadSpecification()
-
-
Method Details
-
searchForUser
public static org.springframework.data.jpa.domain.Specification<ThreadEntity> searchForUser(ThreadRequest request, String userUid, String orgUid) User(登录) 侧客服会话查询: - 仅返回当前客服“参与”的会话(owner / invites / monitors / assistants / ticketors) - 合并相同 topic,仅取 updatedAt 最新的一条 - 与会话列表展示行为对齐:updatedAt 倒序 -
searchForVisitor
public static org.springframework.data.jpa.domain.Specification<ThreadEntity> searchForVisitor(ThreadRequest request, String visitorUid) Visitor(匿名) 侧会话查询: - 不依赖 AuthService(无登录态) - 不做 orgUid/superUser 权限校验 - 通过 thread_user(JSON) 中包含 visitorUid 来过滤 - 与历史 native query 行为对齐:updatedAt 倒序 -
search
public static org.springframework.data.jpa.domain.Specification<ThreadEntity> search(ThreadRequest request, AuthService authService)
-