syntax = "v1" info( title: // TODO: add title desc: // TODO: add description author: "jiaojiao7" email: "renjiaojiao@topnet.net.cn" ) type response { Code int64 `json:"code"` Message string `json:"message"` } //查询消息详情 type MessageDetailReq { Id int64 `json:"id,optional"` MsgLogId int64 `json:"msgLogId,optional"` UserId string `header:"mgoUserId,optional"` } type MessageDetailResp { Code int64 `json:"code"` Message string `json:"message"` Data map[string]interface{} `json:"data"` } type GetMsgTypeReq { UserId string `header:"mgoUserId"` AppId string `header:"appId"` } type GetMsgTypeRes { Code int64 `json:"code"` Message string `json:"message"` Data []map[string]interface{} `json:"data"` } //修改指定用户某个分类的消息为已读 type MsgReadStatusReq { UserId string `form:"userId"` AppId string `form:"appId"` MsgType int `form:"msgType"` } type MsgReadStatusResp { Code int64 `json:"code"` Message string `json:"message"` Status int64 `json:"status"` } type MarkReadReq { MsgId int64 `json:"msgId"` AppId string `header:"appId"` UserId string `header:"mgoUserId"` } type MarkReadRes { Code int64 `json:"code"` Message string `json:"message"` Data int64 `json:"data"` } //批量保存消息 type MultipleSaveMsgReq { MsgInfo map[string]interface{} `json:"msgInfo"` UserIds string `json:"userIds"` UserNames string `json:"userNames"` PositionIds string `json:"positionIds,optional"` // 职位id 如果是多个就逗号分割 和用户id一一对应 } type MultipleSaveMsgResp { Code int64 `json:"code"` Message string `json:"message"` ErrCount int64 `json:"errCount"` } type GetBuoyMsgReq { UserId string `header:"mgoUserId"` AppId string `header:"appId"` Size int64 `json:"size,optional"` } type GetBuoyMsgResp { Code int64 `json:"error_code"` Message string `json:"error_msg"` Data []map[string]interface{} `json:"data"` } type ClearUnreadMsgReq { UserId string `header:"mgoUserId"` AppId string `header:"appId"` EntId int64 `header:"entId,optional"` PositionId int64 `header:"positionId,optional"` NewUserId int64 `header:"newUserId,optional"` } type MessageListReq { UserId string `header:"mgoUserId"` AppId string `header:"appId"` EntId int64 `header:"entId,optional"` SortSize int64 `json:"sortSize,optional"` //分类获取数 Offset int64 `json:"offset,optional"` // Size int64 `json:"size,optional"` MsgType int64 `json:"msgType,optional"` IsRead int64 `json:"isRead,optional"` NewUserId int64 `header:"newUserId,optional"` //私信相关 PositionId int64 `header:"positionId,optional"` //私信相关 IsColumn bool `json:"isColumn"` //是否需要获取栏目 IsColumnNewMsg bool `json:"isColumnNewMsg"` //是否需各栏目获取最新消息 IsMsgList bool `json:"isMsgList"` //是否需要列表信息 IsContainLetter bool `json:"isContainLetter,optional,default=true"` //是否未读数包含私信 IsClassSearch bool `json:"isClassSearch,optional"` // 是否为具体分类查询 IsfilterActive bool `json:"isfilterActive,optional"` //是否过滤活动通知消息 } type MessageListResp { Code int64 `json:"code"` Message string `json:"message"` Data []map[string]interface{} `json:"data"` Last map[string]interface{} `json:"last"` Total int64 `json:"total"` Column []map[string]interface{} `json:"column"` Unread int64 `json:"unread"` RollingTiming int64 `json:"rollingTiming"` ToDoUnread int64 `json:"toDoUnread"` } //type UnreadMessageReq { // UserId string `header:"mgoUserId"` // AppId string `header:"appId"` // Offset int64 `json:"offset"` // // PageSize int64 `json:"pageSize"` // IsNeedData int64 `json:"isNeedData"` //是否需要未读消息数据 0 不需要 1 需要 //} //type UnreadMessageResp { // Code int64 `json:"code"` // Message string `json:"message"` // Data []map[string]interface{} `json:"data"` // Total int64 `json:"total"` //} type WxTmplMessageReq { UserIds string `json:"userIds,optional"` // 用户id如果是多个就逗号分割 PositionIds string `json:"positionIds,optional"` //用户职位id Title string `json:"title"` Date string `json:"date"` Detail string `json:"detail"` Row4 string `json:"row4"` Class int64 `json:"class"` //msg_type Url string `json:"url"` } type WxTmplMessageResponse { Code int64 `json:"code"` Total int64 `json:"total"` Message string `json:"message"` } type MsgOpenLogReq { MsgLogId int64 `json:"msgLogId"` Platform int64 `json:"platform"` //1pc 2 app 3 微信 UserId string `header:"mgoUserId"` AppId string `header:"appId"` } type NewUserSaveMsgReq { MsgInfo map[string]interface{} `json:"msgInfo"` UserIds string `json:"userIds"` PositionIds string `json:"positionIds,optional"` // 职位id 如果是多个就逗号分割 和用户id一一对应 } type NewUserSaveMsgResp { Code int64 `json:"code"` Message string `json:"message"` } type UpdateMsgSummaryReq { MsgLogId int64 `json:"msgLogId"` GroupId int64 `json:"groupId"` MsgType int64 `json:"msgType"` } type BitmapSaveMsgReq { MsgInfo map[string]interface{} `json:"msgInfo"` UserIds string `json:"userIds"` PositionIds string `json:"positionIds,optional"` // 职位id 如果是多个就逗号分割 和用户id一一对应 } type WorkDeskListReq { UserId string `header:"mgoUserId"` AppId string `header:"appId"` Offset int64 `json:"offset"` PageSize int64 `json:"size"` MsgType int64 `json:"msgType"` NeedDealtWithCount bool `json:"needDealtWithCount"` } type WorkDeskListResp { Code int64 `json:"code"` Message string `json:"message"` BusData []map[string]interface{} `json:"busData"` NeedDoData []map[string]interface{} `json:"needDoData"` } type MaterialDetailReq { Id int64 `json:"id"` MsgLogId int64 `json:"msgLogId"` UserId string `header:"mgoUserId,optional"` PositionId int64 `header:"positionId,optional"` PositionType int64 `header:"positionType,optional"` } type MaterialDetailResp { Code int64 `json:"code"` Err_msg string `json:"errMsg"` Data map[string]interface{} `json:"data"` } service message-api { // 工作桌面商机情报 @handler WorkDeskListHandler post /messageCenter/WorkDeskList (WorkDeskListReq) returns (WorkDeskListResp) // 更新用户all_msg bitmap @handler BitmapSaveMsgHandler post /messageCenter/BitmapSaveMsg (BitmapSaveMsgReq) returns (MultipleSaveMsgResp) // 更新消息汇总表 @handler UpdateMsgSummaryHandler post /messageCenter/UpdateMsgSummary (UpdateMsgSummaryReq) returns (response) // 新用户发送消息 @handler NewUserSaveMsgHandler post /messageCenter/NewUserSaveMsg (NewUserSaveMsgReq) returns (NewUserSaveMsgResp) //查询消息详情 @handler MessageDetailHandler post /messageCenter/messageDetail (MessageDetailReq) returns (MessageDetailResp) // 获取消息分类 // @handler GetMsgTypeHandler // post /messageCenter/getMsgType (GetMsgTypeReq) returns (GetMsgTypeRes) // 标记为已读 @handler MarkReadHandler post /messageCenter/markRead (MarkReadReq) returns (MarkReadRes) // 发送消息 @handler MultipleSaveMsgHandler post /messageCenter/MultipleSaveMsg (MultipleSaveMsgReq) returns (MultipleSaveMsgResp) // 查询浮标信息 @handler GetBuoyMsgHandler post /messageCenter/GetBuoyMsg (GetBuoyMsgReq) returns (GetBuoyMsgResp) // 一键清空未读消息 @handler ClearUnreadMessages post /messageCenter/ClearUnreadMsg (ClearUnreadMsgReq) returns (response) @handler MessageList post /messageCenter/MessageList (MessageListReq) returns (MessageListResp) //未读消息列表 // @handler UnreadMessages // post /messageCenter/unreadMessages (UnreadMessageReq) returns (UnreadMessageResp) // 发送微信模版消息 @handler SendWxTmplMsg post /messageCenter/sendWxTmplMsg (WxTmplMessageReq) returns (WxTmplMessageResponse) // 消息打开记录 @handler MsgOpenLog post /messageCenter/msgOpenLog (MsgOpenLogReq) returns (response) @handler MaterialDetail post /messageCenter/materialDetail (MaterialDetailReq) returns (MaterialDetailResp) }