type CountReq { UserType int64 `json:"userType"` NewUserId int64 `header:"newUserId,optional"` EntUserId int64 `header:"entUserId,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"` EntUserId int64 `header:"entUserId,optional"` Page int64 `json:"page,optional"` Size int64 `json:"size,optional"` IsArtificial int64 `json:"isArtificial,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"` ItemType int64 `json:"itemType"` SendId string `json:"sendId,optional"` EntUserId int64 `header:"entUserId,optional"` NewUserId int64 `header:"newUserId"` ReceiveId string `json:"receiveId,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"` EntUserId int64 `header:"entUserId,optional"` EntId int64 `header:"entId,optional"` Sort string `json:"sort,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"` 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 { MessageId string `json:"messageId"` EntUserId int64 `header:"entUserId,optional"` NewUserId int64 `header:"newUserId"` } type ReadWithdrawReq { MessageId string `json:"messageId"` Appid string `header:"appid"` NewUserId int64 `header:"newUserId,optional"` EntUserId int64 `header:"entUserId,optional"` UserType int64 `json:"userType"` } 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"` } 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); }