|
|
@@ -150,6 +150,9 @@ type UserClient interface {
|
|
|
UpdateUserIsRegister(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
|
// 创建用户与接待员的关联
|
|
|
CreateUserPartnerRoom(ctx context.Context, in *common.CreateChatRoomParam, opts ...grpc.CallOption) (*chat.RoomReply, error)
|
|
|
+ // 用户发送消息
|
|
|
+ // 发送消息
|
|
|
+ SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
|
// ---manager---
|
|
|
// 管理员查询用户列表
|
|
|
ManagerFindUserList(ctx context.Context, in *common.ManagerFindPersonListRequest, opts ...grpc.CallOption) (*common.ManagerFindPersonListReply, error)
|
|
|
@@ -795,6 +798,15 @@ func (c *userClient) CreateUserPartnerRoom(ctx context.Context, in *common.Creat
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *userClient) SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
|
+ out := new(emptypb.Empty)
|
|
|
+ err := c.cc.Invoke(ctx, "/api.user.User/SendMessage", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
func (c *userClient) ManagerFindUserList(ctx context.Context, in *common.ManagerFindPersonListRequest, opts ...grpc.CallOption) (*common.ManagerFindPersonListReply, error) {
|
|
|
out := new(common.ManagerFindPersonListReply)
|
|
|
err := c.cc.Invoke(ctx, "/api.user.User/ManagerFindUserList", in, out, opts...)
|
|
|
@@ -1224,6 +1236,9 @@ type UserServer interface {
|
|
|
UpdateUserIsRegister(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
|
|
// 创建用户与接待员的关联
|
|
|
CreateUserPartnerRoom(context.Context, *common.CreateChatRoomParam) (*chat.RoomReply, error)
|
|
|
+ // 用户发送消息
|
|
|
+ // 发送消息
|
|
|
+ SendMessage(context.Context, *SendMessageRequest) (*emptypb.Empty, error)
|
|
|
// ---manager---
|
|
|
// 管理员查询用户列表
|
|
|
ManagerFindUserList(context.Context, *common.ManagerFindPersonListRequest) (*common.ManagerFindPersonListReply, error)
|
|
|
@@ -1488,6 +1503,9 @@ func (UnimplementedUserServer) UpdateUserIsRegister(context.Context, *emptypb.Em
|
|
|
func (UnimplementedUserServer) CreateUserPartnerRoom(context.Context, *common.CreateChatRoomParam) (*chat.RoomReply, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateUserPartnerRoom not implemented")
|
|
|
}
|
|
|
+func (UnimplementedUserServer) SendMessage(context.Context, *SendMessageRequest) (*emptypb.Empty, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented")
|
|
|
+}
|
|
|
func (UnimplementedUserServer) ManagerFindUserList(context.Context, *common.ManagerFindPersonListRequest) (*common.ManagerFindPersonListReply, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ManagerFindUserList not implemented")
|
|
|
}
|
|
|
@@ -2734,6 +2752,24 @@ func _User_CreateUserPartnerRoom_Handler(srv interface{}, ctx context.Context, d
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
|
|
|
|
+func _User_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(SendMessageRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(UserServer).SendMessage(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/api.user.User/SendMessage",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(UserServer).SendMessage(ctx, req.(*SendMessageRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
func _User_ManagerFindUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
in := new(common.ManagerFindPersonListRequest)
|
|
|
if err := dec(in); err != nil {
|
|
|
@@ -3587,6 +3623,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "CreateUserPartnerRoom",
|
|
|
Handler: _User_CreateUserPartnerRoom_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "SendMessage",
|
|
|
+ Handler: _User_SendMessage_Handler,
|
|
|
+ },
|
|
|
{
|
|
|
MethodName: "ManagerFindUserList",
|
|
|
Handler: _User_ManagerFindUserList_Handler,
|