message.go
2.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package protocol
var errmessge ErrorMap = map[int]string{
0: "成功",
1: "系统异常",
2: "参数错误",
101: "clientId或clientSecret无效",
113: "签名验证失败",
1009: "验证码已超时,登录失败",
1011: "短信验证码次数超过限制,请稍后重试",
1012: "验证码错误",
2001: "请输入正确的手机号码",
2002: "后台未配置账号信息,请联系管理员配置",
2009: "上传的文件流为空",
//2020: "帐号不存在,请联系管理员",
2021: "登录失败,手机号或密码错误",
2025: "短信验证码验证失败",
2026: "两次输入的密码不一致",
4139: "authCode无效或过期",
4140: "refreshToken过期,需要重新登录授权",
4141: "accessToken过期或无效,需要进行重新获取令牌",
4142: "Uuid已存在,请求失败",
}
/*MessageCenter */
type MessageCenterRequest struct {
MsgType int `json:"msgType" valid:"Required"`
}
type MessageCenterResponse struct {
Totals []*MessageTotal `json:"totals"`
}
type MessageTotal struct {
MsgType int `json:"msgType" orm:"column(msg_type)"`
MsgTotal int `json:"msgTotal" orm:"column(total)"`
}
/*MsgCenterRead */
type MsgCenterReadRequest struct {
MsgId int64 `json:"msgId" valid:"Required"`
MsgType int `json:"msgType" valid:"Required"`
}
type MsgCenterReadResponse struct {
}
/*MsgCenterAllRead */
type MsgCenterAllReadRequest struct {
MsgType int `json:"msgType" valid:"Required"`
}
type MsgCenterAllReadResponse struct {
}
/*互动消息*/
type MsgInteractiveRequest struct {
LastId int64 `json:"lastId"`
PageSize int `json:"pageSize" valid:"Required"`
MsgType int `json:"msgType" valid:"Required"`
SourceType int `json:"sourceType" valid:"Required"`
}
type MsgInteractiveResponse struct {
Lists []*UserMsg `json:"lists"`
Total int `json:"total"`
}
type UserMsg struct {
Id int64 `json:"msgId"`
SourceType int `json:"msgType"`
Content string `json:"content"`
CreateAt int64 `json:"msgTime"`
IsRead int `json:"isRead"`
//机会 //评论
}