syntax = "v1" type CountReq { UserType int64 `json:"userType"` NewUserId int64 `header:"newUserId,optional"` EntUserId int64 `header:"entUserId,optional"` PositionId int64 `header:"positionId,optional"` } type CountResp { Count int64 `json:"count"` ErrorCode int64 `json:"error_code"` ErrorMsg string `json:"error_msg"` } type UserReq { Phone string `json:"phone,optional"` UserType int64 `json:"userType"` StartTime string `json:"startTime,optional"` EndTime string `json:"endTime,optional"` NewUserId int64 `header:"newUserId"` PositionId int64 `header:"positionId,optional"` EntId int64 `header:"entId,optional"` EntUserId int64 `header:"entUserId,optional"` Page int64 `json:"page,optional"` Size int64 `json:"size,optional"` IsArtificial int64 `json:"isArtificial,optional"` FiltrationId string `json:"filtrationId,optional"` QueryType int64 `json:"queryType,optional"` NameSearch string `json:"nameSearch,optional"` IsTourist int64 `json:"isTourist,optional"` } type MessageEntity { OwnType int64 `json:"ownType"` Title string `json:"title"` Content string `json:"content"` Item int64 `json:"item"` Type int64 `json:"type"` Link string `json:"link"` Appid string `header:"appId,optional"` ItemType int64 `json:"itemType"` SendId string `json:"sendId,optional"` EntUserId int64 `header:"entUserId,optional"` NewUserId int64 `header:"newUserId,optional"` ReceiveId string `json:"receiveId,optional"` ReceiverIds []string `json:"receiverIds,optional"` //个人[可多个] GroupIds []string `json:"groupIds,optional"` //群聊[可多个] PositionId int64 `header:"positionId,optional"` } type MessageReq { MsgType int64 `json:"msgType"` UserType int64 `json:"userType"` SendId string `json:"sendId,optional"` LastId string `json:"lastId,optional"` PageSize int64 `json:"pageSize"` NewUserId int64 `header:"newUserId,optional"` EntUserId int64 `header:"entUserId,optional"` EntId int64 `header:"entId,optional"` Sort string `json:"sort,optional"` ChatGroupId string `json:"chatGroupId,optional"` PositionId int64 `header:"positionId,optional"` } type CommonRes { Error_code int `json:"error_code"` Error_msg string `json:"error_msg"` Data interface{} `json:"data"` Count int64 `json:"count"` } type ChatSessionReq { MsgType int64 `json:"msgType"` UserType int64 `json:"userType"` EntId int64 `header:"entId,optional"` AppId string `header:"appId"` ReceiveEntId string `json:"receiveEntId,optional"` EntUserId int64 `header:"entUserId,optional"` NewUserId int64 `header:"newUserId,optional"` ReceiveAppId string `json:"receiveAppId,optional"` ReceiveId string `json:"receiveId,optional"` CustomerserviceName string `json:"customerserviceName,optional"` } type CloseSessionReq { SessionId string `json:"sessionId"` } type ShuntReq { Type string `json:"type"` } type ReadStateReq { SendId string `json:"sendId"` EntUserId int64 `header:"entUserId,optional"` NewUserId int64 `header:"newUserId,optional"` PositionId int64 `header:"positionId,optional"` UserType int64 `json:"userType,optional"` SendType int64 `json:"sendType,optional"` } type ReadWithdrawReq { MessageId string `json:"messageId"` Appid string `header:"appid"` UserType int64 `json:"userType"` //用户与客服聊天 发送人类型区分 用户类型:2用户1客服 EntId int64 `header:"entId,optional"` SenderId int64 `json:"senderId,optional"` //发送人id RecipientId int64 `json:"recipientId,optional"` //接收人id ConversationType int64 `json:"conversationType,optional"` //会话类型 1:一对一用户聊天 2 用户与客服 3 一对群 ChatGroupId int64 `json:"chatGroupId,optional"` //群id } type AppraiseMessageReq { EntId int64 `header:"entId,optional"` AppId string `header:"appId"` NewUserId int64 `header:"newUserId"` MessageId string `json:"messageId"` Appraise int64 `json:"appraise,options=-1|1"` } type OneUserPositionReq { PositionId string `json:"positionId"` EntId int64 `header:"entId,optional"` Appid string `header:"appId"` } type OneUserConversationReq { MyPositionId int64 `header:"positionId"` EntId int64 `header:"entId,optional"` Appid string `header:"appId"` YouPositionId string `json:"youPositionId"` } service messagecenter-api { @handler messageCount post /message/messageCount (CountReq) returns (CommonRes); @handler messageAdd post /message/messageAdd (MessageEntity) returns (CommonRes); @handler findMessage post /message/findMessage (MessageReq) returns (CommonRes); @handler userList post /message/userList (UserReq) returns (CommonRes); @handler createChatSession post /message/createChatSession (ChatSessionReq) returns (CommonRes); @handler closeChatSession post /message/closeChatSession (CloseSessionReq) returns (CommonRes); @handler obtainShunt post /message/obtainShunt (ShuntReq) returns (CommonRes); @handler updateReadById post /message/updateReadById (ReadStateReq) returns (CommonRes); @handler withdrawMessage //撤回消息 post /message/withdrawMessage (ReadWithdrawReq) returns (CommonRes); @handler AppraiseMessage // 消息评价 post /message/appraiseMessage (AppraiseMessageReq) returns (CommonRes); @handler ConversationList // 会话列表 post /message/conversationList (UserReq) returns (CommonRes); @handler oneUserPosition // 1v1会话职位 post /message/oneUserPosition (OneUserPositionReq) returns (CommonRes); @handler oneUserConversation // 1v1首次创建会话汇总表信息 post /message/oneUserConversation (OneUserConversationReq) returns (CommonRes); }