1、新增自定义用户私人价格2、优化api服务鉴权缓存3、新增管理员端对公充值

This commit is contained in:
2024-10-21 16:01:20 +08:00
parent 8896fd6b30
commit 2292d25d74
37 changed files with 1903 additions and 907 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -376,6 +376,7 @@ const (
User_UserInfo_FullMethodName = "/User/UserInfo"
User_GetUserInfo_FullMethodName = "/User/GetUserInfo"
User_GetEnterpriseAuthStatus_FullMethodName = "/User/GetEnterpriseAuthStatus"
User_GetUserList_FullMethodName = "/User/GetUserList"
)
// UserClient is the client API for User service.
@@ -386,6 +387,7 @@ type UserClient interface {
UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error)
GetUserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
GetEnterpriseAuthStatus(ctx context.Context, in *GetEnterpriseAuthStatusReq, opts ...grpc.CallOption) (*GetEnterpriseAuthStatusResp, error)
GetUserList(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserListResponse, error)
}
type userClient struct {
@@ -426,6 +428,16 @@ func (c *userClient) GetEnterpriseAuthStatus(ctx context.Context, in *GetEnterpr
return out, nil
}
func (c *userClient) GetUserList(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserListResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UserListResponse)
err := c.cc.Invoke(ctx, User_GetUserList_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServer is the server API for User service.
// All implementations must embed UnimplementedUserServer
// for forward compatibility
@@ -434,6 +446,7 @@ type UserServer interface {
UserInfo(context.Context, *UserInfoReq) (*UserInfoResp, error)
GetUserInfo(context.Context, *UserInfoReq) (*GetUserInfoResp, error)
GetEnterpriseAuthStatus(context.Context, *GetEnterpriseAuthStatusReq) (*GetEnterpriseAuthStatusResp, error)
GetUserList(context.Context, *UserListRequest) (*UserListResponse, error)
mustEmbedUnimplementedUserServer()
}
@@ -450,6 +463,9 @@ func (UnimplementedUserServer) GetUserInfo(context.Context, *UserInfoReq) (*GetU
func (UnimplementedUserServer) GetEnterpriseAuthStatus(context.Context, *GetEnterpriseAuthStatusReq) (*GetEnterpriseAuthStatusResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetEnterpriseAuthStatus not implemented")
}
func (UnimplementedUserServer) GetUserList(context.Context, *UserListRequest) (*UserListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserList not implemented")
}
func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
// UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
@@ -517,6 +533,24 @@ func _User_GetEnterpriseAuthStatus_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _User_GetUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UserListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServer).GetUserList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: User_GetUserList_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServer).GetUserList(ctx, req.(*UserListRequest))
}
return interceptor(ctx, in, info, handler)
}
// User_ServiceDesc is the grpc.ServiceDesc for User service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -536,6 +570,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetEnterpriseAuthStatus",
Handler: _User_GetEnterpriseAuthStatus_Handler,
},
{
MethodName: "GetUserList",
Handler: _User_GetUserList_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user.proto",