Jay преди 2 месеца
родител
ревизия
51565e1300

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

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gogameclient
@@ -256,6 +256,16 @@ type (
 	UserGetResp                                = pb.UserGetResp
 	UserListReq                                = pb.UserListReq
 	UserListResp                               = pb.UserListResp
+	UserServiceAddReq                          = pb.UserServiceAddReq
+	UserServiceAddResp                         = pb.UserServiceAddResp
+	UserServiceDelReq                          = pb.UserServiceDelReq
+	UserServiceGetReq                          = pb.UserServiceGetReq
+	UserServiceGetResp                         = pb.UserServiceGetResp
+	UserServiceListReq                         = pb.UserServiceListReq
+	UserServiceListResp                        = pb.UserServiceListResp
+	UserServiceUpdateReq                       = pb.UserServiceUpdateReq
+	UserServiceUpdateResp                      = pb.UserServiceUpdateResp
+	UserServiceVo                              = pb.UserServiceVo
 	UserTestAddReq                             = pb.UserTestAddReq
 	UserTestAddResp                            = pb.UserTestAddResp
 	UserTestDelReq                             = pb.UserTestDelReq

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

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gopmpclient
@@ -256,6 +256,16 @@ type (
 	UserGetResp                                = pb.UserGetResp
 	UserListReq                                = pb.UserListReq
 	UserListResp                               = pb.UserListResp
+	UserServiceAddReq                          = pb.UserServiceAddReq
+	UserServiceAddResp                         = pb.UserServiceAddResp
+	UserServiceDelReq                          = pb.UserServiceDelReq
+	UserServiceGetReq                          = pb.UserServiceGetReq
+	UserServiceGetResp                         = pb.UserServiceGetResp
+	UserServiceListReq                         = pb.UserServiceListReq
+	UserServiceListResp                        = pb.UserServiceListResp
+	UserServiceUpdateReq                       = pb.UserServiceUpdateReq
+	UserServiceUpdateResp                      = pb.UserServiceUpdateResp
+	UserServiceVo                              = pb.UserServiceVo
 	UserTestAddReq                             = pb.UserTestAddReq
 	UserTestAddResp                            = pb.UserTestAddResp
 	UserTestDelReq                             = pb.UserTestDelReq

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

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package goshortdramaclient
@@ -256,6 +256,16 @@ type (
 	UserGetResp                                = pb.UserGetResp
 	UserListReq                                = pb.UserListReq
 	UserListResp                               = pb.UserListResp
+	UserServiceAddReq                          = pb.UserServiceAddReq
+	UserServiceAddResp                         = pb.UserServiceAddResp
+	UserServiceDelReq                          = pb.UserServiceDelReq
+	UserServiceGetReq                          = pb.UserServiceGetReq
+	UserServiceGetResp                         = pb.UserServiceGetResp
+	UserServiceListReq                         = pb.UserServiceListReq
+	UserServiceListResp                        = pb.UserServiceListResp
+	UserServiceUpdateReq                       = pb.UserServiceUpdateReq
+	UserServiceUpdateResp                      = pb.UserServiceUpdateResp
+	UserServiceVo                              = pb.UserServiceVo
 	UserTestAddReq                             = pb.UserTestAddReq
 	UserTestAddResp                            = pb.UserTestAddResp
 	UserTestDelReq                             = pb.UserTestDelReq

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

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gosysclient
@@ -256,6 +256,16 @@ type (
 	UserGetResp                                = pb.UserGetResp
 	UserListReq                                = pb.UserListReq
 	UserListResp                               = pb.UserListResp
+	UserServiceAddReq                          = pb.UserServiceAddReq
+	UserServiceAddResp                         = pb.UserServiceAddResp
+	UserServiceDelReq                          = pb.UserServiceDelReq
+	UserServiceGetReq                          = pb.UserServiceGetReq
+	UserServiceGetResp                         = pb.UserServiceGetResp
+	UserServiceListReq                         = pb.UserServiceListReq
+	UserServiceListResp                        = pb.UserServiceListResp
+	UserServiceUpdateReq                       = pb.UserServiceUpdateReq
+	UserServiceUpdateResp                      = pb.UserServiceUpdateResp
+	UserServiceVo                              = pb.UserServiceVo
 	UserTestAddReq                             = pb.UserTestAddReq
 	UserTestAddResp                            = pb.UserTestAddResp
 	UserTestDelReq                             = pb.UserTestDelReq

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

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package gouserclient
@@ -256,6 +256,16 @@ type (
 	UserGetResp                                = pb.UserGetResp
 	UserListReq                                = pb.UserListReq
 	UserListResp                               = pb.UserListResp
+	UserServiceAddReq                          = pb.UserServiceAddReq
+	UserServiceAddResp                         = pb.UserServiceAddResp
+	UserServiceDelReq                          = pb.UserServiceDelReq
+	UserServiceGetReq                          = pb.UserServiceGetReq
+	UserServiceGetResp                         = pb.UserServiceGetResp
+	UserServiceListReq                         = pb.UserServiceListReq
+	UserServiceListResp                        = pb.UserServiceListResp
+	UserServiceUpdateReq                       = pb.UserServiceUpdateReq
+	UserServiceUpdateResp                      = pb.UserServiceUpdateResp
+	UserServiceVo                              = pb.UserServiceVo
 	UserTestAddReq                             = pb.UserTestAddReq
 	UserTestAddResp                            = pb.UserTestAddResp
 	UserTestDelReq                             = pb.UserTestDelReq
@@ -485,6 +495,12 @@ type (
 		UserDeviceDel(ctx context.Context, in *UserDeviceDelReq, opts ...grpc.CallOption) (*Empty, error)
 		UserDeviceGet(ctx context.Context, in *UserDeviceGetReq, opts ...grpc.CallOption) (*UserDeviceGetResp, error)
 		UserDeviceList(ctx context.Context, in *UserDeviceListReq, opts ...grpc.CallOption) (*UserDeviceListResp, error)
+		// UserService
+		UserServiceAdd(ctx context.Context, in *UserServiceAddReq, opts ...grpc.CallOption) (*UserServiceAddResp, error)
+		UserServiceUpdate(ctx context.Context, in *UserServiceUpdateReq, opts ...grpc.CallOption) (*UserServiceUpdateResp, error)
+		UserServiceDel(ctx context.Context, in *UserServiceDelReq, opts ...grpc.CallOption) (*Empty, error)
+		UserServiceGet(ctx context.Context, in *UserServiceGetReq, opts ...grpc.CallOption) (*UserServiceGetResp, error)
+		UserServiceList(ctx context.Context, in *UserServiceListReq, opts ...grpc.CallOption) (*UserServiceListResp, error)
 	}
 
 	defaultGoUserClient struct {
@@ -736,3 +752,29 @@ func (m *defaultGoUserClient) UserDeviceList(ctx context.Context, in *UserDevice
 	client := pb.NewGoUserClientClient(m.cli.Conn())
 	return client.UserDeviceList(ctx, in, opts...)
 }
+
+// UserService
+func (m *defaultGoUserClient) UserServiceAdd(ctx context.Context, in *UserServiceAddReq, opts ...grpc.CallOption) (*UserServiceAddResp, error) {
+	client := pb.NewGoUserClientClient(m.cli.Conn())
+	return client.UserServiceAdd(ctx, in, opts...)
+}
+
+func (m *defaultGoUserClient) UserServiceUpdate(ctx context.Context, in *UserServiceUpdateReq, opts ...grpc.CallOption) (*UserServiceUpdateResp, error) {
+	client := pb.NewGoUserClientClient(m.cli.Conn())
+	return client.UserServiceUpdate(ctx, in, opts...)
+}
+
+func (m *defaultGoUserClient) UserServiceDel(ctx context.Context, in *UserServiceDelReq, opts ...grpc.CallOption) (*Empty, error) {
+	client := pb.NewGoUserClientClient(m.cli.Conn())
+	return client.UserServiceDel(ctx, in, opts...)
+}
+
+func (m *defaultGoUserClient) UserServiceGet(ctx context.Context, in *UserServiceGetReq, opts ...grpc.CallOption) (*UserServiceGetResp, error) {
+	client := pb.NewGoUserClientClient(m.cli.Conn())
+	return client.UserServiceGet(ctx, in, opts...)
+}
+
+func (m *defaultGoUserClient) UserServiceList(ctx context.Context, in *UserServiceListReq, opts ...grpc.CallOption) (*UserServiceListResp, error) {
+	client := pb.NewGoUserClientClient(m.cli.Conn())
+	return client.UserServiceList(ctx, in, opts...)
+}

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

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.9.2
+// goctl 1.8.5
 // Source: gorpc.proto
 
 package govpnclient
@@ -256,6 +256,16 @@ type (
 	UserGetResp                                = pb.UserGetResp
 	UserListReq                                = pb.UserListReq
 	UserListResp                               = pb.UserListResp
+	UserServiceAddReq                          = pb.UserServiceAddReq
+	UserServiceAddResp                         = pb.UserServiceAddResp
+	UserServiceDelReq                          = pb.UserServiceDelReq
+	UserServiceGetReq                          = pb.UserServiceGetReq
+	UserServiceGetResp                         = pb.UserServiceGetResp
+	UserServiceListReq                         = pb.UserServiceListReq
+	UserServiceListResp                        = pb.UserServiceListResp
+	UserServiceUpdateReq                       = pb.UserServiceUpdateReq
+	UserServiceUpdateResp                      = pb.UserServiceUpdateResp
+	UserServiceVo                              = pb.UserServiceVo
 	UserTestAddReq                             = pb.UserTestAddReq
 	UserTestAddResp                            = pb.UserTestAddResp
 	UserTestDelReq                             = pb.UserTestDelReq

+ 52 - 0
pb/gorpc.proto

@@ -2113,6 +2113,51 @@ message UserTestUpdateReq { UserTestVo vo = 1; }
 message UserTestUpdateResp { UserTestVo vo = 1; }
 message UserTestDelReq { repeated int64 ids = 1; }
 
+// 用户服务订阅权益表
+message  UserServiceVo {
+  int64 id = 1;                 // 主键ID
+  string userUuid = 2;          // 用户UUID
+  string productCode = 3;       // 产品ID
+  int64 ownerId = 4;            // 服务所有者ID
+  int64 servicePlanId = 5;      // 服务计划ID
+  int64 serviceTypeId = 6;      // 服务类型ID
+  int64 licenseDays = 7;        // 授权天数
+  int64 licenseMinutes = 8;     // 授权分钟数
+  int64 userLevel = 9;         // 用户等级
+  int64 deviceLimit = 10;       // 设备数量限制
+  int64 speedLimit = 11;        // 速度限制
+  int64 trafficLimit = 12;      // 流量限制
+  int64 state = 13;             // 状态
+  Status status = 14;           // 状态
+  int64 createTime = 15;        // 创建时间
+  int64 updateTime = 16;        // 更新时间
+}
+
+message UserServiceAddReq { UserServiceVo vo = 1; }
+message UserServiceAddResp { UserServiceVo vo = 1; }
+
+message UserServiceUpdateReq { UserServiceVo vo = 1; }
+message UserServiceUpdateResp { UserServiceVo vo = 1; }
+
+message UserServiceDelReq { repeated int64 ids = 1; }
+
+message UserServiceGetReq { UserServiceVo vo = 1; }
+message UserServiceGetResp { UserServiceVo vo = 1; }
+
+message UserServiceListReq {
+  Page page = 1;
+  UserServiceVo vo = 2;
+  repeated int64 excludeIds = 3; // 排除的ID
+  repeated int64 userIds = 4;    // 用户ID
+  repeated int64 dids = 5;       // device 表的 id
+}
+message UserServiceListResp {
+  int64 total = 1;
+  repeated UserServiceVo list = 2;
+}
+
+
+
 message DeviceVo {
   int64 id = 1;
   string userUuid = 2;
@@ -2367,6 +2412,13 @@ service GoUserClient {
   rpc UserDeviceDel(UserDeviceDelReq) returns (Empty);
   rpc UserDeviceGet(UserDeviceGetReq) returns (UserDeviceGetResp);
   rpc UserDeviceList(UserDeviceListReq) returns (UserDeviceListResp);
+
+  //UserService
+  rpc UserServiceAdd(UserServiceAddReq) returns (UserServiceAddResp);
+  rpc UserServiceUpdate(UserServiceUpdateReq) returns (UserServiceUpdateResp);
+  rpc UserServiceDel(UserServiceDelReq) returns (Empty);
+  rpc UserServiceGet(UserServiceGetReq) returns (UserServiceGetResp);
+  rpc UserServiceList(UserServiceListReq) returns (UserServiceListResp);
 }
 
 

Файловите разлики са ограничени, защото са твърде много
+ 645 - 44
pb/pb/gorpc.pb.go


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

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.5.1
-// - protoc             v6.33.0
+// - protoc             v3.19.4
 // source: gorpc.proto
 
 package pb
@@ -9083,6 +9083,11 @@ const (
 	GoUserClient_UserDeviceDel_FullMethodName        = "/gorpc.GoUserClient/UserDeviceDel"
 	GoUserClient_UserDeviceGet_FullMethodName        = "/gorpc.GoUserClient/UserDeviceGet"
 	GoUserClient_UserDeviceList_FullMethodName       = "/gorpc.GoUserClient/UserDeviceList"
+	GoUserClient_UserServiceAdd_FullMethodName       = "/gorpc.GoUserClient/UserServiceAdd"
+	GoUserClient_UserServiceUpdate_FullMethodName    = "/gorpc.GoUserClient/UserServiceUpdate"
+	GoUserClient_UserServiceDel_FullMethodName       = "/gorpc.GoUserClient/UserServiceDel"
+	GoUserClient_UserServiceGet_FullMethodName       = "/gorpc.GoUserClient/UserServiceGet"
+	GoUserClient_UserServiceList_FullMethodName      = "/gorpc.GoUserClient/UserServiceList"
 )
 
 // GoUserClientClient is the client API for GoUserClient service.
@@ -9152,6 +9157,12 @@ type GoUserClientClient interface {
 	UserDeviceDel(ctx context.Context, in *UserDeviceDelReq, opts ...grpc.CallOption) (*Empty, error)
 	UserDeviceGet(ctx context.Context, in *UserDeviceGetReq, opts ...grpc.CallOption) (*UserDeviceGetResp, error)
 	UserDeviceList(ctx context.Context, in *UserDeviceListReq, opts ...grpc.CallOption) (*UserDeviceListResp, error)
+	// UserService
+	UserServiceAdd(ctx context.Context, in *UserServiceAddReq, opts ...grpc.CallOption) (*UserServiceAddResp, error)
+	UserServiceUpdate(ctx context.Context, in *UserServiceUpdateReq, opts ...grpc.CallOption) (*UserServiceUpdateResp, error)
+	UserServiceDel(ctx context.Context, in *UserServiceDelReq, opts ...grpc.CallOption) (*Empty, error)
+	UserServiceGet(ctx context.Context, in *UserServiceGetReq, opts ...grpc.CallOption) (*UserServiceGetResp, error)
+	UserServiceList(ctx context.Context, in *UserServiceListReq, opts ...grpc.CallOption) (*UserServiceListResp, error)
 }
 
 type goUserClientClient struct {
@@ -9622,6 +9633,56 @@ func (c *goUserClientClient) UserDeviceList(ctx context.Context, in *UserDeviceL
 	return out, nil
 }
 
+func (c *goUserClientClient) UserServiceAdd(ctx context.Context, in *UserServiceAddReq, opts ...grpc.CallOption) (*UserServiceAddResp, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(UserServiceAddResp)
+	err := c.cc.Invoke(ctx, GoUserClient_UserServiceAdd_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *goUserClientClient) UserServiceUpdate(ctx context.Context, in *UserServiceUpdateReq, opts ...grpc.CallOption) (*UserServiceUpdateResp, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(UserServiceUpdateResp)
+	err := c.cc.Invoke(ctx, GoUserClient_UserServiceUpdate_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *goUserClientClient) UserServiceDel(ctx context.Context, in *UserServiceDelReq, opts ...grpc.CallOption) (*Empty, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(Empty)
+	err := c.cc.Invoke(ctx, GoUserClient_UserServiceDel_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *goUserClientClient) UserServiceGet(ctx context.Context, in *UserServiceGetReq, opts ...grpc.CallOption) (*UserServiceGetResp, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(UserServiceGetResp)
+	err := c.cc.Invoke(ctx, GoUserClient_UserServiceGet_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *goUserClientClient) UserServiceList(ctx context.Context, in *UserServiceListReq, opts ...grpc.CallOption) (*UserServiceListResp, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(UserServiceListResp)
+	err := c.cc.Invoke(ctx, GoUserClient_UserServiceList_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // GoUserClientServer is the server API for GoUserClient service.
 // All implementations must embed UnimplementedGoUserClientServer
 // for forward compatibility.
@@ -9689,6 +9750,12 @@ type GoUserClientServer interface {
 	UserDeviceDel(context.Context, *UserDeviceDelReq) (*Empty, error)
 	UserDeviceGet(context.Context, *UserDeviceGetReq) (*UserDeviceGetResp, error)
 	UserDeviceList(context.Context, *UserDeviceListReq) (*UserDeviceListResp, error)
+	// UserService
+	UserServiceAdd(context.Context, *UserServiceAddReq) (*UserServiceAddResp, error)
+	UserServiceUpdate(context.Context, *UserServiceUpdateReq) (*UserServiceUpdateResp, error)
+	UserServiceDel(context.Context, *UserServiceDelReq) (*Empty, error)
+	UserServiceGet(context.Context, *UserServiceGetReq) (*UserServiceGetResp, error)
+	UserServiceList(context.Context, *UserServiceListReq) (*UserServiceListResp, error)
 	mustEmbedUnimplementedGoUserClientServer()
 }
 
@@ -9837,6 +9904,21 @@ func (UnimplementedGoUserClientServer) UserDeviceGet(context.Context, *UserDevic
 func (UnimplementedGoUserClientServer) UserDeviceList(context.Context, *UserDeviceListReq) (*UserDeviceListResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UserDeviceList not implemented")
 }
+func (UnimplementedGoUserClientServer) UserServiceAdd(context.Context, *UserServiceAddReq) (*UserServiceAddResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserServiceAdd not implemented")
+}
+func (UnimplementedGoUserClientServer) UserServiceUpdate(context.Context, *UserServiceUpdateReq) (*UserServiceUpdateResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserServiceUpdate not implemented")
+}
+func (UnimplementedGoUserClientServer) UserServiceDel(context.Context, *UserServiceDelReq) (*Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserServiceDel not implemented")
+}
+func (UnimplementedGoUserClientServer) UserServiceGet(context.Context, *UserServiceGetReq) (*UserServiceGetResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserServiceGet not implemented")
+}
+func (UnimplementedGoUserClientServer) UserServiceList(context.Context, *UserServiceListReq) (*UserServiceListResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserServiceList not implemented")
+}
 func (UnimplementedGoUserClientServer) mustEmbedUnimplementedGoUserClientServer() {}
 func (UnimplementedGoUserClientServer) testEmbeddedByValue()                      {}
 
@@ -10686,6 +10768,96 @@ func _GoUserClient_UserDeviceList_Handler(srv interface{}, ctx context.Context,
 	return interceptor(ctx, in, info, handler)
 }
 
+func _GoUserClient_UserServiceAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserServiceAddReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(GoUserClientServer).UserServiceAdd(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: GoUserClient_UserServiceAdd_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(GoUserClientServer).UserServiceAdd(ctx, req.(*UserServiceAddReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _GoUserClient_UserServiceUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserServiceUpdateReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(GoUserClientServer).UserServiceUpdate(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: GoUserClient_UserServiceUpdate_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(GoUserClientServer).UserServiceUpdate(ctx, req.(*UserServiceUpdateReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _GoUserClient_UserServiceDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserServiceDelReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(GoUserClientServer).UserServiceDel(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: GoUserClient_UserServiceDel_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(GoUserClientServer).UserServiceDel(ctx, req.(*UserServiceDelReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _GoUserClient_UserServiceGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserServiceGetReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(GoUserClientServer).UserServiceGet(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: GoUserClient_UserServiceGet_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(GoUserClientServer).UserServiceGet(ctx, req.(*UserServiceGetReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _GoUserClient_UserServiceList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserServiceListReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(GoUserClientServer).UserServiceList(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: GoUserClient_UserServiceList_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(GoUserClientServer).UserServiceList(ctx, req.(*UserServiceListReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // GoUserClient_ServiceDesc is the grpc.ServiceDesc for GoUserClient service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -10877,6 +11049,26 @@ var GoUserClient_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "UserDeviceList",
 			Handler:    _GoUserClient_UserDeviceList_Handler,
 		},
+		{
+			MethodName: "UserServiceAdd",
+			Handler:    _GoUserClient_UserServiceAdd_Handler,
+		},
+		{
+			MethodName: "UserServiceUpdate",
+			Handler:    _GoUserClient_UserServiceUpdate_Handler,
+		},
+		{
+			MethodName: "UserServiceDel",
+			Handler:    _GoUserClient_UserServiceDel_Handler,
+		},
+		{
+			MethodName: "UserServiceGet",
+			Handler:    _GoUserClient_UserServiceGet_Handler,
+		},
+		{
+			MethodName: "UserServiceList",
+			Handler:    _GoUserClient_UserServiceList_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "gorpc.proto",

+ 52 - 0
pb/user.proto

@@ -143,6 +143,51 @@ message UserTestUpdateReq { UserTestVo vo = 1; }
 message UserTestUpdateResp { UserTestVo vo = 1; }
 message UserTestDelReq { repeated int64 ids = 1; }
 
+// 用户服务订阅权益表
+message  UserServiceVo {
+  int64 id = 1;                 // 主键ID
+  string userUuid = 2;          // 用户UUID
+  string productCode = 3;       // 产品ID
+  int64 ownerId = 4;            // 服务所有者ID
+  int64 servicePlanId = 5;      // 服务计划ID
+  int64 serviceTypeId = 6;      // 服务类型ID
+  int64 licenseDays = 7;        // 授权天数
+  int64 licenseMinutes = 8;     // 授权分钟数
+  int64 userLevel = 9;         // 用户等级
+  int64 deviceLimit = 10;       // 设备数量限制
+  int64 speedLimit = 11;        // 速度限制
+  int64 trafficLimit = 12;      // 流量限制
+  int64 state = 13;             // 状态
+  Status status = 14;           // 状态
+  int64 createTime = 15;        // 创建时间
+  int64 updateTime = 16;        // 更新时间
+}
+
+message UserServiceAddReq { UserServiceVo vo = 1; }
+message UserServiceAddResp { UserServiceVo vo = 1; }
+
+message UserServiceUpdateReq { UserServiceVo vo = 1; }
+message UserServiceUpdateResp { UserServiceVo vo = 1; }
+
+message UserServiceDelReq { repeated int64 ids = 1; }
+
+message UserServiceGetReq { UserServiceVo vo = 1; }
+message UserServiceGetResp { UserServiceVo vo = 1; }
+
+message UserServiceListReq {
+  Page page = 1;
+  UserServiceVo vo = 2;
+  repeated int64 excludeIds = 3; // 排除的ID
+  repeated int64 userIds = 4;    // 用户ID
+  repeated int64 dids = 5;       // device 表的 id
+}
+message UserServiceListResp {
+  int64 total = 1;
+  repeated UserServiceVo list = 2;
+}
+
+
+
 message DeviceVo {
   int64 id = 1;
   string userUuid = 2;
@@ -397,4 +442,11 @@ service GoUserClient {
   rpc UserDeviceDel(UserDeviceDelReq) returns (Empty);
   rpc UserDeviceGet(UserDeviceGetReq) returns (UserDeviceGetResp);
   rpc UserDeviceList(UserDeviceListReq) returns (UserDeviceListResp);
+
+  //UserService
+  rpc UserServiceAdd(UserServiceAddReq) returns (UserServiceAddResp);
+  rpc UserServiceUpdate(UserServiceUpdateReq) returns (UserServiceUpdateResp);
+  rpc UserServiceDel(UserServiceDelReq) returns (Empty);
+  rpc UserServiceGet(UserServiceGetReq) returns (UserServiceGetResp);
+  rpc UserServiceList(UserServiceListReq) returns (UserServiceListResp);
 }

Някои файлове не бяха показани, защото твърде много файлове са промени