Jelajahi Sumber

userId 改为 UserIdentifier

Jay 2 bulan lalu
induk
melakukan
29c2b320c5

+ 1 - 1
pb/client/gogameclient/go_game_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gogameclient

+ 1 - 1
pb/client/gopmpclient/go_pmp_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gopmpclient

+ 1 - 1
pb/client/goshortdramaclient/go_short_drama_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package goshortdramaclient

+ 1 - 1
pb/client/gosysclient/go_sys_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gosysclient

+ 1 - 1
pb/client/gouserclient/go_user_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gouserclient

+ 1 - 1
pb/client/govpnclient/go_vpn_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package govpnclient

+ 3 - 3
pb/gorpc.proto

@@ -1978,7 +1978,7 @@ service GoSysClient {
 // 白名单表
 message UserWhiteVo {
   int64 id = 1;          // 主键ID
-  int64 userId = 2;      // 用户
+  string userIdentifier = 2;      // 用户
   UserType userType = 3; // 用户类型 1 设备 2 账号
   Status status = 4;     // 状态
   int64 createTime = 5;  // 创建时间
@@ -1988,7 +1988,7 @@ message UserWhiteVo {
 // 测试用户表
 message UserTestVo {
   int64 id = 1;          // 主键ID
-  int64 userId = 2;      // 用户
+  string userIdentifier = 2;      // 用户
   UserType userType = 3; // 用户类型 1 设备 2 账号
   string area = 4;       // 指定地区
   string apis = 5;       // 指定接口
@@ -2208,7 +2208,7 @@ message UserVo {
   string productCode = 2;     // 产品标识
   string uuid = 3;            // 用户唯一ID
   string deviceId = 4;        // 注册时使用的设备ID
-  int64 accountType = 5;      // 值为1时表示实体尚未注册账号, 为其他值时表示实体已经注册了账号
+  int64 accountType = 5;      // 值为1时表示实体尚未注册账号, 为其他值时表示实体已经注册了账号(为了让 productCode+deviceId+accountType 能唯一确定一个用户)
   string registType = 6;      // 注册方式 normal email phone wechat qq google apple (其实可以通过查询 user_credential 中最早的一条记录的 identityType 来确定)
   int64 registFrom = 7;       // 从哪里注册 0: unknown 1: guest 2: app 3: web 4: pc 9999: invalid
   string referChannel = 8;    // 推广渠道

+ 35 - 35
pb/pb/gorpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
 // 	protoc-gen-go v1.36.10
-// 	protoc        v6.33.0
+// 	protoc        v3.19.4
 // source: gorpc.proto
 
 package pb
@@ -14301,15 +14301,15 @@ func (x *SysUserPermListResp) GetList() []*SysUserPermVo {
 
 // 白名单表
 type UserWhiteVo struct {
-	state         protoimpl.MessageState `protogen:"open.v1"`
-	Id            int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                 // 主键ID
-	UserId        int64                  `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`                         // 用户
-	UserType      UserType               `protobuf:"varint,3,opt,name=userType,proto3,enum=gorpc.UserType" json:"userType,omitempty"` // 用户类型 1 设备 2 账号
-	Status        Status                 `protobuf:"varint,4,opt,name=status,proto3,enum=gorpc.Status" json:"status,omitempty"`       // 状态
-	CreateTime    int64                  `protobuf:"varint,5,opt,name=createTime,proto3" json:"createTime,omitempty"`                 // 创建时间
-	UpdateTime    int64                  `protobuf:"varint,6,opt,name=updateTime,proto3" json:"updateTime,omitempty"`                 // 更新时间
-	unknownFields protoimpl.UnknownFields
-	sizeCache     protoimpl.SizeCache
+	state          protoimpl.MessageState `protogen:"open.v1"`
+	Id             int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                 // 主键ID
+	UserIdentifier string                 `protobuf:"bytes,2,opt,name=userIdentifier,proto3" json:"userIdentifier,omitempty"`          // 用户
+	UserType       UserType               `protobuf:"varint,3,opt,name=userType,proto3,enum=gorpc.UserType" json:"userType,omitempty"` // 用户类型 1 设备 2 账号
+	Status         Status                 `protobuf:"varint,4,opt,name=status,proto3,enum=gorpc.Status" json:"status,omitempty"`       // 状态
+	CreateTime     int64                  `protobuf:"varint,5,opt,name=createTime,proto3" json:"createTime,omitempty"`                 // 创建时间
+	UpdateTime     int64                  `protobuf:"varint,6,opt,name=updateTime,proto3" json:"updateTime,omitempty"`                 // 更新时间
+	unknownFields  protoimpl.UnknownFields
+	sizeCache      protoimpl.SizeCache
 }
 
 func (x *UserWhiteVo) Reset() {
@@ -14349,11 +14349,11 @@ func (x *UserWhiteVo) GetId() int64 {
 	return 0
 }
 
-func (x *UserWhiteVo) GetUserId() int64 {
+func (x *UserWhiteVo) GetUserIdentifier() string {
 	if x != nil {
-		return x.UserId
+		return x.UserIdentifier
 	}
-	return 0
+	return ""
 }
 
 func (x *UserWhiteVo) GetUserType() UserType {
@@ -14386,18 +14386,18 @@ func (x *UserWhiteVo) GetUpdateTime() int64 {
 
 // 测试用户表
 type UserTestVo struct {
-	state         protoimpl.MessageState `protogen:"open.v1"`
-	Id            int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                 // 主键ID
-	UserId        int64                  `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`                         // 用户
-	UserType      UserType               `protobuf:"varint,3,opt,name=userType,proto3,enum=gorpc.UserType" json:"userType,omitempty"` // 用户类型 1 设备 2 账号
-	Area          string                 `protobuf:"bytes,4,opt,name=area,proto3" json:"area,omitempty"`                              // 指定地区
-	Apis          string                 `protobuf:"bytes,5,opt,name=apis,proto3" json:"apis,omitempty"`                              // 指定接口
-	Routers       string                 `protobuf:"bytes,6,opt,name=routers,proto3" json:"routers,omitempty"`                        // 指定路由
-	Status        Status                 `protobuf:"varint,7,opt,name=status,proto3,enum=gorpc.Status" json:"status,omitempty"`       // 状态
-	CreateTime    int64                  `protobuf:"varint,8,opt,name=createTime,proto3" json:"createTime,omitempty"`                 // 创建时间
-	UpdateTime    int64                  `protobuf:"varint,9,opt,name=updateTime,proto3" json:"updateTime,omitempty"`                 // 更新时间
-	unknownFields protoimpl.UnknownFields
-	sizeCache     protoimpl.SizeCache
+	state          protoimpl.MessageState `protogen:"open.v1"`
+	Id             int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                 // 主键ID
+	UserIdentifier string                 `protobuf:"bytes,2,opt,name=userIdentifier,proto3" json:"userIdentifier,omitempty"`          // 用户
+	UserType       UserType               `protobuf:"varint,3,opt,name=userType,proto3,enum=gorpc.UserType" json:"userType,omitempty"` // 用户类型 1 设备 2 账号
+	Area           string                 `protobuf:"bytes,4,opt,name=area,proto3" json:"area,omitempty"`                              // 指定地区
+	Apis           string                 `protobuf:"bytes,5,opt,name=apis,proto3" json:"apis,omitempty"`                              // 指定接口
+	Routers        string                 `protobuf:"bytes,6,opt,name=routers,proto3" json:"routers,omitempty"`                        // 指定路由
+	Status         Status                 `protobuf:"varint,7,opt,name=status,proto3,enum=gorpc.Status" json:"status,omitempty"`       // 状态
+	CreateTime     int64                  `protobuf:"varint,8,opt,name=createTime,proto3" json:"createTime,omitempty"`                 // 创建时间
+	UpdateTime     int64                  `protobuf:"varint,9,opt,name=updateTime,proto3" json:"updateTime,omitempty"`                 // 更新时间
+	unknownFields  protoimpl.UnknownFields
+	sizeCache      protoimpl.SizeCache
 }
 
 func (x *UserTestVo) Reset() {
@@ -14437,11 +14437,11 @@ func (x *UserTestVo) GetId() int64 {
 	return 0
 }
 
-func (x *UserTestVo) GetUserId() int64 {
+func (x *UserTestVo) GetUserIdentifier() string {
 	if x != nil {
-		return x.UserId
+		return x.UserIdentifier
 	}
-	return 0
+	return ""
 }
 
 func (x *UserTestVo) GetUserType() UserType {
@@ -16883,7 +16883,7 @@ type UserVo struct {
 	ProductCode     string                 `protobuf:"bytes,2,opt,name=productCode,proto3" json:"productCode,omitempty"`           // 产品标识
 	Uuid            string                 `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty"`                         // 用户唯一ID
 	DeviceId        string                 `protobuf:"bytes,4,opt,name=deviceId,proto3" json:"deviceId,omitempty"`                 // 注册时使用的设备ID
-	AccountType     int64                  `protobuf:"varint,5,opt,name=accountType,proto3" json:"accountType,omitempty"`          // 值为1时表示实体尚未注册账号, 为其他值时表示实体已经注册了账号
+	AccountType     int64                  `protobuf:"varint,5,opt,name=accountType,proto3" json:"accountType,omitempty"`          // 值为1时表示实体尚未注册账号, 为其他值时表示实体已经注册了账号(为了让 productCode+deviceId+accountType 能唯一确定一个用户)
 	RegistType      string                 `protobuf:"bytes,6,opt,name=registType,proto3" json:"registType,omitempty"`             // 注册方式 normal email phone wechat qq google apple (其实可以通过查询 user_credential 中最早的一条记录的 identityType 来确定)
 	RegistFrom      int64                  `protobuf:"varint,7,opt,name=registFrom,proto3" json:"registFrom,omitempty"`            // 从哪里注册 0: unknown 1: guest 2: app 3: web 4: pc 9999: invalid
 	ReferChannel    string                 `protobuf:"bytes,8,opt,name=referChannel,proto3" json:"referChannel,omitempty"`         // 推广渠道
@@ -28357,10 +28357,10 @@ const file_gorpc_proto_rawDesc = "" +
 	"excludeIds\"U\n" +
 	"\x13SysUserPermListResp\x12\x14\n" +
 	"\x05total\x18\x01 \x01(\x03R\x05total\x12(\n" +
-	"\x04list\x18\x02 \x03(\v2\x14.gorpc.SysUserPermVoR\x04list\"\xc9\x01\n" +
+	"\x04list\x18\x02 \x03(\v2\x14.gorpc.SysUserPermVoR\x04list\"\xd9\x01\n" +
 	"\vUserWhiteVo\x12\x0e\n" +
-	"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
-	"\x06userId\x18\x02 \x01(\x03R\x06userId\x12+\n" +
+	"\x02id\x18\x01 \x01(\x03R\x02id\x12&\n" +
+	"\x0euserIdentifier\x18\x02 \x01(\tR\x0euserIdentifier\x12+\n" +
 	"\buserType\x18\x03 \x01(\x0e2\x0f.gorpc.UserTypeR\buserType\x12%\n" +
 	"\x06status\x18\x04 \x01(\x0e2\r.gorpc.StatusR\x06status\x12\x1e\n" +
 	"\n" +
@@ -28368,11 +28368,11 @@ const file_gorpc_proto_rawDesc = "" +
 	"createTime\x12\x1e\n" +
 	"\n" +
 	"updateTime\x18\x06 \x01(\x03R\n" +
-	"updateTime\"\x8a\x02\n" +
+	"updateTime\"\x9a\x02\n" +
 	"\n" +
 	"UserTestVo\x12\x0e\n" +
-	"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
-	"\x06userId\x18\x02 \x01(\x03R\x06userId\x12+\n" +
+	"\x02id\x18\x01 \x01(\x03R\x02id\x12&\n" +
+	"\x0euserIdentifier\x18\x02 \x01(\tR\x0euserIdentifier\x12+\n" +
 	"\buserType\x18\x03 \x01(\x0e2\x0f.gorpc.UserTypeR\buserType\x12\x12\n" +
 	"\x04area\x18\x04 \x01(\tR\x04area\x12\x12\n" +
 	"\x04apis\x18\x05 \x01(\tR\x04apis\x12\x18\n" +

+ 1 - 1
pb/pb/gorpc_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.5.1
-// - protoc             v6.33.0
+// - protoc             v3.19.4
 // source: gorpc.proto
 
 package pb

+ 2 - 2
pb/user.proto

@@ -8,7 +8,7 @@ import "pb/common.proto";
 // 白名单表
 message UserWhiteVo {
   int64 id = 1;          // 主键ID
-  int64 userId = 2;      // 用户
+  string userIdentifier = 2;      // 用户
   UserType userType = 3; // 用户类型 1 设备 2 账号
   Status status = 4;     // 状态
   int64 createTime = 5;  // 创建时间
@@ -18,7 +18,7 @@ message UserWhiteVo {
 // 测试用户表
 message UserTestVo {
   int64 id = 1;          // 主键ID
-  int64 userId = 2;      // 用户
+  string userIdentifier = 2;      // 用户
   UserType userType = 3; // 用户类型 1 设备 2 账号
   string area = 4;       // 指定地区
   string apis = 5;       // 指定接口