wfz 3 rokov pred
rodič
commit
0850a38a4b

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 408 - 265
api/statistics/statistics.pb.go


+ 21 - 1
api/statistics/statistics.proto

@@ -2,7 +2,7 @@ syntax = "proto3";
 
 package api.statistics;
 
-//import "google/api/annotations.proto";
+import "google/api/annotations.proto";
 //import "google/protobuf/struct.proto";
 import "google/protobuf/empty.proto";
 import "api/common/common.proto";
@@ -34,6 +34,26 @@ service Statistics {
   rpc FindLikedList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
   // 获取我是否喜欢(关注)该用户
   rpc GetIsLike (PersonMessage) returns (common.IsLike);
+  // 统计订阅消息
+  rpc StatisticsSubscribeMessage (StatisticsSubscribeMessageRequest) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/common/subscribe/statistic",
+      body:"*"
+    };
+  };
+  // 减少订阅消息
+  rpc ReduceSubscribeMessage (ReduceSubscribeMessageRequest) returns (google.protobuf.Empty){};
+  // 获取订阅了签到的人
+  rpc GetSignUser (google.protobuf.Empty) returns (common.PersonIDList){};
+}
+
+message ReduceSubscribeMessageRequest{
+  string subscribeId = 1;
+  string userId = 2;
+}
+
+message StatisticsSubscribeMessageRequest{
+  repeated string idList = 1;
 }
 
 message GetPartnerReplyMsgReply{

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

@@ -42,6 +42,12 @@ type StatisticsClient interface {
 	FindLikedList(ctx context.Context, in *GetLookAndLikeListRequest, opts ...grpc.CallOption) (*LookAndLikeListReply, error)
 	// 获取我是否喜欢(关注)该用户
 	GetIsLike(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*common.IsLike, error)
+	// 统计订阅消息
+	StatisticsSubscribeMessage(ctx context.Context, in *StatisticsSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 减少订阅消息
+	ReduceSubscribeMessage(ctx context.Context, in *ReduceSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 获取订阅了签到的人
+	GetSignUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.PersonIDList, error)
 }
 
 type statisticsClient struct {
@@ -151,6 +157,33 @@ func (c *statisticsClient) GetIsLike(ctx context.Context, in *PersonMessage, opt
 	return out, nil
 }
 
+func (c *statisticsClient) StatisticsSubscribeMessage(ctx context.Context, in *StatisticsSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/StatisticsSubscribeMessage", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *statisticsClient) ReduceSubscribeMessage(ctx context.Context, in *ReduceSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/ReduceSubscribeMessage", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *statisticsClient) GetSignUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.PersonIDList, error) {
+	out := new(common.PersonIDList)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/GetSignUser", 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
@@ -177,6 +210,12 @@ type StatisticsServer interface {
 	FindLikedList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error)
 	// 获取我是否喜欢(关注)该用户
 	GetIsLike(context.Context, *PersonMessage) (*common.IsLike, error)
+	// 统计订阅消息
+	StatisticsSubscribeMessage(context.Context, *StatisticsSubscribeMessageRequest) (*emptypb.Empty, error)
+	// 减少订阅消息
+	ReduceSubscribeMessage(context.Context, *ReduceSubscribeMessageRequest) (*emptypb.Empty, error)
+	// 获取订阅了签到的人
+	GetSignUser(context.Context, *emptypb.Empty) (*common.PersonIDList, error)
 	mustEmbedUnimplementedStatisticsServer()
 }
 
@@ -217,6 +256,15 @@ func (UnimplementedStatisticsServer) FindLikedList(context.Context, *GetLookAndL
 func (UnimplementedStatisticsServer) GetIsLike(context.Context, *PersonMessage) (*common.IsLike, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetIsLike not implemented")
 }
+func (UnimplementedStatisticsServer) StatisticsSubscribeMessage(context.Context, *StatisticsSubscribeMessageRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method StatisticsSubscribeMessage not implemented")
+}
+func (UnimplementedStatisticsServer) ReduceSubscribeMessage(context.Context, *ReduceSubscribeMessageRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ReduceSubscribeMessage not implemented")
+}
+func (UnimplementedStatisticsServer) GetSignUser(context.Context, *emptypb.Empty) (*common.PersonIDList, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetSignUser not implemented")
+}
 func (UnimplementedStatisticsServer) mustEmbedUnimplementedStatisticsServer() {}
 
 // UnsafeStatisticsServer may be embedded to opt out of forward compatibility for this service.
@@ -428,6 +476,60 @@ func _Statistics_GetIsLike_Handler(srv interface{}, ctx context.Context, dec fun
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Statistics_StatisticsSubscribeMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(StatisticsSubscribeMessageRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).StatisticsSubscribeMessage(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/StatisticsSubscribeMessage",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).StatisticsSubscribeMessage(ctx, req.(*StatisticsSubscribeMessageRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Statistics_ReduceSubscribeMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ReduceSubscribeMessageRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).ReduceSubscribeMessage(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/ReduceSubscribeMessage",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).ReduceSubscribeMessage(ctx, req.(*ReduceSubscribeMessageRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Statistics_GetSignUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(emptypb.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).GetSignUser(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/GetSignUser",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).GetSignUser(ctx, req.(*emptypb.Empty))
+	}
+	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)
@@ -479,6 +581,18 @@ var Statistics_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetIsLike",
 			Handler:    _Statistics_GetIsLike_Handler,
 		},
+		{
+			MethodName: "StatisticsSubscribeMessage",
+			Handler:    _Statistics_StatisticsSubscribeMessage_Handler,
+		},
+		{
+			MethodName: "ReduceSubscribeMessage",
+			Handler:    _Statistics_ReduceSubscribeMessage_Handler,
+		},
+		{
+			MethodName: "GetSignUser",
+			Handler:    _Statistics_GetSignUser_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "statistics.proto",

+ 0 - 13
client/account.go

@@ -3,7 +3,6 @@ package client
 import (
 	"git.ikuban.com/server/kratos-nacos/registry"
 	"git.ikuban.com/server/pw-protobuf/api/account"
-	"git.ikuban.com/server/pw-protobuf/api/statistics"
 	"github.com/go-kratos/kratos/v2/log"
 )
 
@@ -18,15 +17,3 @@ func NewAccountClient(r *registry.Registry, logger log.Logger) account.AccountCl
 	client := account.NewAccountClient(conn)
 	return client
 }
-
-func NewStatisticsClient(r *registry.Registry, logger log.Logger) statistics.StatisticsClient {
-	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-account")
-	if err != nil {
-		panic(err)
-	}
-	if conn == nil {
-		return nil
-	}
-	client := statistics.NewStatisticsClient(conn)
-	return client
-}

+ 32 - 0
client/base.go

@@ -0,0 +1,32 @@
+package client
+
+import (
+	"git.ikuban.com/server/kratos-nacos/registry"
+	"git.ikuban.com/server/pw-protobuf/api/base"
+	"git.ikuban.com/server/pw-protobuf/api/statistics"
+	"github.com/go-kratos/kratos/v2/log"
+)
+
+func NewStatisticsClient(r *registry.Registry, logger log.Logger) statistics.StatisticsClient {
+	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-statistics")
+	if err != nil {
+		panic(err)
+	}
+	if conn == nil {
+		return nil
+	}
+	client := statistics.NewStatisticsClient(conn)
+	return client
+}
+
+func NewBaseClient(r *registry.Registry, logger log.Logger) base.BaseClient {
+	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-base")
+	if err != nil {
+		panic(err)
+	}
+	if conn == nil {
+		return nil
+	}
+	client := base.NewBaseClient(conn)
+	return client
+}

+ 19 - 10
js/api/base/base_pb.ts

@@ -1,15 +1,24 @@
-export interface UserAndPartnerIdParam{
-    partnerId?:string;
-    userId?:string;
+export interface CheckTextRequest{
+    /**  待审核的文本 */
+    text?:string;
 }
-export interface User1AndUser2IdParam{
-    user1?:string;
-    user2?:string;
+export interface CheckTextReply{
+    /**  是否通过 */
+    isPass?:boolean;
 }
-export interface PartnerIDParam{
-    partnerID?:string;
+export interface MediaID{
+    mediaId?:string;
 }
-export interface UserIDParam{
-    userId?:string;
+export interface MaterialLink{
+    link?:string;
+}
+export interface RandomNicknameReply{
+    nickname?:string;
+}
+export interface RandomAvatarReply{
+    avatarUrl?:string;
+}
+export interface RandomAvatarListReply{
+    list?:Array<string>;
 }
 

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

@@ -1,3 +1,10 @@
+export interface ReduceSubscribeMessageRequest{
+    subscribeId?:string;
+    userId?:string;
+}
+export interface StatisticsSubscribeMessageRequest{
+    idList?:Array<string>;
+}
 export interface GetPartnerReplyMsgReply{
     /**  五分钟回复率 */
     fiveMinuteReplyRate?:number;

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov