Package com.bytedesk.service.utils
Class ServiceConvertUtils
java.lang.Object
com.bytedesk.service.utils.ServiceConvertUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbooleanToString(Boolean value) 将Boolean转换为"是"或"否"buildServiceSettingsResponseVisitor(BaseSettingsEntity settingsContainer, boolean debug) Build ServiceSettingsResponseVisitor object from settings container.static AgentResponsestatic MessageLeaveResponsestatic MessageProtobufconvertToMessageProtobuf(MessageEntity lastMessage, ThreadEntity thread) static MessageResponsestatic MessageResponseconvertToMessageResponse(MessageEntity lastMessage) static QueueMemberResponsestatic QueueResponseconvertToQueueResponse(QueueEntity entity) static StringconvertToServiceSettingsResponseVisitorJSONString(BaseSettingsEntity settingsContainer, boolean debug) Build ServiceSettingsResponseVisitor JSON from settings container.static UserProtobufconvertToUserProtobuf(WorkflowEntity workflow) static UserProtobufconvertToUserProtobuf(AgentEntity agent) static UserProtobufconvertToUserProtobuf(WorkgroupEntity workgroup) static Stringstatic StringconvertToUserProtobufJSONString(WorkgroupEntity workgroup) static StringconvertToUserProtobufString(WorkflowEntity workflow) static VisitorProtobufconvertToVisitorProtobuf(VisitorEntity visitor) static VisitorProtobufconvertToVisitorProtobuf(VisitorRequest visitorRequest) static VisitorProtobufconvertToVisitorProtobuf(VisitorResponse visitor) static StringconvertToVisitorProtobufJSONString(VisitorRequest visitorRequest) static VisitorResponseconvertToVisitorResponse(VisitorEntity visitor) static String将工作流实体转换为 UserProtobuf JSON 字符串 只包含基本信息(uid, nickname, avatar)和 schema,不包含 nodes/edgesstatic WorkgroupResponseconvertToWorkgroupResponse(WorkgroupEntity workgroup) private static org.modelmapper.ModelMapper
-
Constructor Details
-
ServiceConvertUtils
public ServiceConvertUtils()
-
-
Method Details
-
getModelMapper
private static org.modelmapper.ModelMapper getModelMapper() -
convertToVisitorResponse
-
convertToVisitorProtobuf
-
convertToVisitorProtobuf
-
convertToVisitorProtobuf
-
convertToUserProtobuf
-
convertToUserProtobufString
-
convertToWorkflowProtobufString
将工作流实体转换为 UserProtobuf JSON 字符串 只包含基本信息(uid, nickname, avatar)和 schema,不包含 nodes/edges -
convertToVisitorProtobufJSONString
-
convertToMessageProtobuf
public static MessageProtobuf convertToMessageProtobuf(MessageEntity lastMessage, ThreadEntity thread) -
convertToMessageResponse
-
convertToMessageResponse
-
convertToAgentResponse
-
convertToUserProtobuf
-
convertToUserProtobuf
-
convertToUserProtobufJSONString
-
convertToUserProtobufJSONString
-
convertToWorkgroupResponse
-
buildServiceSettingsResponseVisitor
public static ServiceSettingsResponseVisitor buildServiceSettingsResponseVisitor(BaseSettingsEntity settingsContainer, boolean debug) Build ServiceSettingsResponseVisitor object from settings container. If debug=true and draft exists, prefer draft; otherwise use published. Falls back to a new ServiceSettingsEntity when missing. -
convertToServiceSettingsResponseVisitorJSONString
public static String convertToServiceSettingsResponseVisitorJSONString(BaseSettingsEntity settingsContainer, boolean debug) Build ServiceSettingsResponseVisitor JSON from settings container. -
convertToQueueResponse
-
convertToMessageLeaveResponse
-
convertToQueueMemberResponse
-
booleanToString
将Boolean转换为"是"或"否"
-