liuxiaolong
2020-05-27 9ffdb024c5fcc1dd353d3f37fcfdfa21bedba143
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
syntax = "proto3";
 
package user;
 
message ExistUserReq {
    string username = 1;
}
 
message ExistUserReply {
 
}
 
message RegisterUserReq {
    string username = 1;
    string password = 2;
    string phoneNum = 3;
    string verifyCode = 4;
}
 
message RegisterUserReply {
    UserInfo userInfo = 1;
}
 
message EntireUserInfoReq {
    string userId = 1;
    int32 type = 2; //个人或公司
    string trueName = 3;
    string email = 4;
    string industryId = 5;
    int32 areaId = 6;
 
    string companyName = 7;
    string contact = 8;
    int32 userType = 9;//普通用户或者开发者
}
 
message EntireUserInfoReply {
 
}
 
message LoginReq {
    string username = 1;
    string password = 2;
    string phoneNum = 3;
    string verifyCode = 4;
}
message RoleInfo {
    string id = 1;
    string name = 2;
}
message UserInfo {
    string id = 1;
    string username = 2;
    string phoneNum = 3;
    bool reEditPwd = 4;
    repeated string permissions = 5;
    repeated RoleInfo sysRoles = 6;
}
 
message LoginReply {
    UserInfo userInfo = 1;
}
 
message LoginRespWithToken {
    UserInfo userInfo = 1;
    string access_token = 2;
    string refresh_token = 3;
    string scope = 4;
    string token_type = 5;
    int64 expires_in = 6;
}
 
message UpdatePwdReq {
    string username = 1;
    string oldPwd = 2;
    string newPwd = 3;
}
 
message UpdatePwdReply {
 
}
 
message ForgetPwdReq {
    string phoneNum = 1;
    string newPwd = 2;
}
 
message ForgetPwdReply {
 
}
 
message GetVerifyCodeReq {
    string phoneNum = 1;
    int32 type = 2;
}
 
message GetVerifyCodeReply {
    string verifyCode = 1;
}
 
message GetUserByIdReq {
    string userId = 1;
}
 
message GetUserByIdReply {
    string username = 1;
    string phoneNum = 2;
    int32 userType = 3;
    int32 type = 4;
    string trueName = 5;
    string email = 6;
    string industryId = 7;
    string companyName = 8;
    string contact = 9;
    int32 provinceId = 10;
    int32 areaId = 11;
 
    string industryName = 12;
    string provinceName = 13;
    string cityName = 14;
    int32 source = 15;
    repeated string menuIds = 16;
}
 
message VerifyCodeReq {
    string phoneNum = 1;
    string verifyCode = 2;
}
 
message VerifyCodeReply {
 
}
 
message LogoutReq {
 
}
 
message LogoutReply {
 
}
 
message ValidateTokenReq {
    string token = 1;
}
 
message ValidateTokenReply {
    string userId = 1;
}
 
message UpdatePhoneNumReq {
    string userId = 1;
    string newPhoneNum = 2;
    string verifyCode = 3;
}
 
message UpdatePhoneNumReply {
 
}
 
message SaveUserReq {
    string id = 1;
    string username = 2;
    string password = 3;
    int32 userType = 4;
    int32 type = 5;
    string trueName = 6;
    string email = 7;
    string industryId = 8;
    int32 areaId = 9;
    string companyName = 10;
    string contact = 11;
    string createUserId = 12;
 
    bool isChangePwd = 13;
}
 
message SaveManagerReq {
    string id = 1;
    string username = 2;
    string password = 3;
    string trueName = 4;
    string email = 5;
    string pos = 6;
    repeated string menuIds = 7;
    string createUserId = 8;
 
    bool isChangePwd = 9;
}
 
message SaveUserReply {
 
}
 
message GetUserListReq {
    string userId = 1;
    int32 page = 2;
    int32 size = 3;
    int32 type = 4;
    string inputText = 5;
}
 
message GetManagerListReq {
    string userId = 1;
    int32 page = 2;
    int32 size = 3;
    string inputText = 4;
}
 
message UserDetail {
    string id = 1;
    string username = 2;
    int32 type = 3;
    int32 userType = 4;
    string trueName = 5;
    string phoneNum = 6;
    string email = 7;
 
    string companyName = 8;
    string contact = 9;
    string industryId = 10;
    string industryName = 11;
    int32 areaId = 12;
    string areaName = 13;
    int32 provinceId = 14;
    string provinceName = 15;
    int32 source = 16;
    string createTime = 17;
    string lastLoginTime = 18;
}
 
message GetUserListReply {
    int32 total = 1;
    repeated UserDetail dataList = 2;
}
 
message ManagerDetail {
    string id = 1;
    string username = 2;
    string trueName = 3;
    string phoneNum = 4;
    string email = 5;
    string pos = 6;
    string createTime = 7;
    string lastLoginTime = 8;
    repeated string menuIds = 9;
}
 
message GetManagerListReply {
    int32 total = 1;
    repeated ManagerDetail dataList = 2;
}
 
service UserService {
 
    rpc GetVerifyCode (GetVerifyCodeReq) returns (GetVerifyCodeReply) {}
 
    rpc ExistUser (ExistUserReq) returns (ExistUserReply) {}
 
    rpc RegisterUser (RegisterUserReq) returns (RegisterUserReply) {}
 
    rpc EntireUserInfo (EntireUserInfoReq) returns (EntireUserInfoReply) {}
 
    rpc Login (LoginReq) returns (LoginReply) {}
 
    rpc Logout (LogoutReq) returns (LogoutReply) {}
 
    rpc UpdatePwd (UpdatePwdReq) returns (UpdatePwdReply) {}
 
    rpc UpdatePhoneNum (UpdatePhoneNumReq) returns (UpdatePhoneNumReply) {}
 
    rpc ForgetPwd (ForgetPwdReq) returns (ForgetPwdReply) {}
 
    rpc GetUserById (GetUserByIdReq) returns (GetUserByIdReply) {}
 
    rpc VerifyCode (VerifyCodeReq) returns (VerifyCodeReply) {}
 
    rpc ValidateToken (ValidateTokenReq) returns (ValidateTokenReply) {}
 
    rpc SaveUser (SaveUserReq) returns (SaveUserReply) {}
 
    rpc SaveManager (SaveManagerReq) returns (SaveUserReply) {}
 
    rpc GetUserList (GetUserListReq) returns (GetUserListReply) {}
 
    rpc GetManagerList (GetManagerListReq) returns (GetManagerListReply) {}
}