Browse Source

五分钟回复

wfz 3 years ago
parent
commit
b60a9dee30

File diff suppressed because it is too large
+ 437 - 260
api/statistics/statistics.pb.go


+ 19 - 0
api/statistics/statistics.proto

@@ -42,6 +42,25 @@ service Statistics {
   rpc GetTodayProfit (common.PartnerIDParam) returns (TodayProfitMsg);
   // 获取我是否喜欢(关注)该用户
   rpc GetIsLike (PersonMessage) returns (common.IsLike);
+  // 用户给接待员发信息统计
+  rpc UserSendToPartner (common.PartnerIDParam) returns (google.protobuf.Empty);
+  // 接待员给用户回复统计
+  rpc PartnerReplyUser (PartnerReplyUserRequest) returns (google.protobuf.Empty);
+  // 获取接待员的统计信息
+  rpc GetPartnerReplyMsg (common.PartnerIDParam) returns (GetPartnerReplyMsgReply);
+}
+
+message GetPartnerReplyMsgReply{
+  double fiveMinuteReplyRate = 1;// 五分钟回复率
+  int64 chatNum = 2;// 聊天数
+  int64 replyNum = 3;// 回复数
+  int64 fiveMinuteReplyNum = 4; // 五分钟回复数
+}
+
+message PartnerReplyUserRequest{
+  string partnerID = 1;
+  int64 userSendTime = 2;// 用户发送时间
+  int64 partnerReplyTime = 3;// 接待员回复时间
 }
 
 message AddTodayProfitRequest{

+ 114 - 0
api/statistics/statistics_grpc.pb.go

@@ -50,6 +50,12 @@ type StatisticsClient interface {
 	GetTodayProfit(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*TodayProfitMsg, error)
 	// 获取我是否喜欢(关注)该用户
 	GetIsLike(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*common.IsLike, error)
+	// 用户给接待员发信息统计
+	UserSendToPartner(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 接待员给用户回复统计
+	PartnerReplyUser(ctx context.Context, in *PartnerReplyUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 获取接待员的统计信息
+	GetPartnerReplyMsg(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*GetPartnerReplyMsgReply, error)
 }
 
 type statisticsClient struct {
@@ -195,6 +201,33 @@ func (c *statisticsClient) GetIsLike(ctx context.Context, in *PersonMessage, opt
 	return out, nil
 }
 
+func (c *statisticsClient) UserSendToPartner(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/UserSendToPartner", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *statisticsClient) PartnerReplyUser(ctx context.Context, in *PartnerReplyUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/PartnerReplyUser", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *statisticsClient) GetPartnerReplyMsg(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*GetPartnerReplyMsgReply, error) {
+	out := new(GetPartnerReplyMsgReply)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/GetPartnerReplyMsg", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // StatisticsServer is the server API for Statistics service.
 // All implementations must embed UnimplementedStatisticsServer
 // for forward compatibility
@@ -229,6 +262,12 @@ type StatisticsServer interface {
 	GetTodayProfit(context.Context, *common.PartnerIDParam) (*TodayProfitMsg, error)
 	// 获取我是否喜欢(关注)该用户
 	GetIsLike(context.Context, *PersonMessage) (*common.IsLike, error)
+	// 用户给接待员发信息统计
+	UserSendToPartner(context.Context, *common.PartnerIDParam) (*emptypb.Empty, error)
+	// 接待员给用户回复统计
+	PartnerReplyUser(context.Context, *PartnerReplyUserRequest) (*emptypb.Empty, error)
+	// 获取接待员的统计信息
+	GetPartnerReplyMsg(context.Context, *common.PartnerIDParam) (*GetPartnerReplyMsgReply, error)
 	mustEmbedUnimplementedStatisticsServer()
 }
 
@@ -281,6 +320,15 @@ func (UnimplementedStatisticsServer) GetTodayProfit(context.Context, *common.Par
 func (UnimplementedStatisticsServer) GetIsLike(context.Context, *PersonMessage) (*common.IsLike, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetIsLike not implemented")
 }
+func (UnimplementedStatisticsServer) UserSendToPartner(context.Context, *common.PartnerIDParam) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserSendToPartner not implemented")
+}
+func (UnimplementedStatisticsServer) PartnerReplyUser(context.Context, *PartnerReplyUserRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method PartnerReplyUser not implemented")
+}
+func (UnimplementedStatisticsServer) GetPartnerReplyMsg(context.Context, *common.PartnerIDParam) (*GetPartnerReplyMsgReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetPartnerReplyMsg not implemented")
+}
 func (UnimplementedStatisticsServer) mustEmbedUnimplementedStatisticsServer() {}
 
 // UnsafeStatisticsServer may be embedded to opt out of forward compatibility for this service.
@@ -564,6 +612,60 @@ func _Statistics_GetIsLike_Handler(srv interface{}, ctx context.Context, dec fun
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Statistics_UserSendToPartner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.PartnerIDParam)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).UserSendToPartner(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/UserSendToPartner",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).UserSendToPartner(ctx, req.(*common.PartnerIDParam))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Statistics_PartnerReplyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PartnerReplyUserRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).PartnerReplyUser(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/PartnerReplyUser",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).PartnerReplyUser(ctx, req.(*PartnerReplyUserRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Statistics_GetPartnerReplyMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.PartnerIDParam)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).GetPartnerReplyMsg(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/GetPartnerReplyMsg",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).GetPartnerReplyMsg(ctx, req.(*common.PartnerIDParam))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Statistics_ServiceDesc is the grpc.ServiceDesc for Statistics service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -631,6 +733,18 @@ var Statistics_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetIsLike",
 			Handler:    _Statistics_GetIsLike_Handler,
 		},
+		{
+			MethodName: "UserSendToPartner",
+			Handler:    _Statistics_UserSendToPartner_Handler,
+		},
+		{
+			MethodName: "PartnerReplyUser",
+			Handler:    _Statistics_PartnerReplyUser_Handler,
+		},
+		{
+			MethodName: "GetPartnerReplyMsg",
+			Handler:    _Statistics_GetPartnerReplyMsg_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "statistics.proto",

+ 17 - 0
js/api/statistics/statistics_pb.ts

@@ -1,3 +1,20 @@
+export interface GetPartnerReplyMsgReply{
+    /**  五分钟回复率 */
+    fiveMinuteReplyRate?:number;
+    /**  聊天数 */
+    chatNum?:number;
+    /**  回复数 */
+    replyNum?:number;
+    /**  五分钟回复数 */
+    fiveMinuteReplyNum?:number;
+}
+export interface PartnerReplyUserRequest{
+    partnerID?:string;
+    /**  用户发送时间 */
+    userSendTime?:number;
+    /**  接待员回复时间 */
+    partnerReplyTime?:number;
+}
 export interface AddTodayProfitRequest{
     /**  接待者的ID */
     personID?:string;

Some files were not shown because too many files changed in this diff