用户接口远程调用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

86 lines
2.3 KiB

syntax = "proto3";
package userrpc;
// 使用token查询用户信息请求结构
message UserRequest {
string dbname = 1;
string token = 2;
}
// 使用username查询用户信息请求结构
message UserInfoByUsername {
string dbname = 1;
string username = 2;
}
// 使用usercode查询用户信息请求结构
message UserInfoByUsercode {
string dbname = 1;
string usercode = 2;
}
// 使用token查询用户信息响应结构
message UserResponse {
string user_id = 1; //ID
string username = 2; //用户名
string nickname = 3; //昵称
string mobile = 4; //手机
string email = 5; //邮箱
string status = 6; //状态
string business_id = 7; //所属商家
string store_id = 8; //门店
string fans_to = 9;//被谁锁粉
string is_vip = 10;//是否VIP
string usercode = 11;//工号
string group_id = 12;//分组ID
string type = 13;//类型
}
// 用户登录请求结构
message LoginRequest {
string dbname = 1;
string account = 2;
string password = 3;
}
// 使用token查询用户信息响应结构
message LoginResponse {
string user_id = 1; //ID
string username = 2; //用户名
string nickname = 3; //昵称
string mobile = 4; //手机
string email = 5; //邮箱
string status = 6; //状态
string business_id = 7; //所属商家
string store_id = 8; //门店
string fans_to = 9;//被谁锁粉
string is_vip = 10;//是否VIP
string token = 11;//token
string usercode = 12;//工号
string group_id = 13;//分组ID
string type = 14;//类型
}
// 信息请求结构
message Request {
string data = 1;
string time = 2;
string sign = 3;
}
// 信息响应结构
message Response {
string data = 1;
string time = 2;
string sign = 3;
}
// rpc方法
service UserService {
rpc getByToken (UserRequest) returns (UserResponse); // 使用token查询用户
rpc login (LoginRequest) returns (LoginResponse); // 登录
rpc getByUsername (UserInfoByUsername) returns (UserResponse); // 使用username查询用户
rpc getByUsercode (UserInfoByUsercode) returns (UserResponse); // 使用usercode查询用户
rpc bindThird (Request) returns (Response); // 绑定第三方账号
rpc getThird(Request) returns (Response); // 查询第三方账号
}