Compare commits
No commits in common. "97711cb3a360a60093a495066c222aafa1348335" and "6bf02405c66bf87b187987dc8fc7ca107eb7cc2c" have entirely different histories.
97711cb3a3
...
6bf02405c6
File diff suppressed because it is too large
Load Diff
@ -61,18 +61,7 @@ service Account {
|
|||||||
rpc GenerateSliderCaptcha(GenerateSliderCaptchaRequest) returns (GenerateSliderCaptchaResponse) {}// 生成滑块验证码图片+位置
|
rpc GenerateSliderCaptcha(GenerateSliderCaptchaRequest) returns (GenerateSliderCaptchaResponse) {}// 生成滑块验证码图片+位置
|
||||||
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置
|
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置
|
||||||
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||||
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message VerifySliderStatusRequest {
|
|
||||||
string nonceStr = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message VerifySliderStatusResponse {
|
|
||||||
string nonceStr = 1;
|
|
||||||
int32 status = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message SendNationMsgRequest {
|
message SendNationMsgRequest {
|
||||||
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||||
string TelNum = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}];
|
string TelNum = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}];
|
||||||
@ -139,8 +128,6 @@ message UserListInfo{
|
|||||||
string notPassRemarks = 15;
|
string notPassRemarks = 15;
|
||||||
string telNum = 16;
|
string telNum = 16;
|
||||||
string telAreaCode = 17;
|
string telAreaCode = 17;
|
||||||
string language = 18;
|
|
||||||
string subscriberNumber = 19;
|
|
||||||
}
|
}
|
||||||
message UserListRequest{
|
message UserListRequest{
|
||||||
string domain = 1;
|
string domain = 1;
|
||||||
@ -168,8 +155,6 @@ message UserInfoResponse{
|
|||||||
string subNum = 12;
|
string subNum = 12;
|
||||||
string notPassRemarks = 13;
|
string notPassRemarks = 13;
|
||||||
string domain = 14;
|
string domain = 14;
|
||||||
string language = 15;
|
|
||||||
string subscriberNumber = 16;
|
|
||||||
}
|
}
|
||||||
message RealNameResponse{
|
message RealNameResponse{
|
||||||
uint64 id = 1;
|
uint64 id = 1;
|
||||||
@ -415,7 +400,6 @@ message SendMsgRequest {
|
|||||||
uint32 mId = 5;
|
uint32 mId = 5;
|
||||||
string scope = 6; //标记模块
|
string scope = 6; //标记模块
|
||||||
string zone = 7; //地区 不同地区切换不同发送帐号
|
string zone = 7; //地区 不同地区切换不同发送帐号
|
||||||
string nonceStr = 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message SendCustomMsgRequest {
|
message SendCustomMsgRequest {
|
||||||
@ -485,8 +469,30 @@ message RemoveResponse {
|
|||||||
|
|
||||||
message UpdateRequest {
|
message UpdateRequest {
|
||||||
uint64 ID = 1 [json_name = "ID"]; //ID
|
uint64 ID = 1 [json_name = "ID"]; //ID
|
||||||
string Domain = 2 [json_name = "domain"];
|
string Domain = 2 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||||
string Language = 3 [json_name = "language"];
|
string NickName = 3 [json_name = "nickName"];
|
||||||
|
string Password = 4 [json_name = "password"]; //密码
|
||||||
|
string Avatar = 5 [json_name = "avatar"]; //头像
|
||||||
|
string Status = 7 [json_name = "status"];
|
||||||
|
string TelNum = 8 [json_name = "telNum"];
|
||||||
|
string EnterDate = 14 [json_name = "enterDate"];
|
||||||
|
Extend Extend = 17 [json_name = "extend"];
|
||||||
|
string Title = 18 [json_name = "title"];
|
||||||
|
string JobNum = 19 [json_name = "jobNum"];
|
||||||
|
string BirthDate = 20 [json_name = "birthDate"];
|
||||||
|
uint64 Sex = 21 [json_name = "sex"];
|
||||||
|
string IdNum = 22 [json_name = "idNum"];
|
||||||
|
string RealName = 23 [json_name = "realName"];
|
||||||
|
string InvitationCode = 24 [json_name = "invitationCode"];
|
||||||
|
string LeftDate = 25 [json_name = "leftDate"];
|
||||||
|
string Remark = 26 [json_name = "remark"];
|
||||||
|
string RecentImg = 27 [json_name = "recentImg"];
|
||||||
|
string ICNum = 28 [json_name = "icNum"];
|
||||||
|
string Train = 29 [json_name = "train"];
|
||||||
|
string Certificate = 30 [json_name = "certificate"];
|
||||||
|
repeated trainVideo TrainVideos = 31 [json_name = "trainVideos"];
|
||||||
|
Operator operator = 32;
|
||||||
|
string SecurityCode = 33 [json_name = "securityCode"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message Operator {
|
message Operator {
|
||||||
@ -576,7 +582,6 @@ message RegistRequest {
|
|||||||
string code = 3;
|
string code = 3;
|
||||||
string address = 4;
|
string address = 4;
|
||||||
string telAreaCode = 5;
|
string telAreaCode = 5;
|
||||||
string language = 6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message LoginRequest {
|
message LoginRequest {
|
||||||
|
@ -17,12 +17,6 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
func (this *VerifySliderStatusRequest) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *VerifySliderStatusResponse) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *SendNationMsgRequest) Validate() error {
|
func (this *SendNationMsgRequest) Validate() error {
|
||||||
if this.Domain == "" {
|
if this.Domain == "" {
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||||
@ -280,6 +274,26 @@ func (this *RemoveResponse) Validate() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *UpdateRequest) Validate() error {
|
func (this *UpdateRequest) Validate() error {
|
||||||
|
if this.Domain == "" {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||||
|
}
|
||||||
|
if this.Extend != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, item := range this.TrainVideos {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("TrainVideos", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if this.Operator != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *Operator) Validate() error {
|
func (this *Operator) Validate() error {
|
||||||
|
@ -67,7 +67,6 @@ type AccountClient interface {
|
|||||||
GenerateSliderCaptcha(ctx context.Context, in *GenerateSliderCaptchaRequest, opts ...grpc_go.CallOption) (*GenerateSliderCaptchaResponse, common.ErrorWithAttachment)
|
GenerateSliderCaptcha(ctx context.Context, in *GenerateSliderCaptchaRequest, opts ...grpc_go.CallOption) (*GenerateSliderCaptchaResponse, common.ErrorWithAttachment)
|
||||||
VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment)
|
VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment)
|
||||||
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||||
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type accountClient struct {
|
type accountClient struct {
|
||||||
@ -113,7 +112,6 @@ type AccountClientImpl struct {
|
|||||||
GenerateSliderCaptcha func(ctx context.Context, in *GenerateSliderCaptchaRequest) (*GenerateSliderCaptchaResponse, error)
|
GenerateSliderCaptcha func(ctx context.Context, in *GenerateSliderCaptchaRequest) (*GenerateSliderCaptchaResponse, error)
|
||||||
VerifySliderCaptcha func(ctx context.Context, in *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
VerifySliderCaptcha func(ctx context.Context, in *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
||||||
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
VerifySliderStatus func(ctx context.Context, in *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *AccountClientImpl) GetDubboStub(cc *triple.TripleConn) AccountClient {
|
func (c *AccountClientImpl) GetDubboStub(cc *triple.TripleConn) AccountClient {
|
||||||
@ -356,12 +354,6 @@ func (c *accountClient) SendNationMsg(ctx context.Context, in *SendNationMsgRequ
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationMsg", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationMsg", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *accountClient) VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment) {
|
|
||||||
out := new(VerifySliderStatusResponse)
|
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/VerifySliderStatus", in, out)
|
|
||||||
}
|
|
||||||
|
|
||||||
// AccountServer is the server API for Account service.
|
// AccountServer is the server API for Account service.
|
||||||
// All implementations must embed UnimplementedAccountServer
|
// All implementations must embed UnimplementedAccountServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -405,7 +397,6 @@ type AccountServer interface {
|
|||||||
GenerateSliderCaptcha(context.Context, *GenerateSliderCaptchaRequest) (*GenerateSliderCaptchaResponse, error)
|
GenerateSliderCaptcha(context.Context, *GenerateSliderCaptchaRequest) (*GenerateSliderCaptchaResponse, error)
|
||||||
VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
||||||
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
|
||||||
mustEmbedUnimplementedAccountServer()
|
mustEmbedUnimplementedAccountServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -528,9 +519,6 @@ func (UnimplementedAccountServer) VerifySliderCaptcha(context.Context, *VerifySl
|
|||||||
func (UnimplementedAccountServer) SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
|
func (UnimplementedAccountServer) SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SendNationMsg not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method SendNationMsg not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedAccountServer) VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method VerifySliderStatus not implemented")
|
|
||||||
}
|
|
||||||
func (s *UnimplementedAccountServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
func (s *UnimplementedAccountServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
s.proxyImpl = impl
|
s.proxyImpl = impl
|
||||||
}
|
}
|
||||||
@ -1661,35 +1649,6 @@ func _Account_SendNationMsg_Handler(srv interface{}, ctx context.Context, dec fu
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Account_VerifySliderStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(VerifySliderStatusRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
|
||||||
args := []interface{}{}
|
|
||||||
args = append(args, in)
|
|
||||||
md, _ := metadata.FromIncomingContext(ctx)
|
|
||||||
invAttachment := make(map[string]interface{}, len(md))
|
|
||||||
for k, v := range md {
|
|
||||||
invAttachment[k] = v
|
|
||||||
}
|
|
||||||
invo := invocation.NewRPCInvocation("VerifySliderStatus", args, invAttachment)
|
|
||||||
if interceptor == nil {
|
|
||||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
|
||||||
return result, result.Error()
|
|
||||||
}
|
|
||||||
info := &grpc_go.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
|
||||||
return result, result.Error()
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Account_ServiceDesc is the grpc_go.ServiceDesc for Account service.
|
// Account_ServiceDesc is the grpc_go.ServiceDesc for Account service.
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
// It's only intended for direct use with grpc_go.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -1849,10 +1808,6 @@ var Account_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "SendNationMsg",
|
MethodName: "SendNationMsg",
|
||||||
Handler: _Account_SendNationMsg_Handler,
|
Handler: _Account_SendNationMsg_Handler,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
MethodName: "VerifySliderStatus",
|
|
||||||
Handler: _Account_VerifySliderStatus_Handler,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "api/account/account.proto",
|
Metadata: "api/account/account.proto",
|
||||||
|
@ -57,7 +57,6 @@ func NewRouter() *gin.Engine {
|
|||||||
{
|
{
|
||||||
acRoute.POST("real-name", account.RealName) //实名
|
acRoute.POST("real-name", account.RealName) //实名
|
||||||
acRoute.POST("info", account.UserInfo) //用户详情
|
acRoute.POST("info", account.UserInfo) //用户详情
|
||||||
acRoute.POST("update", account.UserUpdate) //用户更新
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
acRoute.POST("list", account.UserList) //用户列表
|
acRoute.POST("list", account.UserList) //用户列表
|
||||||
|
@ -58,24 +58,6 @@ func UserInfo(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func UserUpdate(c *gin.Context) {
|
|
||||||
var req account.UpdateRequest
|
|
||||||
user := login.GetUserInfoFromC(c)
|
|
||||||
req.ID = user.ID
|
|
||||||
req.Domain = user.Domain
|
|
||||||
res, err := service.AccountProvider.Update(context.Background(), &account.UpdateRequest{
|
|
||||||
ID: req.ID,
|
|
||||||
Domain: req.Domain,
|
|
||||||
Language: req.Language,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(c, res)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// SendMsg 用户发送验证码
|
// SendMsg 用户发送验证码
|
||||||
func SendMsg(c *gin.Context) {
|
func SendMsg(c *gin.Context) {
|
||||||
var req account.SendMsgRequest
|
var req account.SendMsgRequest
|
||||||
@ -83,12 +65,6 @@ func SendMsg(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, err := service.AccountProvider.VerifySliderStatus(context.Background(), &account.VerifySliderStatusRequest{
|
|
||||||
NonceStr: req.NonceStr,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
}
|
|
||||||
req.Project = "fiee"
|
req.Project = "fiee"
|
||||||
req.TelNum = req.Zone + req.TelNum
|
req.TelNum = req.Zone + req.TelNum
|
||||||
if req.Zone != e.ZoneCn && req.Zone != "" {
|
if req.Zone != e.ZoneCn && req.Zone != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user