Prechádzať zdrojové kódy

StatisticsSubscribeMessage

wfz 3 rokov pred
rodič
commit
54802eacc2

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


+ 11 - 0
api/account/account.proto

@@ -44,6 +44,13 @@ service Account {
       body:"*"
     };
   };
+  // 统计订阅消息
+  rpc StatisticsSubscribeMessage (StatisticsSubscribeMessageRequest) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/login/subscribe/statistic",
+      body:"*"
+    };
+  };
   rpc RandomAvatarList (common.SexReq) returns (RandomAvatarListReply){};
   // 通过openID和appID查询
   rpc GetIdentityByOpenIDAndAppID (OpenIDAndAppIDRequest) returns (IdentityInfo);
@@ -96,6 +103,10 @@ service Account {
   rpc UserUnsubscribe (OpenIDAndAppIDRequest) returns (google.protobuf.Empty){};
 }
 
+message StatisticsSubscribeMessageRequest{
+  repeated string idList = 1;
+}
+
 message FindIdentifyByAccountIDAndIsSubscribeRequest{
   repeated int64 accountIds = 1;
 }

+ 38 - 0
api/account/account_grpc.pb.go

@@ -26,6 +26,8 @@ type AccountClient interface {
 	RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error)
 	// 获取公众号配置
 	GetGetGzhConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetGetGzhConfigReply, error)
+	// 统计订阅消息
+	StatisticsSubscribeMessage(ctx context.Context, in *StatisticsSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error)
 	// 通过openID和appID查询
 	GetIdentityByOpenIDAndAppID(ctx context.Context, in *OpenIDAndAppIDRequest, opts ...grpc.CallOption) (*IdentityInfo, error)
@@ -116,6 +118,15 @@ func (c *accountClient) GetGetGzhConfig(ctx context.Context, in *emptypb.Empty,
 	return out, nil
 }
 
+func (c *accountClient) StatisticsSubscribeMessage(ctx context.Context, in *StatisticsSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.account.Account/StatisticsSubscribeMessage", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 func (c *accountClient) RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error) {
 	out := new(RandomAvatarListReply)
 	err := c.cc.Invoke(ctx, "/api.account.Account/RandomAvatarList", in, out, opts...)
@@ -288,6 +299,8 @@ type AccountServer interface {
 	RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error)
 	// 获取公众号配置
 	GetGetGzhConfig(context.Context, *emptypb.Empty) (*GetGetGzhConfigReply, error)
+	// 统计订阅消息
+	StatisticsSubscribeMessage(context.Context, *StatisticsSubscribeMessageRequest) (*emptypb.Empty, error)
 	RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error)
 	// 通过openID和appID查询
 	GetIdentityByOpenIDAndAppID(context.Context, *OpenIDAndAppIDRequest) (*IdentityInfo, error)
@@ -345,6 +358,9 @@ func (UnimplementedAccountServer) RandomAvatar(context.Context, *common.SexReq)
 func (UnimplementedAccountServer) GetGetGzhConfig(context.Context, *emptypb.Empty) (*GetGetGzhConfigReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetGetGzhConfig not implemented")
 }
+func (UnimplementedAccountServer) StatisticsSubscribeMessage(context.Context, *StatisticsSubscribeMessageRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method StatisticsSubscribeMessage not implemented")
+}
 func (UnimplementedAccountServer) RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method RandomAvatarList not implemented")
 }
@@ -502,6 +518,24 @@ func _Account_GetGetGzhConfig_Handler(srv interface{}, ctx context.Context, dec
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Account_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.(AccountServer).StatisticsSubscribeMessage(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.account.Account/StatisticsSubscribeMessage",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(AccountServer).StatisticsSubscribeMessage(ctx, req.(*StatisticsSubscribeMessageRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 func _Account_RandomAvatarList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(common.SexReq)
 	if err := dec(in); err != nil {
@@ -853,6 +887,10 @@ var Account_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetGetGzhConfig",
 			Handler:    _Account_GetGetGzhConfig_Handler,
 		},
+		{
+			MethodName: "StatisticsSubscribeMessage",
+			Handler:    _Account_StatisticsSubscribeMessage_Handler,
+		},
 		{
 			MethodName: "RandomAvatarList",
 			Handler:    _Account_RandomAvatarList_Handler,

+ 43 - 0
api/account/account_http.pb.go

@@ -35,6 +35,7 @@ type AccountHTTPServer interface {
 	RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error)
 	RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error)
 	RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error)
+	StatisticsSubscribeMessage(context.Context, *StatisticsSubscribeMessageRequest) (*emptypb.Empty, error)
 	UploadMaterialVoice(context.Context, *MediaID) (*MaterialLink, error)
 }
 
@@ -45,6 +46,7 @@ func RegisterAccountHTTPServer(s *http.Server, srv AccountHTTPServer) {
 	r.POST("/api/common/random/nickname", _Account_RandomNickname0_HTTP_Handler(srv))
 	r.POST("/api/common/random/avatar", _Account_RandomAvatar0_HTTP_Handler(srv))
 	r.POST("/api/login/gzh/conf", _Account_GetGetGzhConfig0_HTTP_Handler(srv))
+	r.POST("/api/login/subscribe/statistic", _Account_StatisticsSubscribeMessage0_HTTP_Handler(srv))
 	r.POST("/api/common/random/introduce", _Account_RandomIntroduce0_HTTP_Handler(srv))
 	r.POST("/api/common/material/upload/voice", _Account_UploadMaterialVoice0_HTTP_Handler(srv))
 	r.POST("/api/login/config", _Account_GetUserLoginConfig0_HTTP_Handler(srv))
@@ -185,6 +187,33 @@ func _Account_GetGetGzhConfig0_HTTP_Handler(srv AccountHTTPServer) func(ctx http
 	}
 }
 
+func _Account_StatisticsSubscribeMessage0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in StatisticsSubscribeMessageRequest
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.account.Account/StatisticsSubscribeMessage")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.StatisticsSubscribeMessage(ctx, req.(*StatisticsSubscribeMessageRequest))
+		})
+		out, err := h(ctx, &in)
+		if err != nil {
+			return err
+		}
+		success := &reply.SuccessReply{
+			Code: 0,
+		}
+		if out != nil {
+			success.Data = out
+		}
+		return ctx.Result(200, success)
+	}
+}
+
 func _Account_RandomIntroduce0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Context) error {
 	return func(ctx http.Context) error {
 		var in common.SexReq
@@ -274,6 +303,7 @@ type AccountHTTPClient interface {
 	RandomAvatar(ctx context.Context, req *common.SexReq, opts ...http.CallOption) (rsp *RandomAvatarReply, err error)
 	RandomIntroduce(ctx context.Context, req *common.SexReq, opts ...http.CallOption) (rsp *common.RandomIntroduceReply, err error)
 	RandomNickname(ctx context.Context, req *common.SexReq, opts ...http.CallOption) (rsp *RandomNicknameReply, err error)
+	StatisticsSubscribeMessage(ctx context.Context, req *StatisticsSubscribeMessageRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UploadMaterialVoice(ctx context.Context, req *MediaID, opts ...http.CallOption) (rsp *MaterialLink, err error)
 }
 
@@ -376,6 +406,19 @@ func (c *AccountHTTPClientImpl) RandomNickname(ctx context.Context, in *common.S
 	return &out, err
 }
 
+func (c *AccountHTTPClientImpl) StatisticsSubscribeMessage(ctx context.Context, in *StatisticsSubscribeMessageRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
+	var out emptypb.Empty
+	pattern := "/api/login/subscribe/statistic"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.account.Account/StatisticsSubscribeMessage"))
+	opts = append(opts, http.PathTemplate(pattern))
+	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return &out, err
+}
+
 func (c *AccountHTTPClientImpl) UploadMaterialVoice(ctx context.Context, in *MediaID, opts ...http.CallOption) (*MaterialLink, error) {
 	var out MaterialLink
 	pattern := "/api/common/material/upload/voice"

+ 6 - 1
js/api/account/account_http_pb.ts

@@ -1,6 +1,6 @@
 // @ts-ignore
 import request from '@/libs/request';
-import {DebugLoginRequest,TokenReply,AuthorizationRequest,RandomNicknameReply,RandomAvatarReply,GetGetGzhConfigReply,RandomAvatarListReply,OpenIDAndAppIDRequest,IdentityInfo,MediaID,MaterialLink,CheckTextRequest,CheckTextReply,GetIdentifyByAccountIDRequest,GetIdentifyByAccountIDReply,FindIdentifyByAccountIDAndIsSubscribeRequest,FindIdentifyByAccountIDAndIsSubscribeReply} from "./account_pb";
+import {DebugLoginRequest,TokenReply,AuthorizationRequest,RandomNicknameReply,RandomAvatarReply,GetGetGzhConfigReply,StatisticsSubscribeMessageRequest,RandomAvatarListReply,OpenIDAndAppIDRequest,IdentityInfo,MediaID,MaterialLink,CheckTextRequest,CheckTextReply,GetIdentifyByAccountIDRequest,GetIdentifyByAccountIDReply,FindIdentifyByAccountIDAndIsSubscribeRequest,FindIdentifyByAccountIDAndIsSubscribeReply} from "./account_pb";
 import {SexReq,TagListReply,Ids,RandomIntroduceReply,MemeRequest,MemeList,FindChatTopicRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex,GetLoginConfigRequest,GetLoginConfigReply} from "../common/common_pb";
 
 const AccountService = {
@@ -25,6 +25,11 @@ const AccountService = {
 	const res = await request.post<{ data: GetGetGzhConfigReply, code: string, message: string }>('/api/login/gzh/conf', req);
     return res.data.data;
   },
+  /**  统计订阅消息 */
+  StatisticsSubscribeMessage: async (req?: StatisticsSubscribeMessageRequest) => {
+	const res = await request.post('/api/login/subscribe/statistic', req);
+    return res.data.data;
+  },
   /**  随机介绍接口 */
   RandomIntroduce: async (req?: SexReq) => {
 	const res = await request.post<{ data: RandomIntroduceReply, code: string, message: string }>('/api/common/random/introduce', req);

+ 3 - 0
js/api/account/account_pb.ts

@@ -1,3 +1,6 @@
+export interface StatisticsSubscribeMessageRequest{
+    idList?:Array<string>;
+}
 export interface FindIdentifyByAccountIDAndIsSubscribeRequest{
     accountIds?:Array<number>;
 }

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