diff --git a/rpc/analysis/analysis.pb b/rpc/analysis/analysis.pb index 799563b..c8c1767 100644 Binary files a/rpc/analysis/analysis.pb and b/rpc/analysis/analysis.pb differ diff --git a/rpc/analysis/analysis.proto b/rpc/analysis/analysis.proto index b3267f9..478c3c0 100644 --- a/rpc/analysis/analysis.proto +++ b/rpc/analysis/analysis.proto @@ -7,6 +7,7 @@ import "google/api/annotations.proto"; service Analysis { rpc InternalCreateUser(InternalCreateUserReq) returns (InternalCreateUserData); + rpc InternalSetRegistered(InternalSetRegisteredReq) returns (InternalSetRegisteredData); rpc AgreementInfo(AgreementInfoReq) returns (Response) { option (google.api.http) = { @@ -24,13 +25,6 @@ service Analysis { } service AnalysisUser { - rpc UserRegister(UserRegisterReq) returns (Response) { - option (google.api.http) = { - post: "/api/v2/analysis/user/register" - body: "*" - }; - } - rpc FaceBind(FaceBindReq) returns (Response) { option (google.api.http) = { post: "/api/v2/analysis/face/bind" @@ -153,6 +147,14 @@ message InternalCreateUserData { int64 id = 1; } +message InternalSetRegisteredReq { + int64 id = 1; +} + +message InternalSetRegisteredData { + bool ok = 1; +} + message UserImproveReq { string avatar = 1; string nickname = 2; @@ -164,10 +166,6 @@ message UserImproveReq { string address = 8; } -message UserRegisterReq { - string code = 1; -} - message FaceBindReq { string face_path = 1; } diff --git a/rpc/analysis/pb/analysis.pb.go b/rpc/analysis/pb/analysis.pb.go index 61e642a..3838a74 100644 --- a/rpc/analysis/pb/analysis.pb.go +++ b/rpc/analysis/pb/analysis.pb.go @@ -162,6 +162,94 @@ func (x *InternalCreateUserData) GetId() int64 { return 0 } +type InternalSetRegisteredReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InternalSetRegisteredReq) Reset() { + *x = InternalSetRegisteredReq{} + mi := &file_analysis_analysis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InternalSetRegisteredReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalSetRegisteredReq) ProtoMessage() {} + +func (x *InternalSetRegisteredReq) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalSetRegisteredReq.ProtoReflect.Descriptor instead. +func (*InternalSetRegisteredReq) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{3} +} + +func (x *InternalSetRegisteredReq) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type InternalSetRegisteredData struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InternalSetRegisteredData) Reset() { + *x = InternalSetRegisteredData{} + mi := &file_analysis_analysis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InternalSetRegisteredData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalSetRegisteredData) ProtoMessage() {} + +func (x *InternalSetRegisteredData) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalSetRegisteredData.ProtoReflect.Descriptor instead. +func (*InternalSetRegisteredData) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{4} +} + +func (x *InternalSetRegisteredData) GetOk() bool { + if x != nil { + return x.Ok + } + return false +} + type UserImproveReq struct { state protoimpl.MessageState `protogen:"open.v1"` Avatar string `protobuf:"bytes,1,opt,name=avatar,proto3" json:"avatar,omitempty"` @@ -178,7 +266,7 @@ type UserImproveReq struct { func (x *UserImproveReq) Reset() { *x = UserImproveReq{} - mi := &file_analysis_analysis_proto_msgTypes[3] + mi := &file_analysis_analysis_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -190,7 +278,7 @@ func (x *UserImproveReq) String() string { func (*UserImproveReq) ProtoMessage() {} func (x *UserImproveReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[3] + mi := &file_analysis_analysis_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -203,7 +291,7 @@ func (x *UserImproveReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserImproveReq.ProtoReflect.Descriptor instead. func (*UserImproveReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{3} + return file_analysis_analysis_proto_rawDescGZIP(), []int{5} } func (x *UserImproveReq) GetAvatar() string { @@ -262,50 +350,6 @@ func (x *UserImproveReq) GetAddress() string { return "" } -type UserRegisterReq struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UserRegisterReq) Reset() { - *x = UserRegisterReq{} - mi := &file_analysis_analysis_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UserRegisterReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRegisterReq) ProtoMessage() {} - -func (x *UserRegisterReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserRegisterReq.ProtoReflect.Descriptor instead. -func (*UserRegisterReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{4} -} - -func (x *UserRegisterReq) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - type FaceBindReq struct { state protoimpl.MessageState `protogen:"open.v1"` FacePath string `protobuf:"bytes,1,opt,name=face_path,json=facePath,proto3" json:"face_path,omitempty"` @@ -315,7 +359,7 @@ type FaceBindReq struct { func (x *FaceBindReq) Reset() { *x = FaceBindReq{} - mi := &file_analysis_analysis_proto_msgTypes[5] + mi := &file_analysis_analysis_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -327,7 +371,7 @@ func (x *FaceBindReq) String() string { func (*FaceBindReq) ProtoMessage() {} func (x *FaceBindReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[5] + mi := &file_analysis_analysis_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -340,7 +384,7 @@ func (x *FaceBindReq) ProtoReflect() protoreflect.Message { // Deprecated: Use FaceBindReq.ProtoReflect.Descriptor instead. func (*FaceBindReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{5} + return file_analysis_analysis_proto_rawDescGZIP(), []int{6} } func (x *FaceBindReq) GetFacePath() string { @@ -359,7 +403,7 @@ type AgreementInfoReq struct { func (x *AgreementInfoReq) Reset() { *x = AgreementInfoReq{} - mi := &file_analysis_analysis_proto_msgTypes[6] + mi := &file_analysis_analysis_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -371,7 +415,7 @@ func (x *AgreementInfoReq) String() string { func (*AgreementInfoReq) ProtoMessage() {} func (x *AgreementInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[6] + mi := &file_analysis_analysis_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -384,7 +428,7 @@ func (x *AgreementInfoReq) ProtoReflect() protoreflect.Message { // Deprecated: Use AgreementInfoReq.ProtoReflect.Descriptor instead. func (*AgreementInfoReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{6} + return file_analysis_analysis_proto_rawDescGZIP(), []int{7} } func (x *AgreementInfoReq) GetType() int32 { @@ -403,7 +447,7 @@ type UserDeleteReq struct { func (x *UserDeleteReq) Reset() { *x = UserDeleteReq{} - mi := &file_analysis_analysis_proto_msgTypes[7] + mi := &file_analysis_analysis_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -415,7 +459,7 @@ func (x *UserDeleteReq) String() string { func (*UserDeleteReq) ProtoMessage() {} func (x *UserDeleteReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[7] + mi := &file_analysis_analysis_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -428,7 +472,7 @@ func (x *UserDeleteReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserDeleteReq.ProtoReflect.Descriptor instead. func (*UserDeleteReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{7} + return file_analysis_analysis_proto_rawDescGZIP(), []int{8} } func (x *UserDeleteReq) GetId() int64 { @@ -447,7 +491,7 @@ type SwitchReq struct { func (x *SwitchReq) Reset() { *x = SwitchReq{} - mi := &file_analysis_analysis_proto_msgTypes[8] + mi := &file_analysis_analysis_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -459,7 +503,7 @@ func (x *SwitchReq) String() string { func (*SwitchReq) ProtoMessage() {} func (x *SwitchReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[8] + mi := &file_analysis_analysis_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -472,7 +516,7 @@ func (x *SwitchReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SwitchReq.ProtoReflect.Descriptor instead. func (*SwitchReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{8} + return file_analysis_analysis_proto_rawDescGZIP(), []int{9} } func (x *SwitchReq) GetType() int32 { @@ -493,7 +537,7 @@ type StoreAuthReq struct { func (x *StoreAuthReq) Reset() { *x = StoreAuthReq{} - mi := &file_analysis_analysis_proto_msgTypes[9] + mi := &file_analysis_analysis_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -505,7 +549,7 @@ func (x *StoreAuthReq) String() string { func (*StoreAuthReq) ProtoMessage() {} func (x *StoreAuthReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[9] + mi := &file_analysis_analysis_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -518,7 +562,7 @@ func (x *StoreAuthReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreAuthReq.ProtoReflect.Descriptor instead. func (*StoreAuthReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{9} + return file_analysis_analysis_proto_rawDescGZIP(), []int{10} } func (x *StoreAuthReq) GetUsername() string { @@ -550,7 +594,7 @@ type StoreAuthQrcodeReq struct { func (x *StoreAuthQrcodeReq) Reset() { *x = StoreAuthQrcodeReq{} - mi := &file_analysis_analysis_proto_msgTypes[10] + mi := &file_analysis_analysis_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -562,7 +606,7 @@ func (x *StoreAuthQrcodeReq) String() string { func (*StoreAuthQrcodeReq) ProtoMessage() {} func (x *StoreAuthQrcodeReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[10] + mi := &file_analysis_analysis_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -575,7 +619,7 @@ func (x *StoreAuthQrcodeReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreAuthQrcodeReq.ProtoReflect.Descriptor instead. func (*StoreAuthQrcodeReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{10} + return file_analysis_analysis_proto_rawDescGZIP(), []int{11} } type StoreInfoReq struct { @@ -587,7 +631,7 @@ type StoreInfoReq struct { func (x *StoreInfoReq) Reset() { *x = StoreInfoReq{} - mi := &file_analysis_analysis_proto_msgTypes[11] + mi := &file_analysis_analysis_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -599,7 +643,7 @@ func (x *StoreInfoReq) String() string { func (*StoreInfoReq) ProtoMessage() {} func (x *StoreInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[11] + mi := &file_analysis_analysis_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -612,7 +656,7 @@ func (x *StoreInfoReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreInfoReq.ProtoReflect.Descriptor instead. func (*StoreInfoReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{11} + return file_analysis_analysis_proto_rawDescGZIP(), []int{12} } func (x *StoreInfoReq) GetId() int64 { @@ -630,7 +674,7 @@ type StoreDetailReq struct { func (x *StoreDetailReq) Reset() { *x = StoreDetailReq{} - mi := &file_analysis_analysis_proto_msgTypes[12] + mi := &file_analysis_analysis_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -642,7 +686,7 @@ func (x *StoreDetailReq) String() string { func (*StoreDetailReq) ProtoMessage() {} func (x *StoreDetailReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[12] + mi := &file_analysis_analysis_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -655,7 +699,7 @@ func (x *StoreDetailReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreDetailReq.ProtoReflect.Descriptor instead. func (*StoreDetailReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{12} + return file_analysis_analysis_proto_rawDescGZIP(), []int{13} } type StoreUserListReq struct { @@ -674,7 +718,7 @@ type StoreUserListReq struct { func (x *StoreUserListReq) Reset() { *x = StoreUserListReq{} - mi := &file_analysis_analysis_proto_msgTypes[13] + mi := &file_analysis_analysis_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -686,7 +730,7 @@ func (x *StoreUserListReq) String() string { func (*StoreUserListReq) ProtoMessage() {} func (x *StoreUserListReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[13] + mi := &file_analysis_analysis_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -699,7 +743,7 @@ func (x *StoreUserListReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreUserListReq.ProtoReflect.Descriptor instead. func (*StoreUserListReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{13} + return file_analysis_analysis_proto_rawDescGZIP(), []int{14} } func (x *StoreUserListReq) GetDate() []string { @@ -771,7 +815,7 @@ type StoreUserUpdateReq struct { func (x *StoreUserUpdateReq) Reset() { *x = StoreUserUpdateReq{} - mi := &file_analysis_analysis_proto_msgTypes[14] + mi := &file_analysis_analysis_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -783,7 +827,7 @@ func (x *StoreUserUpdateReq) String() string { func (*StoreUserUpdateReq) ProtoMessage() {} func (x *StoreUserUpdateReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[14] + mi := &file_analysis_analysis_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -796,7 +840,7 @@ func (x *StoreUserUpdateReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreUserUpdateReq.ProtoReflect.Descriptor instead. func (*StoreUserUpdateReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{14} + return file_analysis_analysis_proto_rawDescGZIP(), []int{15} } func (x *StoreUserUpdateReq) GetUserId() int64 { @@ -843,7 +887,7 @@ type StoreUserInfoReq struct { func (x *StoreUserInfoReq) Reset() { *x = StoreUserInfoReq{} - mi := &file_analysis_analysis_proto_msgTypes[15] + mi := &file_analysis_analysis_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -855,7 +899,7 @@ func (x *StoreUserInfoReq) String() string { func (*StoreUserInfoReq) ProtoMessage() {} func (x *StoreUserInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[15] + mi := &file_analysis_analysis_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -868,7 +912,7 @@ func (x *StoreUserInfoReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreUserInfoReq.ProtoReflect.Descriptor instead. func (*StoreUserInfoReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{15} + return file_analysis_analysis_proto_rawDescGZIP(), []int{16} } func (x *StoreUserInfoReq) GetUserId() int64 { @@ -889,7 +933,7 @@ type UserAuthReq struct { func (x *UserAuthReq) Reset() { *x = UserAuthReq{} - mi := &file_analysis_analysis_proto_msgTypes[16] + mi := &file_analysis_analysis_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -901,7 +945,7 @@ func (x *UserAuthReq) String() string { func (*UserAuthReq) ProtoMessage() {} func (x *UserAuthReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[16] + mi := &file_analysis_analysis_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -914,7 +958,7 @@ func (x *UserAuthReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAuthReq.ProtoReflect.Descriptor instead. func (*UserAuthReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{16} + return file_analysis_analysis_proto_rawDescGZIP(), []int{17} } func (x *UserAuthReq) GetType() int32 { @@ -946,7 +990,7 @@ type UserAuthListReq struct { func (x *UserAuthListReq) Reset() { *x = UserAuthListReq{} - mi := &file_analysis_analysis_proto_msgTypes[17] + mi := &file_analysis_analysis_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -958,7 +1002,7 @@ func (x *UserAuthListReq) String() string { func (*UserAuthListReq) ProtoMessage() {} func (x *UserAuthListReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[17] + mi := &file_analysis_analysis_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -971,7 +1015,7 @@ func (x *UserAuthListReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAuthListReq.ProtoReflect.Descriptor instead. func (*UserAuthListReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{17} + return file_analysis_analysis_proto_rawDescGZIP(), []int{18} } type UserAuthDeleteReq struct { @@ -983,7 +1027,7 @@ type UserAuthDeleteReq struct { func (x *UserAuthDeleteReq) Reset() { *x = UserAuthDeleteReq{} - mi := &file_analysis_analysis_proto_msgTypes[18] + mi := &file_analysis_analysis_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -995,7 +1039,7 @@ func (x *UserAuthDeleteReq) String() string { func (*UserAuthDeleteReq) ProtoMessage() {} func (x *UserAuthDeleteReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[18] + mi := &file_analysis_analysis_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1008,7 +1052,7 @@ func (x *UserAuthDeleteReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAuthDeleteReq.ProtoReflect.Descriptor instead. func (*UserAuthDeleteReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{18} + return file_analysis_analysis_proto_rawDescGZIP(), []int{19} } func (x *UserAuthDeleteReq) GetId() int64 { @@ -1028,7 +1072,7 @@ type UserAuthUpdateReq struct { func (x *UserAuthUpdateReq) Reset() { *x = UserAuthUpdateReq{} - mi := &file_analysis_analysis_proto_msgTypes[19] + mi := &file_analysis_analysis_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1040,7 +1084,7 @@ func (x *UserAuthUpdateReq) String() string { func (*UserAuthUpdateReq) ProtoMessage() {} func (x *UserAuthUpdateReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[19] + mi := &file_analysis_analysis_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1053,7 +1097,7 @@ func (x *UserAuthUpdateReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAuthUpdateReq.ProtoReflect.Descriptor instead. func (*UserAuthUpdateReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{19} + return file_analysis_analysis_proto_rawDescGZIP(), []int{20} } func (x *UserAuthUpdateReq) GetId() int64 { @@ -1079,7 +1123,7 @@ type DeviceBindReq struct { func (x *DeviceBindReq) Reset() { *x = DeviceBindReq{} - mi := &file_analysis_analysis_proto_msgTypes[20] + mi := &file_analysis_analysis_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1091,7 +1135,7 @@ func (x *DeviceBindReq) String() string { func (*DeviceBindReq) ProtoMessage() {} func (x *DeviceBindReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[20] + mi := &file_analysis_analysis_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1104,7 +1148,7 @@ func (x *DeviceBindReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceBindReq.ProtoReflect.Descriptor instead. func (*DeviceBindReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{20} + return file_analysis_analysis_proto_rawDescGZIP(), []int{21} } func (x *DeviceBindReq) GetDeviceNo() string { @@ -1122,7 +1166,7 @@ type DeviceInfoReq struct { func (x *DeviceInfoReq) Reset() { *x = DeviceInfoReq{} - mi := &file_analysis_analysis_proto_msgTypes[21] + mi := &file_analysis_analysis_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1134,7 +1178,7 @@ func (x *DeviceInfoReq) String() string { func (*DeviceInfoReq) ProtoMessage() {} func (x *DeviceInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_analysis_analysis_proto_msgTypes[21] + mi := &file_analysis_analysis_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1147,7 +1191,7 @@ func (x *DeviceInfoReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceInfoReq.ProtoReflect.Descriptor instead. func (*DeviceInfoReq) Descriptor() ([]byte, []int) { - return file_analysis_analysis_proto_rawDescGZIP(), []int{21} + return file_analysis_analysis_proto_rawDescGZIP(), []int{22} } var File_analysis_analysis_proto protoreflect.FileDescriptor @@ -1161,7 +1205,11 @@ const file_analysis_analysis_proto_rawDesc = "" + "\x04data\x18\x03 \x01(\tR\x04data\"\x17\n" + "\x15InternalCreateUserReq\"(\n" + "\x16InternalCreateUserData\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\"\xe2\x01\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"*\n" + + "\x18InternalSetRegisteredReq\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"+\n" + + "\x19InternalSetRegisteredData\x12\x0e\n" + + "\x02ok\x18\x01 \x01(\bR\x02ok\"\xe2\x01\n" + "\x0eUserImproveReq\x12\x16\n" + "\x06avatar\x18\x01 \x01(\tR\x06avatar\x12\x1a\n" + "\bnickname\x18\x02 \x01(\tR\bnickname\x12\x1a\n" + @@ -1170,9 +1218,7 @@ const file_analysis_analysis_proto_rawDesc = "" + "\x06gender\x18\x05 \x01(\x05R\x06gender\x12\x1a\n" + "\bpassword\x18\x06 \x01(\tR\bpassword\x12\x1a\n" + "\bdistrict\x18\a \x01(\tR\bdistrict\x12\x18\n" + - "\aaddress\x18\b \x01(\tR\aaddress\"%\n" + - "\x0fUserRegisterReq\x12\x12\n" + - "\x04code\x18\x01 \x01(\tR\x04code\"*\n" + + "\aaddress\x18\b \x01(\tR\aaddress\"*\n" + "\vFaceBindReq\x12\x1b\n" + "\tface_path\x18\x01 \x01(\tR\bfacePath\"&\n" + "\x10AgreementInfoReq\x12\x12\n" + @@ -1221,13 +1267,13 @@ const file_analysis_analysis_proto_rawDesc = "" + "\rvalidity_time\x18\x02 \x01(\tR\fvalidityTime\",\n" + "\rDeviceBindReq\x12\x1b\n" + "\tdevice_no\x18\x01 \x01(\tR\bdeviceNo\"\x0f\n" + - "\rDeviceInfoReq2\xa7\x02\n" + + "\rDeviceInfoReq2\x89\x03\n" + "\bAnalysis\x12W\n" + - "\x12InternalCreateUser\x12\x1f.analysis.InternalCreateUserReq\x1a .analysis.InternalCreateUserData\x12k\n" + + "\x12InternalCreateUser\x12\x1f.analysis.InternalCreateUserReq\x1a .analysis.InternalCreateUserData\x12`\n" + + "\x15InternalSetRegistered\x12\".analysis.InternalSetRegisteredReq\x1a#.analysis.InternalSetRegisteredData\x12k\n" + "\rAgreementInfo\x12\x1a.analysis.AgreementInfoReq\x1a\x12.analysis.Response\"*\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/api/v2/analysis/agreement/info\x12U\n" + - "\x06Switch\x12\x13.analysis.SwitchReq\x1a\x12.analysis.Response\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/api/v2/analysis/switch2\x94\b\n" + - "\fAnalysisUser\x12h\n" + - "\fUserRegister\x12\x19.analysis.UserRegisterReq\x1a\x12.analysis.Response\")\x82\xd3\xe4\x93\x02#:\x01*\"\x1e/api/v2/analysis/user/register\x12\\\n" + + "\x06Switch\x12\x13.analysis.SwitchReq\x1a\x12.analysis.Response\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/api/v2/analysis/switch2\xaa\a\n" + + "\fAnalysisUser\x12\\\n" + "\bFaceBind\x12\x15.analysis.FaceBindReq\x1a\x12.analysis.Response\"%\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/api/v2/analysis/face/bind\x12e\n" + "\vUserImprove\x12\x18.analysis.UserImproveReq\x1a\x12.analysis.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/api/v2/analysis/user/improve\x12b\n" + "\n" + @@ -1239,12 +1285,11 @@ const file_analysis_analysis_proto_rawDesc = "" + "\n" + "DeviceBind\x12\x17.analysis.DeviceBindReq\x1a\x12.analysis.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v2/analysis/device/bind\x12b\n" + "\n" + - "DeviceInfo\x12\x17.analysis.DeviceInfoReq\x1a\x12.analysis.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v2/analysis/device/info2\xf7\x05\n" + + "DeviceInfo\x12\x17.analysis.DeviceInfoReq\x1a\x12.analysis.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v2/analysis/device/info2\x90\x05\n" + "\rAnalysisStore\x12_\n" + "\tStoreAuth\x12\x16.analysis.StoreAuthReq\x1a\x12.analysis.Response\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v2/analysis/store/auth\x12r\n" + "\x0fStoreAuthQrcode\x12\x1c.analysis.StoreAuthQrcodeReq\x1a\x12.analysis.Response\"-\x82\xd3\xe4\x93\x02':\x01*\"\"/api/v2/analysis/store/auth/qrcode\x12_\n" + - "\tStoreInfo\x12\x16.analysis.StoreInfoReq\x1a\x12.analysis.Response\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v2/analysis/store/info\x12e\n" + - "\vStoreDetail\x12\x18.analysis.StoreDetailReq\x1a\x12.analysis.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/api/v2/analysis/store/detail\x12g\n" + + "\tStoreInfo\x12\x16.analysis.StoreInfoReq\x1a\x12.analysis.Response\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v2/analysis/store/info\x12g\n" + "\rStoreUserList\x12\x1a.analysis.StoreUserListReq\x1a\x12.analysis.Response\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v2/analysis/store/list\x12r\n" + "\x0fStoreUserUpdate\x12\x1c.analysis.StoreUserUpdateReq\x1a\x12.analysis.Response\"-\x82\xd3\xe4\x93\x02':\x01*\"\"/api/v2/analysis/store/user/update\x12l\n" + "\rStoreUserInfo\x12\x1a.analysis.StoreUserInfoReq\x1a\x12.analysis.Response\"+\x82\xd3\xe4\x93\x02%:\x01*\" /api/v2/analysis/store/user/info2\x10\n" + @@ -1262,74 +1307,73 @@ func file_analysis_analysis_proto_rawDescGZIP() []byte { return file_analysis_analysis_proto_rawDescData } -var file_analysis_analysis_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_analysis_analysis_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_analysis_analysis_proto_goTypes = []any{ - (*Response)(nil), // 0: analysis.Response - (*InternalCreateUserReq)(nil), // 1: analysis.InternalCreateUserReq - (*InternalCreateUserData)(nil), // 2: analysis.InternalCreateUserData - (*UserImproveReq)(nil), // 3: analysis.UserImproveReq - (*UserRegisterReq)(nil), // 4: analysis.UserRegisterReq - (*FaceBindReq)(nil), // 5: analysis.FaceBindReq - (*AgreementInfoReq)(nil), // 6: analysis.AgreementInfoReq - (*UserDeleteReq)(nil), // 7: analysis.UserDeleteReq - (*SwitchReq)(nil), // 8: analysis.SwitchReq - (*StoreAuthReq)(nil), // 9: analysis.StoreAuthReq - (*StoreAuthQrcodeReq)(nil), // 10: analysis.StoreAuthQrcodeReq - (*StoreInfoReq)(nil), // 11: analysis.StoreInfoReq - (*StoreDetailReq)(nil), // 12: analysis.StoreDetailReq - (*StoreUserListReq)(nil), // 13: analysis.StoreUserListReq - (*StoreUserUpdateReq)(nil), // 14: analysis.StoreUserUpdateReq - (*StoreUserInfoReq)(nil), // 15: analysis.StoreUserInfoReq - (*UserAuthReq)(nil), // 16: analysis.UserAuthReq - (*UserAuthListReq)(nil), // 17: analysis.UserAuthListReq - (*UserAuthDeleteReq)(nil), // 18: analysis.UserAuthDeleteReq - (*UserAuthUpdateReq)(nil), // 19: analysis.UserAuthUpdateReq - (*DeviceBindReq)(nil), // 20: analysis.DeviceBindReq - (*DeviceInfoReq)(nil), // 21: analysis.DeviceInfoReq + (*Response)(nil), // 0: analysis.Response + (*InternalCreateUserReq)(nil), // 1: analysis.InternalCreateUserReq + (*InternalCreateUserData)(nil), // 2: analysis.InternalCreateUserData + (*InternalSetRegisteredReq)(nil), // 3: analysis.InternalSetRegisteredReq + (*InternalSetRegisteredData)(nil), // 4: analysis.InternalSetRegisteredData + (*UserImproveReq)(nil), // 5: analysis.UserImproveReq + (*FaceBindReq)(nil), // 6: analysis.FaceBindReq + (*AgreementInfoReq)(nil), // 7: analysis.AgreementInfoReq + (*UserDeleteReq)(nil), // 8: analysis.UserDeleteReq + (*SwitchReq)(nil), // 9: analysis.SwitchReq + (*StoreAuthReq)(nil), // 10: analysis.StoreAuthReq + (*StoreAuthQrcodeReq)(nil), // 11: analysis.StoreAuthQrcodeReq + (*StoreInfoReq)(nil), // 12: analysis.StoreInfoReq + (*StoreDetailReq)(nil), // 13: analysis.StoreDetailReq + (*StoreUserListReq)(nil), // 14: analysis.StoreUserListReq + (*StoreUserUpdateReq)(nil), // 15: analysis.StoreUserUpdateReq + (*StoreUserInfoReq)(nil), // 16: analysis.StoreUserInfoReq + (*UserAuthReq)(nil), // 17: analysis.UserAuthReq + (*UserAuthListReq)(nil), // 18: analysis.UserAuthListReq + (*UserAuthDeleteReq)(nil), // 19: analysis.UserAuthDeleteReq + (*UserAuthUpdateReq)(nil), // 20: analysis.UserAuthUpdateReq + (*DeviceBindReq)(nil), // 21: analysis.DeviceBindReq + (*DeviceInfoReq)(nil), // 22: analysis.DeviceInfoReq } var file_analysis_analysis_proto_depIdxs = []int32{ 1, // 0: analysis.Analysis.InternalCreateUser:input_type -> analysis.InternalCreateUserReq - 6, // 1: analysis.Analysis.AgreementInfo:input_type -> analysis.AgreementInfoReq - 8, // 2: analysis.Analysis.Switch:input_type -> analysis.SwitchReq - 4, // 3: analysis.AnalysisUser.UserRegister:input_type -> analysis.UserRegisterReq - 5, // 4: analysis.AnalysisUser.FaceBind:input_type -> analysis.FaceBindReq - 3, // 5: analysis.AnalysisUser.UserImprove:input_type -> analysis.UserImproveReq - 7, // 6: analysis.AnalysisUser.UserDelete:input_type -> analysis.UserDeleteReq - 16, // 7: analysis.AnalysisUser.UserAuth:input_type -> analysis.UserAuthReq - 17, // 8: analysis.AnalysisUser.UserAuthList:input_type -> analysis.UserAuthListReq - 18, // 9: analysis.AnalysisUser.UserAuthDelete:input_type -> analysis.UserAuthDeleteReq - 19, // 10: analysis.AnalysisUser.UserAuthUpdate:input_type -> analysis.UserAuthUpdateReq - 20, // 11: analysis.AnalysisUser.DeviceBind:input_type -> analysis.DeviceBindReq - 21, // 12: analysis.AnalysisUser.DeviceInfo:input_type -> analysis.DeviceInfoReq - 9, // 13: analysis.AnalysisStore.StoreAuth:input_type -> analysis.StoreAuthReq - 10, // 14: analysis.AnalysisStore.StoreAuthQrcode:input_type -> analysis.StoreAuthQrcodeReq - 11, // 15: analysis.AnalysisStore.StoreInfo:input_type -> analysis.StoreInfoReq - 12, // 16: analysis.AnalysisStore.StoreDetail:input_type -> analysis.StoreDetailReq - 13, // 17: analysis.AnalysisStore.StoreUserList:input_type -> analysis.StoreUserListReq - 14, // 18: analysis.AnalysisStore.StoreUserUpdate:input_type -> analysis.StoreUserUpdateReq - 15, // 19: analysis.AnalysisStore.StoreUserInfo:input_type -> analysis.StoreUserInfoReq - 2, // 20: analysis.Analysis.InternalCreateUser:output_type -> analysis.InternalCreateUserData + 3, // 1: analysis.Analysis.InternalSetRegistered:input_type -> analysis.InternalSetRegisteredReq + 7, // 2: analysis.Analysis.AgreementInfo:input_type -> analysis.AgreementInfoReq + 9, // 3: analysis.Analysis.Switch:input_type -> analysis.SwitchReq + 6, // 4: analysis.AnalysisUser.FaceBind:input_type -> analysis.FaceBindReq + 5, // 5: analysis.AnalysisUser.UserImprove:input_type -> analysis.UserImproveReq + 8, // 6: analysis.AnalysisUser.UserDelete:input_type -> analysis.UserDeleteReq + 17, // 7: analysis.AnalysisUser.UserAuth:input_type -> analysis.UserAuthReq + 18, // 8: analysis.AnalysisUser.UserAuthList:input_type -> analysis.UserAuthListReq + 19, // 9: analysis.AnalysisUser.UserAuthDelete:input_type -> analysis.UserAuthDeleteReq + 20, // 10: analysis.AnalysisUser.UserAuthUpdate:input_type -> analysis.UserAuthUpdateReq + 21, // 11: analysis.AnalysisUser.DeviceBind:input_type -> analysis.DeviceBindReq + 22, // 12: analysis.AnalysisUser.DeviceInfo:input_type -> analysis.DeviceInfoReq + 10, // 13: analysis.AnalysisStore.StoreAuth:input_type -> analysis.StoreAuthReq + 11, // 14: analysis.AnalysisStore.StoreAuthQrcode:input_type -> analysis.StoreAuthQrcodeReq + 12, // 15: analysis.AnalysisStore.StoreInfo:input_type -> analysis.StoreInfoReq + 14, // 16: analysis.AnalysisStore.StoreUserList:input_type -> analysis.StoreUserListReq + 15, // 17: analysis.AnalysisStore.StoreUserUpdate:input_type -> analysis.StoreUserUpdateReq + 16, // 18: analysis.AnalysisStore.StoreUserInfo:input_type -> analysis.StoreUserInfoReq + 2, // 19: analysis.Analysis.InternalCreateUser:output_type -> analysis.InternalCreateUserData + 4, // 20: analysis.Analysis.InternalSetRegistered:output_type -> analysis.InternalSetRegisteredData 0, // 21: analysis.Analysis.AgreementInfo:output_type -> analysis.Response 0, // 22: analysis.Analysis.Switch:output_type -> analysis.Response - 0, // 23: analysis.AnalysisUser.UserRegister:output_type -> analysis.Response - 0, // 24: analysis.AnalysisUser.FaceBind:output_type -> analysis.Response - 0, // 25: analysis.AnalysisUser.UserImprove:output_type -> analysis.Response - 0, // 26: analysis.AnalysisUser.UserDelete:output_type -> analysis.Response - 0, // 27: analysis.AnalysisUser.UserAuth:output_type -> analysis.Response - 0, // 28: analysis.AnalysisUser.UserAuthList:output_type -> analysis.Response - 0, // 29: analysis.AnalysisUser.UserAuthDelete:output_type -> analysis.Response - 0, // 30: analysis.AnalysisUser.UserAuthUpdate:output_type -> analysis.Response - 0, // 31: analysis.AnalysisUser.DeviceBind:output_type -> analysis.Response - 0, // 32: analysis.AnalysisUser.DeviceInfo:output_type -> analysis.Response - 0, // 33: analysis.AnalysisStore.StoreAuth:output_type -> analysis.Response - 0, // 34: analysis.AnalysisStore.StoreAuthQrcode:output_type -> analysis.Response - 0, // 35: analysis.AnalysisStore.StoreInfo:output_type -> analysis.Response - 0, // 36: analysis.AnalysisStore.StoreDetail:output_type -> analysis.Response - 0, // 37: analysis.AnalysisStore.StoreUserList:output_type -> analysis.Response - 0, // 38: analysis.AnalysisStore.StoreUserUpdate:output_type -> analysis.Response - 0, // 39: analysis.AnalysisStore.StoreUserInfo:output_type -> analysis.Response - 20, // [20:40] is the sub-list for method output_type - 0, // [0:20] is the sub-list for method input_type + 0, // 23: analysis.AnalysisUser.FaceBind:output_type -> analysis.Response + 0, // 24: analysis.AnalysisUser.UserImprove:output_type -> analysis.Response + 0, // 25: analysis.AnalysisUser.UserDelete:output_type -> analysis.Response + 0, // 26: analysis.AnalysisUser.UserAuth:output_type -> analysis.Response + 0, // 27: analysis.AnalysisUser.UserAuthList:output_type -> analysis.Response + 0, // 28: analysis.AnalysisUser.UserAuthDelete:output_type -> analysis.Response + 0, // 29: analysis.AnalysisUser.UserAuthUpdate:output_type -> analysis.Response + 0, // 30: analysis.AnalysisUser.DeviceBind:output_type -> analysis.Response + 0, // 31: analysis.AnalysisUser.DeviceInfo:output_type -> analysis.Response + 0, // 32: analysis.AnalysisStore.StoreAuth:output_type -> analysis.Response + 0, // 33: analysis.AnalysisStore.StoreAuthQrcode:output_type -> analysis.Response + 0, // 34: analysis.AnalysisStore.StoreInfo:output_type -> analysis.Response + 0, // 35: analysis.AnalysisStore.StoreUserList:output_type -> analysis.Response + 0, // 36: analysis.AnalysisStore.StoreUserUpdate:output_type -> analysis.Response + 0, // 37: analysis.AnalysisStore.StoreUserInfo:output_type -> analysis.Response + 19, // [19:38] is the sub-list for method output_type + 0, // [0:19] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -1340,14 +1384,14 @@ func file_analysis_analysis_proto_init() { if File_analysis_analysis_proto != nil { return } - file_analysis_analysis_proto_msgTypes[14].OneofWrappers = []any{} + file_analysis_analysis_proto_msgTypes[15].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_analysis_analysis_proto_rawDesc), len(file_analysis_analysis_proto_rawDesc)), NumEnums: 0, - NumMessages: 22, + NumMessages: 23, NumExtensions: 0, NumServices: 4, }, diff --git a/rpc/analysis/pb/analysis_grpc.pb.go b/rpc/analysis/pb/analysis_grpc.pb.go index 7b5f809..d180506 100644 --- a/rpc/analysis/pb/analysis_grpc.pb.go +++ b/rpc/analysis/pb/analysis_grpc.pb.go @@ -19,9 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Analysis_InternalCreateUser_FullMethodName = "/analysis.Analysis/InternalCreateUser" - Analysis_AgreementInfo_FullMethodName = "/analysis.Analysis/AgreementInfo" - Analysis_Switch_FullMethodName = "/analysis.Analysis/Switch" + Analysis_InternalCreateUser_FullMethodName = "/analysis.Analysis/InternalCreateUser" + Analysis_InternalSetRegistered_FullMethodName = "/analysis.Analysis/InternalSetRegistered" + Analysis_AgreementInfo_FullMethodName = "/analysis.Analysis/AgreementInfo" + Analysis_Switch_FullMethodName = "/analysis.Analysis/Switch" ) // AnalysisClient is the client API for Analysis service. @@ -29,6 +30,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AnalysisClient interface { InternalCreateUser(ctx context.Context, in *InternalCreateUserReq, opts ...grpc.CallOption) (*InternalCreateUserData, error) + InternalSetRegistered(ctx context.Context, in *InternalSetRegisteredReq, opts ...grpc.CallOption) (*InternalSetRegisteredData, error) AgreementInfo(ctx context.Context, in *AgreementInfoReq, opts ...grpc.CallOption) (*Response, error) Switch(ctx context.Context, in *SwitchReq, opts ...grpc.CallOption) (*Response, error) } @@ -51,6 +53,16 @@ func (c *analysisClient) InternalCreateUser(ctx context.Context, in *InternalCre return out, nil } +func (c *analysisClient) InternalSetRegistered(ctx context.Context, in *InternalSetRegisteredReq, opts ...grpc.CallOption) (*InternalSetRegisteredData, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InternalSetRegisteredData) + err := c.cc.Invoke(ctx, Analysis_InternalSetRegistered_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *analysisClient) AgreementInfo(ctx context.Context, in *AgreementInfoReq, opts ...grpc.CallOption) (*Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Response) @@ -76,6 +88,7 @@ func (c *analysisClient) Switch(ctx context.Context, in *SwitchReq, opts ...grpc // for forward compatibility. type AnalysisServer interface { InternalCreateUser(context.Context, *InternalCreateUserReq) (*InternalCreateUserData, error) + InternalSetRegistered(context.Context, *InternalSetRegisteredReq) (*InternalSetRegisteredData, error) AgreementInfo(context.Context, *AgreementInfoReq) (*Response, error) Switch(context.Context, *SwitchReq) (*Response, error) mustEmbedUnimplementedAnalysisServer() @@ -91,6 +104,9 @@ type UnimplementedAnalysisServer struct{} func (UnimplementedAnalysisServer) InternalCreateUser(context.Context, *InternalCreateUserReq) (*InternalCreateUserData, error) { return nil, status.Error(codes.Unimplemented, "method InternalCreateUser not implemented") } +func (UnimplementedAnalysisServer) InternalSetRegistered(context.Context, *InternalSetRegisteredReq) (*InternalSetRegisteredData, error) { + return nil, status.Error(codes.Unimplemented, "method InternalSetRegistered not implemented") +} func (UnimplementedAnalysisServer) AgreementInfo(context.Context, *AgreementInfoReq) (*Response, error) { return nil, status.Error(codes.Unimplemented, "method AgreementInfo not implemented") } @@ -136,6 +152,24 @@ func _Analysis_InternalCreateUser_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Analysis_InternalSetRegistered_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InternalSetRegisteredReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalysisServer).InternalSetRegistered(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Analysis_InternalSetRegistered_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalysisServer).InternalSetRegistered(ctx, req.(*InternalSetRegisteredReq)) + } + return interceptor(ctx, in, info, handler) +} + func _Analysis_AgreementInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AgreementInfoReq) if err := dec(in); err != nil { @@ -183,6 +217,10 @@ var Analysis_ServiceDesc = grpc.ServiceDesc{ MethodName: "InternalCreateUser", Handler: _Analysis_InternalCreateUser_Handler, }, + { + MethodName: "InternalSetRegistered", + Handler: _Analysis_InternalSetRegistered_Handler, + }, { MethodName: "AgreementInfo", Handler: _Analysis_AgreementInfo_Handler, @@ -197,7 +235,6 @@ var Analysis_ServiceDesc = grpc.ServiceDesc{ } const ( - AnalysisUser_UserRegister_FullMethodName = "/analysis.AnalysisUser/UserRegister" AnalysisUser_FaceBind_FullMethodName = "/analysis.AnalysisUser/FaceBind" AnalysisUser_UserImprove_FullMethodName = "/analysis.AnalysisUser/UserImprove" AnalysisUser_UserDelete_FullMethodName = "/analysis.AnalysisUser/UserDelete" @@ -213,7 +250,6 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AnalysisUserClient interface { - UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*Response, error) FaceBind(ctx context.Context, in *FaceBindReq, opts ...grpc.CallOption) (*Response, error) UserImprove(ctx context.Context, in *UserImproveReq, opts ...grpc.CallOption) (*Response, error) UserDelete(ctx context.Context, in *UserDeleteReq, opts ...grpc.CallOption) (*Response, error) @@ -233,16 +269,6 @@ func NewAnalysisUserClient(cc grpc.ClientConnInterface) AnalysisUserClient { return &analysisUserClient{cc} } -func (c *analysisUserClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Response) - err := c.cc.Invoke(ctx, AnalysisUser_UserRegister_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *analysisUserClient) FaceBind(ctx context.Context, in *FaceBindReq, opts ...grpc.CallOption) (*Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Response) @@ -337,7 +363,6 @@ func (c *analysisUserClient) DeviceInfo(ctx context.Context, in *DeviceInfoReq, // All implementations must embed UnimplementedAnalysisUserServer // for forward compatibility. type AnalysisUserServer interface { - UserRegister(context.Context, *UserRegisterReq) (*Response, error) FaceBind(context.Context, *FaceBindReq) (*Response, error) UserImprove(context.Context, *UserImproveReq) (*Response, error) UserDelete(context.Context, *UserDeleteReq) (*Response, error) @@ -357,9 +382,6 @@ type AnalysisUserServer interface { // pointer dereference when methods are called. type UnimplementedAnalysisUserServer struct{} -func (UnimplementedAnalysisUserServer) UserRegister(context.Context, *UserRegisterReq) (*Response, error) { - return nil, status.Error(codes.Unimplemented, "method UserRegister not implemented") -} func (UnimplementedAnalysisUserServer) FaceBind(context.Context, *FaceBindReq) (*Response, error) { return nil, status.Error(codes.Unimplemented, "method FaceBind not implemented") } @@ -408,24 +430,6 @@ func RegisterAnalysisUserServer(s grpc.ServiceRegistrar, srv AnalysisUserServer) s.RegisterService(&AnalysisUser_ServiceDesc, srv) } -func _AnalysisUser_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserRegisterReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AnalysisUserServer).UserRegister(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AnalysisUser_UserRegister_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AnalysisUserServer).UserRegister(ctx, req.(*UserRegisterReq)) - } - return interceptor(ctx, in, info, handler) -} - func _AnalysisUser_FaceBind_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FaceBindReq) if err := dec(in); err != nil { @@ -595,10 +599,6 @@ var AnalysisUser_ServiceDesc = grpc.ServiceDesc{ ServiceName: "analysis.AnalysisUser", HandlerType: (*AnalysisUserServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "UserRegister", - Handler: _AnalysisUser_UserRegister_Handler, - }, { MethodName: "FaceBind", Handler: _AnalysisUser_FaceBind_Handler, @@ -644,7 +644,6 @@ const ( AnalysisStore_StoreAuth_FullMethodName = "/analysis.AnalysisStore/StoreAuth" AnalysisStore_StoreAuthQrcode_FullMethodName = "/analysis.AnalysisStore/StoreAuthQrcode" AnalysisStore_StoreInfo_FullMethodName = "/analysis.AnalysisStore/StoreInfo" - AnalysisStore_StoreDetail_FullMethodName = "/analysis.AnalysisStore/StoreDetail" AnalysisStore_StoreUserList_FullMethodName = "/analysis.AnalysisStore/StoreUserList" AnalysisStore_StoreUserUpdate_FullMethodName = "/analysis.AnalysisStore/StoreUserUpdate" AnalysisStore_StoreUserInfo_FullMethodName = "/analysis.AnalysisStore/StoreUserInfo" @@ -657,7 +656,6 @@ type AnalysisStoreClient interface { StoreAuth(ctx context.Context, in *StoreAuthReq, opts ...grpc.CallOption) (*Response, error) StoreAuthQrcode(ctx context.Context, in *StoreAuthQrcodeReq, opts ...grpc.CallOption) (*Response, error) StoreInfo(ctx context.Context, in *StoreInfoReq, opts ...grpc.CallOption) (*Response, error) - StoreDetail(ctx context.Context, in *StoreDetailReq, opts ...grpc.CallOption) (*Response, error) StoreUserList(ctx context.Context, in *StoreUserListReq, opts ...grpc.CallOption) (*Response, error) StoreUserUpdate(ctx context.Context, in *StoreUserUpdateReq, opts ...grpc.CallOption) (*Response, error) StoreUserInfo(ctx context.Context, in *StoreUserInfoReq, opts ...grpc.CallOption) (*Response, error) @@ -701,16 +699,6 @@ func (c *analysisStoreClient) StoreInfo(ctx context.Context, in *StoreInfoReq, o return out, nil } -func (c *analysisStoreClient) StoreDetail(ctx context.Context, in *StoreDetailReq, opts ...grpc.CallOption) (*Response, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(Response) - err := c.cc.Invoke(ctx, AnalysisStore_StoreDetail_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *analysisStoreClient) StoreUserList(ctx context.Context, in *StoreUserListReq, opts ...grpc.CallOption) (*Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Response) @@ -748,7 +736,6 @@ type AnalysisStoreServer interface { StoreAuth(context.Context, *StoreAuthReq) (*Response, error) StoreAuthQrcode(context.Context, *StoreAuthQrcodeReq) (*Response, error) StoreInfo(context.Context, *StoreInfoReq) (*Response, error) - StoreDetail(context.Context, *StoreDetailReq) (*Response, error) StoreUserList(context.Context, *StoreUserListReq) (*Response, error) StoreUserUpdate(context.Context, *StoreUserUpdateReq) (*Response, error) StoreUserInfo(context.Context, *StoreUserInfoReq) (*Response, error) @@ -771,9 +758,6 @@ func (UnimplementedAnalysisStoreServer) StoreAuthQrcode(context.Context, *StoreA func (UnimplementedAnalysisStoreServer) StoreInfo(context.Context, *StoreInfoReq) (*Response, error) { return nil, status.Error(codes.Unimplemented, "method StoreInfo not implemented") } -func (UnimplementedAnalysisStoreServer) StoreDetail(context.Context, *StoreDetailReq) (*Response, error) { - return nil, status.Error(codes.Unimplemented, "method StoreDetail not implemented") -} func (UnimplementedAnalysisStoreServer) StoreUserList(context.Context, *StoreUserListReq) (*Response, error) { return nil, status.Error(codes.Unimplemented, "method StoreUserList not implemented") } @@ -858,24 +842,6 @@ func _AnalysisStore_StoreInfo_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _AnalysisStore_StoreDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StoreDetailReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AnalysisStoreServer).StoreDetail(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AnalysisStore_StoreDetail_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AnalysisStoreServer).StoreDetail(ctx, req.(*StoreDetailReq)) - } - return interceptor(ctx, in, info, handler) -} - func _AnalysisStore_StoreUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StoreUserListReq) if err := dec(in); err != nil { @@ -949,10 +915,6 @@ var AnalysisStore_ServiceDesc = grpc.ServiceDesc{ MethodName: "StoreInfo", Handler: _AnalysisStore_StoreInfo_Handler, }, - { - MethodName: "StoreDetail", - Handler: _AnalysisStore_StoreDetail_Handler, - }, { MethodName: "StoreUserList", Handler: _AnalysisStore_StoreUserList_Handler, diff --git a/rpc/user/pb/user.pb.go b/rpc/user/pb/user.pb.go index b7e0f97..e5f7164 100644 --- a/rpc/user/pb/user.pb.go +++ b/rpc/user/pb/user.pb.go @@ -1770,6 +1770,50 @@ func (x *GetOpenidReq) GetCode() string { return "" } +type BindMobileReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BindMobileReq) Reset() { + *x = BindMobileReq{} + mi := &file_user_user_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BindMobileReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BindMobileReq) ProtoMessage() {} + +func (x *BindMobileReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BindMobileReq.ProtoReflect.Descriptor instead. +func (*BindMobileReq) Descriptor() ([]byte, []int) { + return file_user_user_proto_rawDescGZIP(), []int{27} +} + +func (x *BindMobileReq) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + type InfoReq struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -1778,7 +1822,7 @@ type InfoReq struct { func (x *InfoReq) Reset() { *x = InfoReq{} - mi := &file_user_user_proto_msgTypes[27] + mi := &file_user_user_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1790,7 +1834,7 @@ func (x *InfoReq) String() string { func (*InfoReq) ProtoMessage() {} func (x *InfoReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[27] + mi := &file_user_user_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1803,7 +1847,7 @@ func (x *InfoReq) ProtoReflect() protoreflect.Message { // Deprecated: Use InfoReq.ProtoReflect.Descriptor instead. func (*InfoReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{27} + return file_user_user_proto_rawDescGZIP(), []int{28} } type UpdateReq struct { @@ -1820,7 +1864,7 @@ type UpdateReq struct { func (x *UpdateReq) Reset() { *x = UpdateReq{} - mi := &file_user_user_proto_msgTypes[28] + mi := &file_user_user_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1832,7 +1876,7 @@ func (x *UpdateReq) String() string { func (*UpdateReq) ProtoMessage() {} func (x *UpdateReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[28] + mi := &file_user_user_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1845,7 +1889,7 @@ func (x *UpdateReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateReq.ProtoReflect.Descriptor instead. func (*UpdateReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{28} + return file_user_user_proto_rawDescGZIP(), []int{29} } func (x *UpdateReq) GetName() string { @@ -1900,7 +1944,7 @@ type PasswordReq struct { func (x *PasswordReq) Reset() { *x = PasswordReq{} - mi := &file_user_user_proto_msgTypes[29] + mi := &file_user_user_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1912,7 +1956,7 @@ func (x *PasswordReq) String() string { func (*PasswordReq) ProtoMessage() {} func (x *PasswordReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[29] + mi := &file_user_user_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1925,7 +1969,7 @@ func (x *PasswordReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PasswordReq.ProtoReflect.Descriptor instead. func (*PasswordReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{29} + return file_user_user_proto_rawDescGZIP(), []int{30} } func (x *PasswordReq) GetOldPassword() string { @@ -1953,7 +1997,7 @@ type ClientReq struct { func (x *ClientReq) Reset() { *x = ClientReq{} - mi := &file_user_user_proto_msgTypes[30] + mi := &file_user_user_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1965,7 +2009,7 @@ func (x *ClientReq) String() string { func (*ClientReq) ProtoMessage() {} func (x *ClientReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[30] + mi := &file_user_user_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1978,7 +2022,7 @@ func (x *ClientReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientReq.ProtoReflect.Descriptor instead. func (*ClientReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{30} + return file_user_user_proto_rawDescGZIP(), []int{31} } func (x *ClientReq) GetName() string { @@ -2011,7 +2055,7 @@ type GenerateQrcodeReq struct { func (x *GenerateQrcodeReq) Reset() { *x = GenerateQrcodeReq{} - mi := &file_user_user_proto_msgTypes[31] + mi := &file_user_user_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2023,7 +2067,7 @@ func (x *GenerateQrcodeReq) String() string { func (*GenerateQrcodeReq) ProtoMessage() {} func (x *GenerateQrcodeReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[31] + mi := &file_user_user_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2036,7 +2080,7 @@ func (x *GenerateQrcodeReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GenerateQrcodeReq.ProtoReflect.Descriptor instead. func (*GenerateQrcodeReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{31} + return file_user_user_proto_rawDescGZIP(), []int{32} } func (x *GenerateQrcodeReq) GetClientCode() string { @@ -2055,7 +2099,7 @@ type QrcodeScanReq struct { func (x *QrcodeScanReq) Reset() { *x = QrcodeScanReq{} - mi := &file_user_user_proto_msgTypes[32] + mi := &file_user_user_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2067,7 +2111,7 @@ func (x *QrcodeScanReq) String() string { func (*QrcodeScanReq) ProtoMessage() {} func (x *QrcodeScanReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[32] + mi := &file_user_user_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2080,7 +2124,7 @@ func (x *QrcodeScanReq) ProtoReflect() protoreflect.Message { // Deprecated: Use QrcodeScanReq.ProtoReflect.Descriptor instead. func (*QrcodeScanReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{32} + return file_user_user_proto_rawDescGZIP(), []int{33} } func (x *QrcodeScanReq) GetSessionId() string { @@ -2100,7 +2144,7 @@ type QrcodeLoginReq struct { func (x *QrcodeLoginReq) Reset() { *x = QrcodeLoginReq{} - mi := &file_user_user_proto_msgTypes[33] + mi := &file_user_user_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2112,7 +2156,7 @@ func (x *QrcodeLoginReq) String() string { func (*QrcodeLoginReq) ProtoMessage() {} func (x *QrcodeLoginReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[33] + mi := &file_user_user_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2125,7 +2169,7 @@ func (x *QrcodeLoginReq) ProtoReflect() protoreflect.Message { // Deprecated: Use QrcodeLoginReq.ProtoReflect.Descriptor instead. func (*QrcodeLoginReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{33} + return file_user_user_proto_rawDescGZIP(), []int{34} } func (x *QrcodeLoginReq) GetSessionId() string { @@ -2285,6 +2329,8 @@ const file_user_user_proto_rawDesc = "" + "\x16InternalUsersByBizData\x12'\n" + "\x05items\x18\x01 \x03(\v2\x11.user.BizUserItemR\x05items\"\"\n" + "\fGetOpenidReq\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\"#\n" + + "\rBindMobileReq\x12\x12\n" + "\x04code\x18\x01 \x01(\tR\x04code\"\t\n" + "\aInfoReq\"\xa0\x01\n" + "\tUpdateReq\x12\x12\n" + @@ -2310,7 +2356,7 @@ const file_user_user_proto_rawDesc = "" + "\x0eQrcodeLoginReq\x12\x1d\n" + "\n" + "session_id\x18\x01 \x01(\tR\tsessionId\x12\x12\n" + - "\x04type\x18\x02 \x01(\x05R\x04type2\xc4\r\n" + + "\x04type\x18\x02 \x01(\x05R\x04type2\x97\x0e\n" + "\x04User\x12F\n" + "\x05Login\x12\x0e.user.LoginReq\x1a\x0e.user.Response\"\x1d\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v3/user/login\x12b\n" + "\x0eGenerateQrcode\x12\x17.user.GenerateQrcodeReq\x1a\x0e.user.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v3/user/qrcode/generate\x12V\n" + @@ -2320,7 +2366,9 @@ const file_user_user_proto_rawDesc = "" + "\x04Info\x12\r.user.InfoReq\x1a\x0e.user.Response\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\x12\x11/api/v3/user/info\x12B\n" + "\x06Update\x12\x0f.user.UpdateReq\x1a\x0e.user.Response\"\x17\x82\xd3\xe4\x93\x02\x11:\x01*\x1a\f/api/v3/user\x12O\n" + "\bPassword\x12\x11.user.PasswordReq\x1a\x0e.user.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\x1a\x15/api/v3/user/password\x12S\n" + - "\tGetOpenid\x12\x12.user.GetOpenidReq\x1a\x0e.user.Response\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/api/v3/user/getuseroid\x12K\n" + + "\tGetOpenid\x12\x12.user.GetOpenidReq\x1a\x0e.user.Response\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/api/v3/user/getuseroid\x12Q\n" + + "\n" + + "BindMobile\x12\x13.user.BindMobileReq\x1a\x0e.user.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/api/v3/user/mobile\x12K\n" + "\x06Client\x12\x0f.user.ClientReq\x1a\x0e.user.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\x12\x15/admin/v3/user/client\x12P\n" + "\tUserItems\x12\x12.user.UserItemsReq\x1a\x0e.user.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/user/items\x12S\n" + "\n" + @@ -2348,7 +2396,7 @@ func file_user_user_proto_rawDescGZIP() []byte { return file_user_user_proto_rawDescData } -var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 35) var file_user_user_proto_goTypes = []any{ (*Response)(nil), // 0: user.Response (*LoginReq)(nil), // 1: user.LoginReq @@ -2377,61 +2425,64 @@ var file_user_user_proto_goTypes = []any{ (*BizUserItem)(nil), // 24: user.BizUserItem (*InternalUsersByBizData)(nil), // 25: user.InternalUsersByBizData (*GetOpenidReq)(nil), // 26: user.GetOpenidReq - (*InfoReq)(nil), // 27: user.InfoReq - (*UpdateReq)(nil), // 28: user.UpdateReq - (*PasswordReq)(nil), // 29: user.PasswordReq - (*ClientReq)(nil), // 30: user.ClientReq - (*GenerateQrcodeReq)(nil), // 31: user.GenerateQrcodeReq - (*QrcodeScanReq)(nil), // 32: user.QrcodeScanReq - (*QrcodeLoginReq)(nil), // 33: user.QrcodeLoginReq + (*BindMobileReq)(nil), // 27: user.BindMobileReq + (*InfoReq)(nil), // 28: user.InfoReq + (*UpdateReq)(nil), // 29: user.UpdateReq + (*PasswordReq)(nil), // 30: user.PasswordReq + (*ClientReq)(nil), // 31: user.ClientReq + (*GenerateQrcodeReq)(nil), // 32: user.GenerateQrcodeReq + (*QrcodeScanReq)(nil), // 33: user.QrcodeScanReq + (*QrcodeLoginReq)(nil), // 34: user.QrcodeLoginReq } var file_user_user_proto_depIdxs = []int32{ 7, // 0: user.InternalUsersByIdsData.items:type_name -> user.UserBriefItem 24, // 1: user.InternalUsersByBizData.items:type_name -> user.BizUserItem 1, // 2: user.User.Login:input_type -> user.LoginReq - 31, // 3: user.User.GenerateQrcode:input_type -> user.GenerateQrcodeReq - 32, // 4: user.User.QrcodeScan:input_type -> user.QrcodeScanReq - 33, // 5: user.User.QrcodeLogin:input_type -> user.QrcodeLoginReq - 27, // 6: user.User.Info:input_type -> user.InfoReq - 28, // 7: user.User.Update:input_type -> user.UpdateReq - 29, // 8: user.User.Password:input_type -> user.PasswordReq + 32, // 3: user.User.GenerateQrcode:input_type -> user.GenerateQrcodeReq + 33, // 4: user.User.QrcodeScan:input_type -> user.QrcodeScanReq + 34, // 5: user.User.QrcodeLogin:input_type -> user.QrcodeLoginReq + 28, // 6: user.User.Info:input_type -> user.InfoReq + 29, // 7: user.User.Update:input_type -> user.UpdateReq + 30, // 8: user.User.Password:input_type -> user.PasswordReq 26, // 9: user.User.GetOpenid:input_type -> user.GetOpenidReq - 30, // 10: user.User.Client:input_type -> user.ClientReq - 2, // 11: user.User.UserItems:input_type -> user.UserItemsReq - 3, // 12: user.User.UserStatus:input_type -> user.UserStatusReq - 4, // 13: user.User.InternalCreate:input_type -> user.InternalCreateReq - 13, // 14: user.User.InternalCheckCreate:input_type -> user.InternalCheckCreateReq - 15, // 15: user.User.InternalCheckUpdate:input_type -> user.InternalCheckUpdateReq - 17, // 16: user.User.InternalUpdate:input_type -> user.InternalUpdateReq - 6, // 17: user.User.InternalUsersByIds:input_type -> user.InternalUsersByIdsReq - 9, // 18: user.User.InternalUpdateMobile:input_type -> user.InternalUpdateMobileReq - 11, // 19: user.User.InternalRevokeBizClient:input_type -> user.InternalRevokeBizClientReq - 19, // 20: user.User.InternalGetUserInfo:input_type -> user.InternalGetUserInfoReq - 21, // 21: user.User.InternalVerifyPassword:input_type -> user.InternalVerifyPasswordReq - 23, // 22: user.User.InternalUsersByBiz:input_type -> user.InternalUsersByBizReq - 0, // 23: user.User.Login:output_type -> user.Response - 0, // 24: user.User.GenerateQrcode:output_type -> user.Response - 0, // 25: user.User.QrcodeScan:output_type -> user.Response - 0, // 26: user.User.QrcodeLogin:output_type -> user.Response - 0, // 27: user.User.Info:output_type -> user.Response - 0, // 28: user.User.Update:output_type -> user.Response - 0, // 29: user.User.Password:output_type -> user.Response - 0, // 30: user.User.GetOpenid:output_type -> user.Response - 0, // 31: user.User.Client:output_type -> user.Response - 0, // 32: user.User.UserItems:output_type -> user.Response - 0, // 33: user.User.UserStatus:output_type -> user.Response - 5, // 34: user.User.InternalCreate:output_type -> user.InternalCreateData - 14, // 35: user.User.InternalCheckCreate:output_type -> user.InternalCheckCreateData - 16, // 36: user.User.InternalCheckUpdate:output_type -> user.InternalCheckUpdateData - 18, // 37: user.User.InternalUpdate:output_type -> user.InternalUpdateData - 8, // 38: user.User.InternalUsersByIds:output_type -> user.InternalUsersByIdsData - 10, // 39: user.User.InternalUpdateMobile:output_type -> user.InternalUpdateMobileData - 12, // 40: user.User.InternalRevokeBizClient:output_type -> user.InternalRevokeBizClientData - 20, // 41: user.User.InternalGetUserInfo:output_type -> user.InternalGetUserInfoData - 22, // 42: user.User.InternalVerifyPassword:output_type -> user.InternalVerifyPasswordData - 25, // 43: user.User.InternalUsersByBiz:output_type -> user.InternalUsersByBizData - 23, // [23:44] is the sub-list for method output_type - 2, // [2:23] is the sub-list for method input_type + 27, // 10: user.User.BindMobile:input_type -> user.BindMobileReq + 31, // 11: user.User.Client:input_type -> user.ClientReq + 2, // 12: user.User.UserItems:input_type -> user.UserItemsReq + 3, // 13: user.User.UserStatus:input_type -> user.UserStatusReq + 4, // 14: user.User.InternalCreate:input_type -> user.InternalCreateReq + 13, // 15: user.User.InternalCheckCreate:input_type -> user.InternalCheckCreateReq + 15, // 16: user.User.InternalCheckUpdate:input_type -> user.InternalCheckUpdateReq + 17, // 17: user.User.InternalUpdate:input_type -> user.InternalUpdateReq + 6, // 18: user.User.InternalUsersByIds:input_type -> user.InternalUsersByIdsReq + 9, // 19: user.User.InternalUpdateMobile:input_type -> user.InternalUpdateMobileReq + 11, // 20: user.User.InternalRevokeBizClient:input_type -> user.InternalRevokeBizClientReq + 19, // 21: user.User.InternalGetUserInfo:input_type -> user.InternalGetUserInfoReq + 21, // 22: user.User.InternalVerifyPassword:input_type -> user.InternalVerifyPasswordReq + 23, // 23: user.User.InternalUsersByBiz:input_type -> user.InternalUsersByBizReq + 0, // 24: user.User.Login:output_type -> user.Response + 0, // 25: user.User.GenerateQrcode:output_type -> user.Response + 0, // 26: user.User.QrcodeScan:output_type -> user.Response + 0, // 27: user.User.QrcodeLogin:output_type -> user.Response + 0, // 28: user.User.Info:output_type -> user.Response + 0, // 29: user.User.Update:output_type -> user.Response + 0, // 30: user.User.Password:output_type -> user.Response + 0, // 31: user.User.GetOpenid:output_type -> user.Response + 0, // 32: user.User.BindMobile:output_type -> user.Response + 0, // 33: user.User.Client:output_type -> user.Response + 0, // 34: user.User.UserItems:output_type -> user.Response + 0, // 35: user.User.UserStatus:output_type -> user.Response + 5, // 36: user.User.InternalCreate:output_type -> user.InternalCreateData + 14, // 37: user.User.InternalCheckCreate:output_type -> user.InternalCheckCreateData + 16, // 38: user.User.InternalCheckUpdate:output_type -> user.InternalCheckUpdateData + 18, // 39: user.User.InternalUpdate:output_type -> user.InternalUpdateData + 8, // 40: user.User.InternalUsersByIds:output_type -> user.InternalUsersByIdsData + 10, // 41: user.User.InternalUpdateMobile:output_type -> user.InternalUpdateMobileData + 12, // 42: user.User.InternalRevokeBizClient:output_type -> user.InternalRevokeBizClientData + 20, // 43: user.User.InternalGetUserInfo:output_type -> user.InternalGetUserInfoData + 22, // 44: user.User.InternalVerifyPassword:output_type -> user.InternalVerifyPasswordData + 25, // 45: user.User.InternalUsersByBiz:output_type -> user.InternalUsersByBizData + 24, // [24:46] is the sub-list for method output_type + 2, // [2:24] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -2448,7 +2499,7 @@ func file_user_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_user_proto_rawDesc), len(file_user_user_proto_rawDesc)), NumEnums: 0, - NumMessages: 34, + NumMessages: 35, NumExtensions: 0, NumServices: 1, }, diff --git a/rpc/user/pb/user_grpc.pb.go b/rpc/user/pb/user_grpc.pb.go index e27fc37..0725edf 100644 --- a/rpc/user/pb/user_grpc.pb.go +++ b/rpc/user/pb/user_grpc.pb.go @@ -27,6 +27,7 @@ const ( User_Update_FullMethodName = "/user.User/Update" User_Password_FullMethodName = "/user.User/Password" User_GetOpenid_FullMethodName = "/user.User/GetOpenid" + User_BindMobile_FullMethodName = "/user.User/BindMobile" User_Client_FullMethodName = "/user.User/Client" User_UserItems_FullMethodName = "/user.User/UserItems" User_UserStatus_FullMethodName = "/user.User/UserStatus" @@ -54,6 +55,7 @@ type UserClient interface { Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Response, error) Password(ctx context.Context, in *PasswordReq, opts ...grpc.CallOption) (*Response, error) GetOpenid(ctx context.Context, in *GetOpenidReq, opts ...grpc.CallOption) (*Response, error) + BindMobile(ctx context.Context, in *BindMobileReq, opts ...grpc.CallOption) (*Response, error) Client(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*Response, error) UserItems(ctx context.Context, in *UserItemsReq, opts ...grpc.CallOption) (*Response, error) UserStatus(ctx context.Context, in *UserStatusReq, opts ...grpc.CallOption) (*Response, error) @@ -157,6 +159,16 @@ func (c *userClient) GetOpenid(ctx context.Context, in *GetOpenidReq, opts ...gr return out, nil } +func (c *userClient) BindMobile(ctx context.Context, in *BindMobileReq, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, User_BindMobile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *userClient) Client(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Response) @@ -299,6 +311,7 @@ type UserServer interface { Update(context.Context, *UpdateReq) (*Response, error) Password(context.Context, *PasswordReq) (*Response, error) GetOpenid(context.Context, *GetOpenidReq) (*Response, error) + BindMobile(context.Context, *BindMobileReq) (*Response, error) Client(context.Context, *ClientReq) (*Response, error) UserItems(context.Context, *UserItemsReq) (*Response, error) UserStatus(context.Context, *UserStatusReq) (*Response, error) @@ -346,6 +359,9 @@ func (UnimplementedUserServer) Password(context.Context, *PasswordReq) (*Respons func (UnimplementedUserServer) GetOpenid(context.Context, *GetOpenidReq) (*Response, error) { return nil, status.Error(codes.Unimplemented, "method GetOpenid not implemented") } +func (UnimplementedUserServer) BindMobile(context.Context, *BindMobileReq) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method BindMobile not implemented") +} func (UnimplementedUserServer) Client(context.Context, *ClientReq) (*Response, error) { return nil, status.Error(codes.Unimplemented, "method Client not implemented") } @@ -550,6 +566,24 @@ func _User_GetOpenid_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _User_BindMobile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BindMobileReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).BindMobile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: User_BindMobile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).BindMobile(ctx, req.(*BindMobileReq)) + } + return interceptor(ctx, in, info, handler) +} + func _User_Client_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClientReq) if err := dec(in); err != nil { @@ -823,6 +857,10 @@ var User_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetOpenid", Handler: _User_GetOpenid_Handler, }, + { + MethodName: "BindMobile", + Handler: _User_BindMobile_Handler, + }, { MethodName: "Client", Handler: _User_Client_Handler, diff --git a/rpc/user/user.pb b/rpc/user/user.pb index 6400af5..b596e4a 100644 Binary files a/rpc/user/user.pb and b/rpc/user/user.pb differ diff --git a/rpc/user/user.proto b/rpc/user/user.proto index d201434..66483da 100644 --- a/rpc/user/user.proto +++ b/rpc/user/user.proto @@ -54,6 +54,12 @@ service User { body: "*" }; } + rpc BindMobile(BindMobileReq) returns (Response) { + option (google.api.http) = { + post: "/api/v3/user/mobile" + body: "*" + }; + } rpc Client(ClientReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/user/client" @@ -263,6 +269,10 @@ message GetOpenidReq { string code = 1; } +message BindMobileReq { + string code = 1; +} + message InfoReq {} message UpdateReq { diff --git a/services/analysis/client/analysis/analysis.go b/services/analysis/client/analysis/analysis.go index 2cfb18e..3f36c75 100644 --- a/services/analysis/client/analysis/analysis.go +++ b/services/analysis/client/analysis/analysis.go @@ -14,14 +14,17 @@ import ( ) type ( - AgreementInfoReq = analysis.AgreementInfoReq - InternalCreateUserData = analysis.InternalCreateUserData - InternalCreateUserReq = analysis.InternalCreateUserReq - Response = analysis.Response - SwitchReq = analysis.SwitchReq + AgreementInfoReq = analysis.AgreementInfoReq + InternalCreateUserData = analysis.InternalCreateUserData + InternalCreateUserReq = analysis.InternalCreateUserReq + InternalSetRegisteredData = analysis.InternalSetRegisteredData + InternalSetRegisteredReq = analysis.InternalSetRegisteredReq + Response = analysis.Response + SwitchReq = analysis.SwitchReq Analysis interface { InternalCreateUser(ctx context.Context, in *InternalCreateUserReq, opts ...grpc.CallOption) (*InternalCreateUserData, error) + InternalSetRegistered(ctx context.Context, in *InternalSetRegisteredReq, opts ...grpc.CallOption) (*InternalSetRegisteredData, error) AgreementInfo(ctx context.Context, in *AgreementInfoReq, opts ...grpc.CallOption) (*Response, error) Switch(ctx context.Context, in *SwitchReq, opts ...grpc.CallOption) (*Response, error) } @@ -42,6 +45,11 @@ func (m *defaultAnalysis) InternalCreateUser(ctx context.Context, in *InternalCr return client.InternalCreateUser(ctx, in, opts...) } +func (m *defaultAnalysis) InternalSetRegistered(ctx context.Context, in *InternalSetRegisteredReq, opts ...grpc.CallOption) (*InternalSetRegisteredData, error) { + client := analysis.NewAnalysisClient(m.cli.Conn()) + return client.InternalSetRegistered(ctx, in, opts...) +} + func (m *defaultAnalysis) AgreementInfo(ctx context.Context, in *AgreementInfoReq, opts ...grpc.CallOption) (*Response, error) { client := analysis.NewAnalysisClient(m.cli.Conn()) return client.AgreementInfo(ctx, in, opts...) diff --git a/services/analysis/client/analysisstore/analysisStore.go b/services/analysis/client/analysisstore/analysisStore.go index cc6fa6a..4eb3149 100644 --- a/services/analysis/client/analysisstore/analysisStore.go +++ b/services/analysis/client/analysisstore/analysisStore.go @@ -17,7 +17,6 @@ type ( Response = analysis.Response StoreAuthQrcodeReq = analysis.StoreAuthQrcodeReq StoreAuthReq = analysis.StoreAuthReq - StoreDetailReq = analysis.StoreDetailReq StoreInfoReq = analysis.StoreInfoReq StoreUserInfoReq = analysis.StoreUserInfoReq StoreUserListReq = analysis.StoreUserListReq @@ -27,7 +26,6 @@ type ( StoreAuth(ctx context.Context, in *StoreAuthReq, opts ...grpc.CallOption) (*Response, error) StoreAuthQrcode(ctx context.Context, in *StoreAuthQrcodeReq, opts ...grpc.CallOption) (*Response, error) StoreInfo(ctx context.Context, in *StoreInfoReq, opts ...grpc.CallOption) (*Response, error) - StoreDetail(ctx context.Context, in *StoreDetailReq, opts ...grpc.CallOption) (*Response, error) StoreUserList(ctx context.Context, in *StoreUserListReq, opts ...grpc.CallOption) (*Response, error) StoreUserUpdate(ctx context.Context, in *StoreUserUpdateReq, opts ...grpc.CallOption) (*Response, error) StoreUserInfo(ctx context.Context, in *StoreUserInfoReq, opts ...grpc.CallOption) (*Response, error) @@ -59,11 +57,6 @@ func (m *defaultAnalysisStore) StoreInfo(ctx context.Context, in *StoreInfoReq, return client.StoreInfo(ctx, in, opts...) } -func (m *defaultAnalysisStore) StoreDetail(ctx context.Context, in *StoreDetailReq, opts ...grpc.CallOption) (*Response, error) { - client := analysis.NewAnalysisStoreClient(m.cli.Conn()) - return client.StoreDetail(ctx, in, opts...) -} - func (m *defaultAnalysisStore) StoreUserList(ctx context.Context, in *StoreUserListReq, opts ...grpc.CallOption) (*Response, error) { client := analysis.NewAnalysisStoreClient(m.cli.Conn()) return client.StoreUserList(ctx, in, opts...) diff --git a/services/analysis/client/analysisuser/analysisUser.go b/services/analysis/client/analysisuser/analysisUser.go index 1ac1d8d..60d87f9 100644 --- a/services/analysis/client/analysisuser/analysisUser.go +++ b/services/analysis/client/analysisuser/analysisUser.go @@ -24,10 +24,8 @@ type ( UserAuthUpdateReq = analysis.UserAuthUpdateReq UserDeleteReq = analysis.UserDeleteReq UserImproveReq = analysis.UserImproveReq - UserRegisterReq = analysis.UserRegisterReq AnalysisUser interface { - UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*Response, error) FaceBind(ctx context.Context, in *FaceBindReq, opts ...grpc.CallOption) (*Response, error) UserImprove(ctx context.Context, in *UserImproveReq, opts ...grpc.CallOption) (*Response, error) UserDelete(ctx context.Context, in *UserDeleteReq, opts ...grpc.CallOption) (*Response, error) @@ -50,11 +48,6 @@ func NewAnalysisUser(cli zrpc.Client) AnalysisUser { } } -func (m *defaultAnalysisUser) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*Response, error) { - client := analysis.NewAnalysisUserClient(m.cli.Conn()) - return client.UserRegister(ctx, in, opts...) -} - func (m *defaultAnalysisUser) FaceBind(ctx context.Context, in *FaceBindReq, opts ...grpc.CallOption) (*Response, error) { client := analysis.NewAnalysisUserClient(m.cli.Conn()) return client.FaceBind(ctx, in, opts...) diff --git a/services/analysis/internal/logic/analysis/internalSetRegisteredLogic.go b/services/analysis/internal/logic/analysis/internalSetRegisteredLogic.go new file mode 100644 index 0000000..73c2a74 --- /dev/null +++ b/services/analysis/internal/logic/analysis/internalSetRegisteredLogic.go @@ -0,0 +1,61 @@ +package analysislogic + +import ( + "context" + "strconv" + + "lone-services/pkg/modelbase" + "lone-services/pkg/utils" + analysis "lone-services/rpc/analysis/pb" + "lone-services/services/analysis/internal/logic/common" + "lone-services/services/analysis/internal/model" + "lone-services/services/analysis/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type InternalSetRegisteredLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewInternalSetRegisteredLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InternalSetRegisteredLogic { + return &InternalSetRegisteredLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *InternalSetRegisteredLogic) InternalSetRegistered(in *analysis.InternalSetRegisteredReq) (*analysis.InternalSetRegisteredData, error) { + if in == nil || in.Id < utils.NumberOne { + return nil, status.Error(codes.InvalidArgument, "用户ID不能为空") + } + + row, err := common.LoadAnalysisUser(in.Id) + if err != nil { + l.Errorf("internal set registered get: %v", err) + return nil, status.Error(codes.Internal, utils.Fail.Msg) + } + if row == nil { + return nil, status.Error(codes.NotFound, utils.ErrorNotFund.Msg) + } + if row.IsRegistered == uint8(utils.StatusOk) { + return &analysis.InternalSetRegisteredData{Ok: true}, nil + } + + _, err = model.UserModel{}.Init().Edit(modelbase.Params{ + Eq: map[string]string{"id": strconv.FormatInt(in.Id, utils.NumberTen)}, + }, map[string]interface{}{ + "is_registered": uint8(utils.StatusOk), + }) + if err != nil { + l.Errorf("internal set registered edit: %v", err) + return nil, status.Error(codes.Internal, utils.Fail.Msg) + } + + return &analysis.InternalSetRegisteredData{Ok: true}, nil +} diff --git a/services/analysis/internal/logic/analysisuser/userRegisterLogic.go b/services/analysis/internal/logic/analysisuser/userRegisterLogic.go deleted file mode 100644 index f6c361a..0000000 --- a/services/analysis/internal/logic/analysisuser/userRegisterLogic.go +++ /dev/null @@ -1,107 +0,0 @@ -package analysisuserlogic - -import ( - "context" - "strconv" - - "lone-services/pkg/modelbase" - "lone-services/pkg/utils" - "lone-services/pkg/validate" - analysis "lone-services/rpc/analysis/pb" - userpb "lone-services/rpc/user/pb" - analysisconfig "lone-services/services/analysis/internal/config" - "lone-services/services/analysis/internal/logic/common" - "lone-services/services/analysis/internal/model" - "lone-services/services/analysis/internal/svc" - "lone-services/services/analysis/validator" - - "github.com/zeromicro/go-zero/core/logx" -) - -type UserRegisterLogic struct { - ctx context.Context - svcCtx *svc.ServiceContext - logx.Logger -} - -func NewUserRegisterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserRegisterLogic { - return &UserRegisterLogic{ - ctx: ctx, - svcCtx: svcCtx, - Logger: logx.WithContext(ctx), - } -} - -func (l *UserRegisterLogic) UserRegister(in *analysis.UserRegisterReq) (*analysis.Response, error) { - var req validator.UserRegisterValidator - if msg := validate.ValidateFromProto(in, &req); msg != utils.StringEmpty { - return common.OutResponse(utils.ErrorParams, msg), nil - } - - bizId, loginUser, fail := common.RequireBizUserId(l.ctx) - if fail != nil { - return fail, nil - } - - row, err := common.LoadAnalysisUser(bizId) - if err != nil { - l.Errorf("register load user: %v", err) - return common.FailResponse(utils.Fail), nil - } - if row == nil { - return common.FailResponse(utils.ErrorNotFund), nil - } - - wxCfg, cfgErr := analysisconfig.LoadWechatConfig() - if cfgErr != nil { - l.Errorf("register wechat config: %v", cfgErr) - return common.OutResponse(utils.Fail, "微信配置缺失"), nil - } - - token, tokenErr := wxCfg.NewAuthClient().AccessToken(l.ctx) - if tokenErr != nil { - l.Errorf("register access token: %v", tokenErr) - return common.FailResponse(utils.Fail), nil - } - phone, phoneErr := wxCfg.NewAuthClient().GetPhoneNumber(token.AccessToken, req.Code) - if phoneErr != nil { - l.Errorf("register get phone: %v", phoneErr) - return common.FailResponse(utils.Fail), nil - } - - mobile := phone.PhoneNumber - if mobile == utils.StringEmpty { - mobile = phone.PurePhoneNumber - } - if mobile == utils.StringEmpty { - return common.FailResponse(utils.Fail), nil - } - - if l.svcCtx.UserSvcName == utils.StringEmpty { - return common.FailResponse(utils.Fail), nil - } - cli, err := svc.GetRpcClient(l.svcCtx.UserSvcName) - if err != nil { - l.Errorf("register get user rpc: %v", err) - return common.FailResponse(utils.Fail), nil - } - if _, err = userpb.NewUserClient(cli.Conn()).InternalUpdateMobile(l.ctx, &userpb.InternalUpdateMobileReq{ - UserId: loginUser.ID, - Mobile: mobile, - }); err != nil { - l.Errorf("register update mobile: %v", err) - return common.FailResponse(utils.Fail), nil - } - - _, err = model.UserModel{}.Init().Edit(modelbase.Params{ - Eq: map[string]string{"id": strconv.FormatInt(bizId, utils.NumberTen)}, - }, map[string]interface{}{ - "is_registered": uint8(utils.StatusOk), - }) - if err != nil { - l.Errorf("register update flag: %v", err) - return common.FailResponse(utils.Fail), nil - } - - return common.OkResponse(nil), nil -} diff --git a/services/analysis/internal/server/analysis/analysisServer.go b/services/analysis/internal/server/analysis/analysisServer.go index 9995257..f8b8944 100644 --- a/services/analysis/internal/server/analysis/analysisServer.go +++ b/services/analysis/internal/server/analysis/analysisServer.go @@ -28,6 +28,11 @@ func (s *AnalysisServer) InternalCreateUser(ctx context.Context, in *analysis.In return l.InternalCreateUser(in) } +func (s *AnalysisServer) InternalSetRegistered(ctx context.Context, in *analysis.InternalSetRegisteredReq) (*analysis.InternalSetRegisteredData, error) { + l := analysislogic.NewInternalSetRegisteredLogic(ctx, s.svcCtx) + return l.InternalSetRegistered(in) +} + func (s *AnalysisServer) AgreementInfo(ctx context.Context, in *analysis.AgreementInfoReq) (*analysis.Response, error) { l := analysislogic.NewAgreementInfoLogic(ctx, s.svcCtx) return l.AgreementInfo(in) diff --git a/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go b/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go index 5531483..f4dbcd3 100644 --- a/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go +++ b/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go @@ -5,7 +5,7 @@ package server import ( - analysis "lone-services/rpc/analysis/pb" + "lone-services/rpc/analysis/pb" "lone-services/services/analysis/internal/svc" ) diff --git a/services/analysis/internal/server/analysisstore/analysisStoreServer.go b/services/analysis/internal/server/analysisstore/analysisStoreServer.go index 5697fc4..ca96abf 100644 --- a/services/analysis/internal/server/analysisstore/analysisStoreServer.go +++ b/services/analysis/internal/server/analysisstore/analysisStoreServer.go @@ -38,11 +38,6 @@ func (s *AnalysisStoreServer) StoreInfo(ctx context.Context, in *analysis.StoreI return l.StoreInfo(in) } -func (s *AnalysisStoreServer) StoreDetail(ctx context.Context, in *analysis.StoreDetailReq) (*analysis.Response, error) { - l := analysisstorelogic.NewStoreDetailLogic(ctx, s.svcCtx) - return l.StoreDetail(in) -} - func (s *AnalysisStoreServer) StoreUserList(ctx context.Context, in *analysis.StoreUserListReq) (*analysis.Response, error) { l := analysisstorelogic.NewStoreUserListLogic(ctx, s.svcCtx) return l.StoreUserList(in) diff --git a/services/analysis/internal/server/analysisuser/analysisUserServer.go b/services/analysis/internal/server/analysisuser/analysisUserServer.go index 98cfef2..3b257c3 100644 --- a/services/analysis/internal/server/analysisuser/analysisUserServer.go +++ b/services/analysis/internal/server/analysisuser/analysisUserServer.go @@ -23,11 +23,6 @@ func NewAnalysisUserServer(svcCtx *svc.ServiceContext) *AnalysisUserServer { } } -func (s *AnalysisUserServer) UserRegister(ctx context.Context, in *analysis.UserRegisterReq) (*analysis.Response, error) { - l := analysisuserlogic.NewUserRegisterLogic(ctx, s.svcCtx) - return l.UserRegister(in) -} - func (s *AnalysisUserServer) FaceBind(ctx context.Context, in *analysis.FaceBindReq) (*analysis.Response, error) { l := analysisuserlogic.NewFaceBindLogic(ctx, s.svcCtx) return l.FaceBind(in) diff --git a/services/analysis/validator/user.go b/services/analysis/validator/user.go index 1e4229e..83083e7 100644 --- a/services/analysis/validator/user.go +++ b/services/analysis/validator/user.go @@ -19,17 +19,6 @@ func (p UserImproveValidator) GetMessage() validate.ValidatorMessages { } } -type UserRegisterValidator struct { - Code string `validate:"required,max=128"` -} - -func (p UserRegisterValidator) GetMessage() validate.ValidatorMessages { - return validate.ValidatorMessages{ - "Code.required": "code 不能为空", - "Code.max": "code 过长", - } -} - type FaceBindValidator struct { FacePath string `validate:"required,max=512"` } diff --git a/services/user/internal/logic/bindMobileLogic.go b/services/user/internal/logic/bindMobileLogic.go new file mode 100644 index 0000000..38502f2 --- /dev/null +++ b/services/user/internal/logic/bindMobileLogic.go @@ -0,0 +1,131 @@ +package logic + +import ( + "context" + + "lone-services/pkg/utils" + "lone-services/pkg/validate" + analysispb "lone-services/rpc/analysis/pb" + user "lone-services/rpc/user/pb" + userconfig "lone-services/services/user/internal/config" + "lone-services/services/user/internal/svc" + "lone-services/services/user/validator" + + "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +const clientCodeUserSkin = "user_skin" + +type BindMobileLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewBindMobileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BindMobileLogic { + return &BindMobileLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *BindMobileLogic) BindMobile(in *user.BindMobileReq) (*user.Response, error) { + loginUser := utils.GetUserFromCtx(l.ctx) + if loginUser.ID < utils.NumberOne { + return failResponse(utils.ErrorNoLoginInfo), nil + } + + var req validator.BindMobileValidator + if msg := validate.ValidateFromProto(in, &req); msg != utils.StringEmpty { + return outResponse(utils.ErrorParams, msg), nil + } + if loginUser.ClientCode == utils.StringEmpty { + return outResponse(utils.ErrorParams, "端编码不能为空"), nil + } + + if _, err := loadEnabledClient(loginUser.ClientCode); err != nil { + l.Errorf("bind mobile load client: %v", err) + return failResponse(utils.Fail), nil + } + + wxCfg, cfgErr := userconfig.LoadWechatConfig(loginUser.ClientCode) + if cfgErr != nil { + l.Errorf("bind mobile wechat config: %v", cfgErr) + return outResponse(utils.Fail, "微信配置缺失"), nil + } + + token, tokenErr := wxCfg.NewAuthClient().AccessToken(l.ctx) + if tokenErr != nil { + l.Errorf("bind mobile access token: %v", tokenErr) + return failResponse(utils.Fail), nil + } + phone, phoneErr := wxCfg.NewAuthClient().GetPhoneNumber(token.AccessToken, req.Code) + if phoneErr != nil { + l.Errorf("bind mobile get phone: %v", phoneErr) + return failResponse(utils.Fail), nil + } + + mobile := phone.PhoneNumber + if mobile == utils.StringEmpty { + mobile = phone.PurePhoneNumber + } + if mobile == utils.StringEmpty { + return failResponse(utils.Fail), nil + } + + _, updateErr := NewInternalUpdateMobileLogic(l.ctx, l.svcCtx).InternalUpdateMobile(&user.InternalUpdateMobileReq{ + UserId: loginUser.ID, + Mobile: mobile, + }) + if updateErr != nil { + l.Errorf("bind mobile update: %v", updateErr) + if st, ok := status.FromError(updateErr); ok { + switch st.Code() { + case codes.InvalidArgument: + return outResponse(utils.ErrorParams, st.Message()), nil + case codes.AlreadyExists: + return failResponse(utils.ErrorDataIsExist), nil + case codes.NotFound: + return failResponse(utils.ErrorNotFund), nil + } + } + return failResponse(utils.Fail), nil + } + + if loginUser.ClientCode == clientCodeUserSkin { + if err := l.markAnalysisRegistered(loginUser.ID, loginUser.ClientCode, loginUser.BizId); err != nil { + l.Errorf("bind mobile set registered: %v", err) + return failResponse(utils.Fail), nil + } + } + + return okResponse(nil), nil +} + +func (l *BindMobileLogic) markAnalysisRegistered(userId int64, clientCode string, bizId int64) error { + if bizId < utils.NumberOne { + if err := ensureClientBizUser(l.ctx, l.svcCtx, userId, clientCode); err != nil { + return err + } + loaded, err := loadUserClientBizId(userId, clientCode) + if err != nil { + return err + } + bizId = loaded + } + if bizId < utils.NumberOne { + return status.Error(codes.FailedPrecondition, "业务用户不存在") + } + + cli, err := svc.GetRpcClient(l.svcCtx.AnalysisSvcName) + if err != nil { + return err + } + _, err = analysispb.NewAnalysisClient(cli.Conn()).InternalSetRegistered(l.ctx, &analysispb.InternalSetRegisteredReq{ + Id: bizId, + }) + return err +} diff --git a/services/user/internal/server/userServer.go b/services/user/internal/server/userServer.go index 697fdae..d105481 100644 --- a/services/user/internal/server/userServer.go +++ b/services/user/internal/server/userServer.go @@ -63,6 +63,11 @@ func (s *UserServer) GetOpenid(ctx context.Context, in *user.GetOpenidReq) (*use return l.GetOpenid(in) } +func (s *UserServer) BindMobile(ctx context.Context, in *user.BindMobileReq) (*user.Response, error) { + l := logic.NewBindMobileLogic(ctx, s.svcCtx) + return l.BindMobile(in) +} + func (s *UserServer) Client(ctx context.Context, in *user.ClientReq) (*user.Response, error) { l := logic.NewClientLogic(ctx, s.svcCtx) return l.Client(in) diff --git a/services/user/userClient/user.go b/services/user/userClient/user.go index 2bf1c49..889e7b7 100644 --- a/services/user/userClient/user.go +++ b/services/user/userClient/user.go @@ -14,6 +14,7 @@ import ( ) type ( + BindMobileReq = user.BindMobileReq BizUserItem = user.BizUserItem ClientReq = user.ClientReq GenerateQrcodeReq = user.GenerateQrcodeReq @@ -58,6 +59,7 @@ type ( Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Response, error) Password(ctx context.Context, in *PasswordReq, opts ...grpc.CallOption) (*Response, error) GetOpenid(ctx context.Context, in *GetOpenidReq, opts ...grpc.CallOption) (*Response, error) + BindMobile(ctx context.Context, in *BindMobileReq, opts ...grpc.CallOption) (*Response, error) Client(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*Response, error) UserItems(ctx context.Context, in *UserItemsReq, opts ...grpc.CallOption) (*Response, error) UserStatus(ctx context.Context, in *UserStatusReq, opts ...grpc.CallOption) (*Response, error) @@ -124,6 +126,11 @@ func (m *defaultUser) GetOpenid(ctx context.Context, in *GetOpenidReq, opts ...g return client.GetOpenid(ctx, in, opts...) } +func (m *defaultUser) BindMobile(ctx context.Context, in *BindMobileReq, opts ...grpc.CallOption) (*Response, error) { + client := user.NewUserClient(m.cli.Conn()) + return client.BindMobile(ctx, in, opts...) +} + func (m *defaultUser) Client(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*Response, error) { client := user.NewUserClient(m.cli.Conn()) return client.Client(ctx, in, opts...) diff --git a/services/user/validator/user.go b/services/user/validator/user.go index c0baa02..c4c0421 100644 --- a/services/user/validator/user.go +++ b/services/user/validator/user.go @@ -106,6 +106,17 @@ func (p GetOpenidValidator) GetMessage() validate.ValidatorMessages { } } +type BindMobileValidator struct { + Code string `validate:"required,max=128"` +} + +func (p BindMobileValidator) GetMessage() validate.ValidatorMessages { + return validate.ValidatorMessages{ + "Code.required": "code 不能为空", + "Code.max": "code 过长", + } +} + type UserItemsValidator struct { Mobile string Page int32 `validate:"omitempty,min=1"`