wfz 2 жил өмнө
parent
commit
ae51d23186
3 өөрчлөгдсөн 62 нэмэгдсэн , 16 устгасан
  1. 22 16
      api/wx/wx.pb.go
  2. 2 0
      api/wx/wx.proto
  3. 38 0
      api/wx/wx_grpc.pb.go

+ 22 - 16
api/wx/wx.pb.go

@@ -285,7 +285,7 @@ var file_wx_proto_rawDesc = []byte{
 	0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f,
 	0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f,
 	0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x50,
-	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xc8, 0x05, 0x0a, 0x02, 0x57, 0x78, 0x12, 0x42,
+	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0x95, 0x06, 0x0a, 0x02, 0x57, 0x78, 0x12, 0x42,
 	0x0a, 0x0e, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x72,
 	0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
 	0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
@@ -330,11 +330,15 @@ var file_wx_proto_rawDesc = []byte{
 	0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61,
 	0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69,
 	0x61, 0x6c, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x3a,
-	0x01, 0x2a, 0x42, 0x37, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x78, 0x50, 0x01, 0x5a, 0x2b,
-	0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73,
-	0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
-	0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x78, 0x3b, 0x77, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x33,
+	0x01, 0x2a, 0x12, 0x4b, 0x0a, 0x17, 0x43, 0x72, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+	0x4f, 0x6c, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e,
+	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+	0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42,
+	0x37, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x78, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74,
+	0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76,
+	0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61,
+	0x70, 0x69, 0x2f, 0x77, 0x78, 0x3b, 0x77, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -371,16 +375,18 @@ var file_wx_proto_depIdxs = []int32{
 	0, // 5: api.wx.Wx.GetUserMsgByKey:input_type -> api.wx.GetUserMsgByKeyRequest
 	6, // 6: api.wx.Wx.WxConf:input_type -> api.common.WxConfReq
 	7, // 7: api.wx.Wx.UploadMaterialVoice:input_type -> api.account.MediaID
-	4, // 8: api.wx.Wx.CronSignInUser:output_type -> google.protobuf.Empty
-	4, // 9: api.wx.Wx.CronSendUnreadTemplate:output_type -> google.protobuf.Empty
-	4, // 10: api.wx.Wx.SendNewMessageUnreadReminder:output_type -> google.protobuf.Empty
-	4, // 11: api.wx.Wx.SendNewVisitorTemplateReminder:output_type -> google.protobuf.Empty
-	4, // 12: api.wx.Wx.ReduceUserUnread:output_type -> google.protobuf.Empty
-	1, // 13: api.wx.Wx.GetUserMsgByKey:output_type -> api.wx.GetUserMsgByKeyReply
-	8, // 14: api.wx.Wx.WxConf:output_type -> api.common.WxConfResponse
-	9, // 15: api.wx.Wx.UploadMaterialVoice:output_type -> api.account.MaterialLink
-	8, // [8:16] is the sub-list for method output_type
-	0, // [0:8] is the sub-list for method input_type
+	4, // 8: api.wx.Wx.CronDeleteOldUserSelect:input_type -> google.protobuf.Empty
+	4, // 9: api.wx.Wx.CronSignInUser:output_type -> google.protobuf.Empty
+	4, // 10: api.wx.Wx.CronSendUnreadTemplate:output_type -> google.protobuf.Empty
+	4, // 11: api.wx.Wx.SendNewMessageUnreadReminder:output_type -> google.protobuf.Empty
+	4, // 12: api.wx.Wx.SendNewVisitorTemplateReminder:output_type -> google.protobuf.Empty
+	4, // 13: api.wx.Wx.ReduceUserUnread:output_type -> google.protobuf.Empty
+	1, // 14: api.wx.Wx.GetUserMsgByKey:output_type -> api.wx.GetUserMsgByKeyReply
+	8, // 15: api.wx.Wx.WxConf:output_type -> api.common.WxConfResponse
+	9, // 16: api.wx.Wx.UploadMaterialVoice:output_type -> api.account.MaterialLink
+	4, // 17: api.wx.Wx.CronDeleteOldUserSelect:output_type -> google.protobuf.Empty
+	9, // [9:18] is the sub-list for method output_type
+	0, // [0:9] is the sub-list for method input_type
 	0, // [0:0] is the sub-list for extension type_name
 	0, // [0:0] is the sub-list for extension extendee
 	0, // [0:0] is the sub-list for field type_name

+ 2 - 0
api/wx/wx.proto

@@ -39,6 +39,8 @@ service Wx {
       body:"*"
     };
   };
+  // 定时删除过期选择
+  rpc CronDeleteOldUserSelect (google.protobuf.Empty) returns (google.protobuf.Empty){};
 }
 
 message GetUserMsgByKeyRequest{

+ 38 - 0
api/wx/wx_grpc.pb.go

@@ -37,6 +37,8 @@ type WxClient interface {
 	WxConf(ctx context.Context, in *common.WxConfReq, opts ...grpc.CallOption) (*common.WxConfResponse, error)
 	// 通过微信下载语音并上传到七牛
 	UploadMaterialVoice(ctx context.Context, in *account.MediaID, opts ...grpc.CallOption) (*account.MaterialLink, error)
+	// 定时删除过期选择
+	CronDeleteOldUserSelect(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
 }
 
 type wxClient struct {
@@ -119,6 +121,15 @@ func (c *wxClient) UploadMaterialVoice(ctx context.Context, in *account.MediaID,
 	return out, nil
 }
 
+func (c *wxClient) CronDeleteOldUserSelect(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.wx.Wx/CronDeleteOldUserSelect", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // WxServer is the server API for Wx service.
 // All implementations must embed UnimplementedWxServer
 // for forward compatibility
@@ -139,6 +150,8 @@ type WxServer interface {
 	WxConf(context.Context, *common.WxConfReq) (*common.WxConfResponse, error)
 	// 通过微信下载语音并上传到七牛
 	UploadMaterialVoice(context.Context, *account.MediaID) (*account.MaterialLink, error)
+	// 定时删除过期选择
+	CronDeleteOldUserSelect(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	mustEmbedUnimplementedWxServer()
 }
 
@@ -170,6 +183,9 @@ func (UnimplementedWxServer) WxConf(context.Context, *common.WxConfReq) (*common
 func (UnimplementedWxServer) UploadMaterialVoice(context.Context, *account.MediaID) (*account.MaterialLink, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UploadMaterialVoice not implemented")
 }
+func (UnimplementedWxServer) CronDeleteOldUserSelect(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CronDeleteOldUserSelect not implemented")
+}
 func (UnimplementedWxServer) mustEmbedUnimplementedWxServer() {}
 
 // UnsafeWxServer may be embedded to opt out of forward compatibility for this service.
@@ -327,6 +343,24 @@ func _Wx_UploadMaterialVoice_Handler(srv interface{}, ctx context.Context, dec f
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Wx_CronDeleteOldUserSelect_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.(WxServer).CronDeleteOldUserSelect(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.wx.Wx/CronDeleteOldUserSelect",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(WxServer).CronDeleteOldUserSelect(ctx, req.(*emptypb.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Wx_ServiceDesc is the grpc.ServiceDesc for Wx service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -366,6 +400,10 @@ var Wx_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "UploadMaterialVoice",
 			Handler:    _Wx_UploadMaterialVoice_Handler,
 		},
+		{
+			MethodName: "CronDeleteOldUserSelect",
+			Handler:    _Wx_CronDeleteOldUserSelect_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "wx.proto",