wfz 3 years ago
parent
commit
dfc41c83ae

File diff suppressed because it is too large
+ 336 - 82
api/common/common.pb.go


+ 28 - 7
api/common/common.proto

@@ -187,6 +187,34 @@ message PersonDB{
   bool isFinishInformation = 13;//是否完善消息
   bool isFinishInformation = 13;//是否完善消息
   repeated int64 tagList = 14;// 标签列表
   repeated int64 tagList = 14;// 标签列表
   int64 personId = 16;// 用户id(number)
   int64 personId = 16;// 用户id(number)
+  bool isBlack = 17;// 是否是黑名单用户
+}
+
+message PersonDBDetails{
+  string id = 1; // id
+  string nickname = 2;// 昵称
+  string avatarUrl =3;// 头像链接
+  int64 sex = 4;// 性别
+  repeated string pictures = 5; // 图片
+  int64 age = 6; // 年龄
+  string constellation = 7; // 星座
+  string introduceVoice = 8; // 介绍语音
+  string province = 9;// 省
+  string city = 10;// 市
+  string area = 11;// 区
+  string signature = 12;//介绍
+  bool isFinishInformation = 13;//是否完善消息
+  repeated int64 tagList = 14;// 标签列表
+  int64 personId = 16;// 用户id(number)
+  bool isBlack = 17;// 是否是黑名单用户
+  int64 todaySendUnreadReminderNum = 18;
+  int64 lastSendTemplateTime = 19;
+  int64 todaySendVisitorReminderNum = 20;
+}
+
+message GetUserDBAndInitReq{
+  string personId = 1;
+  bool isInit = 2;
 }
 }
 
 
 message ScripIdRequest {
 message ScripIdRequest {
@@ -480,13 +508,6 @@ message RecommendPersonInfo{
   repeated string pictures = 23;// 相册
   repeated string pictures = 23;// 相册
 }
 }
 
 
-message FindRecommendRequest{
-  int64 num = 1;// 数量
-  string type = 2;
-  int64 sex = 3;
-  string personId = 4;// ID
-}
-
 message FindOverSevenDayAvatarReply{
 message FindOverSevenDayAvatarReply{
   repeated string list = 1;// 头像列表
   repeated string list = 1;// 头像列表
 }
 }

File diff suppressed because it is too large
+ 216 - 98
api/user/user.pb.go


+ 19 - 4
api/user/user.proto

@@ -693,8 +693,6 @@ service User {
   rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
   rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
   // 3、对内更新
   // 3、对内更新
   rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){};
   rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){};
-  // 4、查询推荐用户的数据
-  rpc FindRecommendUserDBList (common.FindRecommendRequest) returns (common.PersonDBReply){};
   // 5、更新上次登录时间
   // 5、更新上次登录时间
   rpc UpdateUserLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){};
   rpc UpdateUserLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){};
   // 6、通过userID查询用户
   // 6、通过userID查询用户
@@ -733,12 +731,29 @@ service User {
   rpc FindUserVipDBList (common.PersonIDList) returns (FindUserVipListDBReply){};
   rpc FindUserVipDBList (common.PersonIDList) returns (FindUserVipListDBReply){};
   // 匹配不存在map中并满足条件的用户
   // 匹配不存在map中并满足条件的用户
   rpc MatchUserDBWithoutMap (MatchUserDBWithoutMapRequest) returns (common.PersonDB){};
   rpc MatchUserDBWithoutMap (MatchUserDBWithoutMapRequest) returns (common.PersonDB){};
+  // 获取用户信息并判断是否初始化今日
+  rpc GetUserDBAndInit(common.GetUserDBAndInitReq) returns (common.PersonDBDetails){};
+  // 更新今日信息
+  rpc UpdateToday (UpdateTodayRequest) returns (google.protobuf.Empty){};
+  // 更新上次发送模板的时间信息
+  rpc UpdateLastSendTemplateTime (UpdateLastSendTemplateTimeRequest) returns (google.protobuf.Empty){};
 
 
-  rpc CronSignInUser (google.protobuf.Empty) returns (google.protobuf.Empty){};
-  rpc CronSendUnreadTemplate (google.protobuf.Empty) returns (google.protobuf.Empty){};
+//  rpc CronSignInUser (google.protobuf.Empty) returns (google.protobuf.Empty){};
+//  rpc CronSendUnreadTemplate (google.protobuf.Empty) returns (google.protobuf.Empty){};
   rpc CronRemoveExpirationVip (google.protobuf.Empty) returns (google.protobuf.Empty){};
   rpc CronRemoveExpirationVip (google.protobuf.Empty) returns (google.protobuf.Empty){};
 }
 }
 
 
+message UpdateTodayRequest{
+  string userId = 1;
+  int64 todaySendUnreadReminderNum = 2;
+  int64 todaySendVisitorReminderNum = 3;
+}
+
+message UpdateLastSendTemplateTimeRequest{
+  string userId = 1;
+  int64 lastSendTemplateTime = 2;
+}
+
 message UserPrivacyStatusInfo{
 message UserPrivacyStatusInfo{
   bool isCloseGreet = 1;// 是否关闭打招呼
   bool isCloseGreet = 1;// 是否关闭打招呼
   bool isCloseMatching = 2;// 是否关闭匹配到我
   bool isCloseMatching = 2;// 是否关闭匹配到我

+ 72 - 64
api/user/user_grpc.pb.go

@@ -222,8 +222,6 @@ type UserClient interface {
 	FindUserDBList(ctx context.Context, in *common.PersonIDList, opts ...grpc.CallOption) (*common.PersonDBReply, error)
 	FindUserDBList(ctx context.Context, in *common.PersonIDList, opts ...grpc.CallOption) (*common.PersonDBReply, error)
 	// 3、对内更新
 	// 3、对内更新
 	UpdateLastScripIDDB(ctx context.Context, in *common.UpdateLastScripIDDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	UpdateLastScripIDDB(ctx context.Context, in *common.UpdateLastScripIDDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
-	// 4、查询推荐用户的数据
-	FindRecommendUserDBList(ctx context.Context, in *common.FindRecommendRequest, opts ...grpc.CallOption) (*common.PersonDBReply, error)
 	// 5、更新上次登录时间
 	// 5、更新上次登录时间
 	UpdateUserLastLoginTime(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	UpdateUserLastLoginTime(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 6、通过userID查询用户
 	// 6、通过userID查询用户
@@ -262,8 +260,14 @@ type UserClient interface {
 	FindUserVipDBList(ctx context.Context, in *common.PersonIDList, opts ...grpc.CallOption) (*FindUserVipListDBReply, error)
 	FindUserVipDBList(ctx context.Context, in *common.PersonIDList, opts ...grpc.CallOption) (*FindUserVipListDBReply, error)
 	// 匹配不存在map中并满足条件的用户
 	// 匹配不存在map中并满足条件的用户
 	MatchUserDBWithoutMap(ctx context.Context, in *MatchUserDBWithoutMapRequest, opts ...grpc.CallOption) (*common.PersonDB, error)
 	MatchUserDBWithoutMap(ctx context.Context, in *MatchUserDBWithoutMapRequest, opts ...grpc.CallOption) (*common.PersonDB, error)
-	CronSignInUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
-	CronSendUnreadTemplate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 获取用户信息并判断是否初始化今日
+	GetUserDBAndInit(ctx context.Context, in *common.GetUserDBAndInitReq, opts ...grpc.CallOption) (*common.PersonDBDetails, error)
+	// 更新今日信息
+	UpdateToday(ctx context.Context, in *UpdateTodayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 更新上次发送模板的时间信息
+	UpdateLastSendTemplateTime(ctx context.Context, in *UpdateLastSendTemplateTimeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	//  rpc CronSignInUser (google.protobuf.Empty) returns (google.protobuf.Empty){};
+	//  rpc CronSendUnreadTemplate (google.protobuf.Empty) returns (google.protobuf.Empty){};
 	CronRemoveExpirationVip(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	CronRemoveExpirationVip(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
 }
 }
 
 
@@ -1157,15 +1161,6 @@ func (c *userClient) UpdateLastScripIDDB(ctx context.Context, in *common.UpdateL
 	return out, nil
 	return out, nil
 }
 }
 
 
-func (c *userClient) FindRecommendUserDBList(ctx context.Context, in *common.FindRecommendRequest, opts ...grpc.CallOption) (*common.PersonDBReply, error) {
-	out := new(common.PersonDBReply)
-	err := c.cc.Invoke(ctx, "/api.user.User/FindRecommendUserDBList", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
 func (c *userClient) UpdateUserLastLoginTime(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 func (c *userClient) UpdateUserLastLoginTime(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	out := new(emptypb.Empty)
 	out := new(emptypb.Empty)
 	err := c.cc.Invoke(ctx, "/api.user.User/UpdateUserLastLoginTime", in, out, opts...)
 	err := c.cc.Invoke(ctx, "/api.user.User/UpdateUserLastLoginTime", in, out, opts...)
@@ -1337,18 +1332,27 @@ func (c *userClient) MatchUserDBWithoutMap(ctx context.Context, in *MatchUserDBW
 	return out, nil
 	return out, nil
 }
 }
 
 
-func (c *userClient) CronSignInUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+func (c *userClient) GetUserDBAndInit(ctx context.Context, in *common.GetUserDBAndInitReq, opts ...grpc.CallOption) (*common.PersonDBDetails, error) {
+	out := new(common.PersonDBDetails)
+	err := c.cc.Invoke(ctx, "/api.user.User/GetUserDBAndInit", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userClient) UpdateToday(ctx context.Context, in *UpdateTodayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	out := new(emptypb.Empty)
 	out := new(emptypb.Empty)
-	err := c.cc.Invoke(ctx, "/api.user.User/CronSignInUser", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/api.user.User/UpdateToday", in, out, opts...)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	return out, nil
 	return out, nil
 }
 }
 
 
-func (c *userClient) CronSendUnreadTemplate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+func (c *userClient) UpdateLastSendTemplateTime(ctx context.Context, in *UpdateLastSendTemplateTimeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	out := new(emptypb.Empty)
 	out := new(emptypb.Empty)
-	err := c.cc.Invoke(ctx, "/api.user.User/CronSendUnreadTemplate", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/api.user.User/UpdateLastSendTemplateTime", in, out, opts...)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
@@ -1568,8 +1572,6 @@ type UserServer interface {
 	FindUserDBList(context.Context, *common.PersonIDList) (*common.PersonDBReply, error)
 	FindUserDBList(context.Context, *common.PersonIDList) (*common.PersonDBReply, error)
 	// 3、对内更新
 	// 3、对内更新
 	UpdateLastScripIDDB(context.Context, *common.UpdateLastScripIDDBRequest) (*emptypb.Empty, error)
 	UpdateLastScripIDDB(context.Context, *common.UpdateLastScripIDDBRequest) (*emptypb.Empty, error)
-	// 4、查询推荐用户的数据
-	FindRecommendUserDBList(context.Context, *common.FindRecommendRequest) (*common.PersonDBReply, error)
 	// 5、更新上次登录时间
 	// 5、更新上次登录时间
 	UpdateUserLastLoginTime(context.Context, *common.PersonIDParam) (*emptypb.Empty, error)
 	UpdateUserLastLoginTime(context.Context, *common.PersonIDParam) (*emptypb.Empty, error)
 	// 6、通过userID查询用户
 	// 6、通过userID查询用户
@@ -1608,8 +1610,14 @@ type UserServer interface {
 	FindUserVipDBList(context.Context, *common.PersonIDList) (*FindUserVipListDBReply, error)
 	FindUserVipDBList(context.Context, *common.PersonIDList) (*FindUserVipListDBReply, error)
 	// 匹配不存在map中并满足条件的用户
 	// 匹配不存在map中并满足条件的用户
 	MatchUserDBWithoutMap(context.Context, *MatchUserDBWithoutMapRequest) (*common.PersonDB, error)
 	MatchUserDBWithoutMap(context.Context, *MatchUserDBWithoutMapRequest) (*common.PersonDB, error)
-	CronSignInUser(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
-	CronSendUnreadTemplate(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
+	// 获取用户信息并判断是否初始化今日
+	GetUserDBAndInit(context.Context, *common.GetUserDBAndInitReq) (*common.PersonDBDetails, error)
+	// 更新今日信息
+	UpdateToday(context.Context, *UpdateTodayRequest) (*emptypb.Empty, error)
+	// 更新上次发送模板的时间信息
+	UpdateLastSendTemplateTime(context.Context, *UpdateLastSendTemplateTimeRequest) (*emptypb.Empty, error)
+	//  rpc CronSignInUser (google.protobuf.Empty) returns (google.protobuf.Empty){};
+	//  rpc CronSendUnreadTemplate (google.protobuf.Empty) returns (google.protobuf.Empty){};
 	CronRemoveExpirationVip(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	CronRemoveExpirationVip(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	mustEmbedUnimplementedUserServer()
 	mustEmbedUnimplementedUserServer()
 }
 }
@@ -1912,9 +1920,6 @@ func (UnimplementedUserServer) FindUserDBList(context.Context, *common.PersonIDL
 func (UnimplementedUserServer) UpdateLastScripIDDB(context.Context, *common.UpdateLastScripIDDBRequest) (*emptypb.Empty, error) {
 func (UnimplementedUserServer) UpdateLastScripIDDB(context.Context, *common.UpdateLastScripIDDBRequest) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpdateLastScripIDDB not implemented")
 	return nil, status.Errorf(codes.Unimplemented, "method UpdateLastScripIDDB not implemented")
 }
 }
-func (UnimplementedUserServer) FindRecommendUserDBList(context.Context, *common.FindRecommendRequest) (*common.PersonDBReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method FindRecommendUserDBList not implemented")
-}
 func (UnimplementedUserServer) UpdateUserLastLoginTime(context.Context, *common.PersonIDParam) (*emptypb.Empty, error) {
 func (UnimplementedUserServer) UpdateUserLastLoginTime(context.Context, *common.PersonIDParam) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpdateUserLastLoginTime not implemented")
 	return nil, status.Errorf(codes.Unimplemented, "method UpdateUserLastLoginTime not implemented")
 }
 }
@@ -1972,11 +1977,14 @@ func (UnimplementedUserServer) FindUserVipDBList(context.Context, *common.Person
 func (UnimplementedUserServer) MatchUserDBWithoutMap(context.Context, *MatchUserDBWithoutMapRequest) (*common.PersonDB, error) {
 func (UnimplementedUserServer) MatchUserDBWithoutMap(context.Context, *MatchUserDBWithoutMapRequest) (*common.PersonDB, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method MatchUserDBWithoutMap not implemented")
 	return nil, status.Errorf(codes.Unimplemented, "method MatchUserDBWithoutMap not implemented")
 }
 }
-func (UnimplementedUserServer) CronSignInUser(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method CronSignInUser not implemented")
+func (UnimplementedUserServer) GetUserDBAndInit(context.Context, *common.GetUserDBAndInitReq) (*common.PersonDBDetails, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetUserDBAndInit not implemented")
+}
+func (UnimplementedUserServer) UpdateToday(context.Context, *UpdateTodayRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UpdateToday not implemented")
 }
 }
-func (UnimplementedUserServer) CronSendUnreadTemplate(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method CronSendUnreadTemplate not implemented")
+func (UnimplementedUserServer) UpdateLastSendTemplateTime(context.Context, *UpdateLastSendTemplateTimeRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UpdateLastSendTemplateTime not implemented")
 }
 }
 func (UnimplementedUserServer) CronRemoveExpirationVip(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
 func (UnimplementedUserServer) CronRemoveExpirationVip(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method CronRemoveExpirationVip not implemented")
 	return nil, status.Errorf(codes.Unimplemented, "method CronRemoveExpirationVip not implemented")
@@ -3758,24 +3766,6 @@ func _User_UpdateLastScripIDDB_Handler(srv interface{}, ctx context.Context, dec
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
 
 
-func _User_FindRecommendUserDBList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(common.FindRecommendRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserServer).FindRecommendUserDBList(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/api.user.User/FindRecommendUserDBList",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserServer).FindRecommendUserDBList(ctx, req.(*common.FindRecommendRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
 func _User_UpdateUserLastLoginTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 func _User_UpdateUserLastLoginTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(common.PersonIDParam)
 	in := new(common.PersonIDParam)
 	if err := dec(in); err != nil {
 	if err := dec(in); err != nil {
@@ -4118,38 +4108,56 @@ func _User_MatchUserDBWithoutMap_Handler(srv interface{}, ctx context.Context, d
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
 
 
-func _User_CronSignInUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(emptypb.Empty)
+func _User_GetUserDBAndInit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.GetUserDBAndInitReq)
 	if err := dec(in); err != nil {
 	if err := dec(in); err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	if interceptor == nil {
 	if interceptor == nil {
-		return srv.(UserServer).CronSignInUser(ctx, in)
+		return srv.(UserServer).GetUserDBAndInit(ctx, in)
 	}
 	}
 	info := &grpc.UnaryServerInfo{
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
 		Server:     srv,
-		FullMethod: "/api.user.User/CronSignInUser",
+		FullMethod: "/api.user.User/GetUserDBAndInit",
 	}
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserServer).CronSignInUser(ctx, req.(*emptypb.Empty))
+		return srv.(UserServer).GetUserDBAndInit(ctx, req.(*common.GetUserDBAndInitReq))
 	}
 	}
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
 
 
-func _User_CronSendUnreadTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(emptypb.Empty)
+func _User_UpdateToday_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UpdateTodayRequest)
 	if err := dec(in); err != nil {
 	if err := dec(in); err != nil {
 		return nil, err
 		return nil, err
 	}
 	}
 	if interceptor == nil {
 	if interceptor == nil {
-		return srv.(UserServer).CronSendUnreadTemplate(ctx, in)
+		return srv.(UserServer).UpdateToday(ctx, in)
 	}
 	}
 	info := &grpc.UnaryServerInfo{
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
 		Server:     srv,
-		FullMethod: "/api.user.User/CronSendUnreadTemplate",
+		FullMethod: "/api.user.User/UpdateToday",
 	}
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserServer).CronSendUnreadTemplate(ctx, req.(*emptypb.Empty))
+		return srv.(UserServer).UpdateToday(ctx, req.(*UpdateTodayRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _User_UpdateLastSendTemplateTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UpdateLastSendTemplateTimeRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserServer).UpdateLastSendTemplateTime(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/UpdateLastSendTemplateTime",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).UpdateLastSendTemplateTime(ctx, req.(*UpdateLastSendTemplateTimeRequest))
 	}
 	}
 	return interceptor(ctx, in, info, handler)
 	return interceptor(ctx, in, info, handler)
 }
 }
@@ -4571,10 +4579,6 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "UpdateLastScripIDDB",
 			MethodName: "UpdateLastScripIDDB",
 			Handler:    _User_UpdateLastScripIDDB_Handler,
 			Handler:    _User_UpdateLastScripIDDB_Handler,
 		},
 		},
-		{
-			MethodName: "FindRecommendUserDBList",
-			Handler:    _User_FindRecommendUserDBList_Handler,
-		},
 		{
 		{
 			MethodName: "UpdateUserLastLoginTime",
 			MethodName: "UpdateUserLastLoginTime",
 			Handler:    _User_UpdateUserLastLoginTime_Handler,
 			Handler:    _User_UpdateUserLastLoginTime_Handler,
@@ -4652,12 +4656,16 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			Handler:    _User_MatchUserDBWithoutMap_Handler,
 			Handler:    _User_MatchUserDBWithoutMap_Handler,
 		},
 		},
 		{
 		{
-			MethodName: "CronSignInUser",
-			Handler:    _User_CronSignInUser_Handler,
+			MethodName: "GetUserDBAndInit",
+			Handler:    _User_GetUserDBAndInit_Handler,
+		},
+		{
+			MethodName: "UpdateToday",
+			Handler:    _User_UpdateToday_Handler,
 		},
 		},
 		{
 		{
-			MethodName: "CronSendUnreadTemplate",
-			Handler:    _User_CronSendUnreadTemplate_Handler,
+			MethodName: "UpdateLastSendTemplateTime",
+			Handler:    _User_UpdateLastSendTemplateTime_Handler,
 		},
 		},
 		{
 		{
 			MethodName: "CronRemoveExpirationVip",
 			MethodName: "CronRemoveExpirationVip",

+ 193 - 0
api/wx/wx.pb.go

@@ -0,0 +1,193 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1-devel
+// 	protoc        v3.21.8
+// source: wx.proto
+
+package wx
+
+import (
+	common "git.ikuban.com/server/pw-protobuf/api/common"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	emptypb "google.golang.org/protobuf/types/known/emptypb"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SendNewMessageUnreadReminderRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PersonId     string `protobuf:"bytes,1,opt,name=personId,proto3" json:"personId"`
+	SendPersonId string `protobuf:"bytes,2,opt,name=sendPersonId,proto3" json:"sendPersonId"`
+}
+
+func (x *SendNewMessageUnreadReminderRequest) Reset() {
+	*x = SendNewMessageUnreadReminderRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_wx_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SendNewMessageUnreadReminderRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SendNewMessageUnreadReminderRequest) ProtoMessage() {}
+
+func (x *SendNewMessageUnreadReminderRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_wx_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SendNewMessageUnreadReminderRequest.ProtoReflect.Descriptor instead.
+func (*SendNewMessageUnreadReminderRequest) Descriptor() ([]byte, []int) {
+	return file_wx_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SendNewMessageUnreadReminderRequest) GetPersonId() string {
+	if x != nil {
+		return x.PersonId
+	}
+	return ""
+}
+
+func (x *SendNewMessageUnreadReminderRequest) GetSendPersonId() string {
+	if x != nil {
+		return x.SendPersonId
+	}
+	return ""
+}
+
+var File_wx_proto protoreflect.FileDescriptor
+
+var file_wx_proto_rawDesc = []byte{
+	0x0a, 0x08, 0x77, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e,
+	0x77, 0x78, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+	0x17, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
+	0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x65, 0x0a, 0x23, 0x53, 0x65, 0x6e, 0x64,
+	0x4e, 0x65, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64,
+	0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x1a, 0x0a, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 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,
+	0xd2, 0x02, 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, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+	0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x16, 0x43, 0x72,
+	0x6f, 0x6e, 0x53, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x54, 0x65, 0x6d, 0x70,
+	0x6c, 0x61, 0x74, 0x65, 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, 0x12, 0x65, 0x0a, 0x1c, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x65,
+	0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x52, 0x65,
+	0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x77, 0x78, 0x2e,
+	0x53, 0x65, 0x6e, 0x64, 0x4e, 0x65, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x6e,
+	0x72, 0x65, 0x61, 0x64, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 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, 0x12, 0x55, 0x0a,
+	0x1e, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x65, 0x77, 0x56, 0x69, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x54,
+	0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12,
+	0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72,
+	0x73, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x61, 0x72, 0x61, 0x6d, 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 (
+	file_wx_proto_rawDescOnce sync.Once
+	file_wx_proto_rawDescData = file_wx_proto_rawDesc
+)
+
+func file_wx_proto_rawDescGZIP() []byte {
+	file_wx_proto_rawDescOnce.Do(func() {
+		file_wx_proto_rawDescData = protoimpl.X.CompressGZIP(file_wx_proto_rawDescData)
+	})
+	return file_wx_proto_rawDescData
+}
+
+var file_wx_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_wx_proto_goTypes = []interface{}{
+	(*SendNewMessageUnreadReminderRequest)(nil), // 0: api.wx.SendNewMessageUnreadReminderRequest
+	(*emptypb.Empty)(nil),                       // 1: google.protobuf.Empty
+	(*common.PersonIDParam)(nil),                // 2: api.common.PersonIDParam
+}
+var file_wx_proto_depIdxs = []int32{
+	1, // 0: api.wx.Wx.CronSignInUser:input_type -> google.protobuf.Empty
+	1, // 1: api.wx.Wx.CronSendUnreadTemplate:input_type -> google.protobuf.Empty
+	0, // 2: api.wx.Wx.SendNewMessageUnreadReminder:input_type -> api.wx.SendNewMessageUnreadReminderRequest
+	2, // 3: api.wx.Wx.SendNewVisitorTemplateReminder:input_type -> api.common.PersonIDParam
+	1, // 4: api.wx.Wx.CronSignInUser:output_type -> google.protobuf.Empty
+	1, // 5: api.wx.Wx.CronSendUnreadTemplate:output_type -> google.protobuf.Empty
+	1, // 6: api.wx.Wx.SendNewMessageUnreadReminder:output_type -> google.protobuf.Empty
+	1, // 7: api.wx.Wx.SendNewVisitorTemplateReminder:output_type -> google.protobuf.Empty
+	4, // [4:8] is the sub-list for method output_type
+	0, // [0:4] 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
+}
+
+func init() { file_wx_proto_init() }
+func file_wx_proto_init() {
+	if File_wx_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_wx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SendNewMessageUnreadReminderRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_wx_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   1,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_wx_proto_goTypes,
+		DependencyIndexes: file_wx_proto_depIdxs,
+		MessageInfos:      file_wx_proto_msgTypes,
+	}.Build()
+	File_wx_proto = out.File
+	file_wx_proto_rawDesc = nil
+	file_wx_proto_goTypes = nil
+	file_wx_proto_depIdxs = nil
+}

+ 28 - 0
api/wx/wx.proto

@@ -0,0 +1,28 @@
+syntax = "proto3";
+
+package api.wx;
+
+//import "google/api/annotations.proto";
+//import "google/protobuf/struct.proto";
+import "google/protobuf/empty.proto";
+import "api/common/common.proto";
+
+option go_package = "git.ikuban.com/server/pw-protobuf/api/wx;wx";
+option java_multiple_files = true;
+option java_package = "api.wx";
+
+service Wx {
+  // 定时发送签到提醒
+  rpc CronSignInUser (google.protobuf.Empty) returns (google.protobuf.Empty){};
+  // 定时发送未读消息提醒
+  rpc CronSendUnreadTemplate (google.protobuf.Empty) returns (google.protobuf.Empty){};
+  // 未读发送模板消息
+  rpc SendNewMessageUnreadReminder (SendNewMessageUnreadReminderRequest) returns (google.protobuf.Empty){};
+  // 好友访问提醒
+  rpc SendNewVisitorTemplateReminder (common.PersonIDParam) returns (google.protobuf.Empty){};
+}
+
+message SendNewMessageUnreadReminderRequest{
+  string personId  = 1;
+  string sendPersonId = 2;
+}

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

@@ -0,0 +1,219 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+
+package wx
+
+import (
+	context "context"
+	common "git.ikuban.com/server/pw-protobuf/api/common"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+	emptypb "google.golang.org/protobuf/types/known/emptypb"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// WxClient is the client API for Wx service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type WxClient interface {
+	// 定时发送签到提醒
+	CronSignInUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 定时发送未读消息提醒
+	CronSendUnreadTemplate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 未读发送模板消息
+	SendNewMessageUnreadReminder(ctx context.Context, in *SendNewMessageUnreadReminderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 好友访问提醒
+	SendNewVisitorTemplateReminder(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
+}
+
+type wxClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewWxClient(cc grpc.ClientConnInterface) WxClient {
+	return &wxClient{cc}
+}
+
+func (c *wxClient) CronSignInUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.wx.Wx/CronSignInUser", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *wxClient) CronSendUnreadTemplate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.wx.Wx/CronSendUnreadTemplate", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *wxClient) SendNewMessageUnreadReminder(ctx context.Context, in *SendNewMessageUnreadReminderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.wx.Wx/SendNewMessageUnreadReminder", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *wxClient) SendNewVisitorTemplateReminder(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.wx.Wx/SendNewVisitorTemplateReminder", 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
+type WxServer interface {
+	// 定时发送签到提醒
+	CronSignInUser(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
+	// 定时发送未读消息提醒
+	CronSendUnreadTemplate(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
+	// 未读发送模板消息
+	SendNewMessageUnreadReminder(context.Context, *SendNewMessageUnreadReminderRequest) (*emptypb.Empty, error)
+	// 好友访问提醒
+	SendNewVisitorTemplateReminder(context.Context, *common.PersonIDParam) (*emptypb.Empty, error)
+	mustEmbedUnimplementedWxServer()
+}
+
+// UnimplementedWxServer must be embedded to have forward compatible implementations.
+type UnimplementedWxServer struct {
+}
+
+func (UnimplementedWxServer) CronSignInUser(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CronSignInUser not implemented")
+}
+func (UnimplementedWxServer) CronSendUnreadTemplate(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CronSendUnreadTemplate not implemented")
+}
+func (UnimplementedWxServer) SendNewMessageUnreadReminder(context.Context, *SendNewMessageUnreadReminderRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SendNewMessageUnreadReminder not implemented")
+}
+func (UnimplementedWxServer) SendNewVisitorTemplateReminder(context.Context, *common.PersonIDParam) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SendNewVisitorTemplateReminder not implemented")
+}
+func (UnimplementedWxServer) mustEmbedUnimplementedWxServer() {}
+
+// UnsafeWxServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to WxServer will
+// result in compilation errors.
+type UnsafeWxServer interface {
+	mustEmbedUnimplementedWxServer()
+}
+
+func RegisterWxServer(s grpc.ServiceRegistrar, srv WxServer) {
+	s.RegisterService(&Wx_ServiceDesc, srv)
+}
+
+func _Wx_CronSignInUser_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).CronSignInUser(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.wx.Wx/CronSignInUser",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(WxServer).CronSignInUser(ctx, req.(*emptypb.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Wx_CronSendUnreadTemplate_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).CronSendUnreadTemplate(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.wx.Wx/CronSendUnreadTemplate",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(WxServer).CronSendUnreadTemplate(ctx, req.(*emptypb.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Wx_SendNewMessageUnreadReminder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SendNewMessageUnreadReminderRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(WxServer).SendNewMessageUnreadReminder(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.wx.Wx/SendNewMessageUnreadReminder",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(WxServer).SendNewMessageUnreadReminder(ctx, req.(*SendNewMessageUnreadReminderRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Wx_SendNewVisitorTemplateReminder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.PersonIDParam)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(WxServer).SendNewVisitorTemplateReminder(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.wx.Wx/SendNewVisitorTemplateReminder",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(WxServer).SendNewVisitorTemplateReminder(ctx, req.(*common.PersonIDParam))
+	}
+	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)
+var Wx_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "api.wx.Wx",
+	HandlerType: (*WxServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "CronSignInUser",
+			Handler:    _Wx_CronSignInUser_Handler,
+		},
+		{
+			MethodName: "CronSendUnreadTemplate",
+			Handler:    _Wx_CronSendUnreadTemplate_Handler,
+		},
+		{
+			MethodName: "SendNewMessageUnreadReminder",
+			Handler:    _Wx_SendNewMessageUnreadReminder_Handler,
+		},
+		{
+			MethodName: "SendNewVisitorTemplateReminder",
+			Handler:    _Wx_SendNewVisitorTemplateReminder_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "wx.proto",
+}

+ 19 - 0
client/wx.go

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

+ 43 - 8
js/api/common/common_pb.ts

@@ -262,6 +262,49 @@ export interface PersonDB{
     tagList?:Array<number>;
     tagList?:Array<number>;
     /**  用户id(number) */
     /**  用户id(number) */
     personId?:number;
     personId?:number;
+    /**  是否是黑名单用户 */
+    isBlack?:boolean;
+}
+export interface PersonDBDetails{
+    /**  id */
+    id?:string;
+    /**  昵称 */
+    nickname?:string;
+    /**  头像链接 */
+    avatarUrl?:string;
+    /**  性别 */
+    sex?:number;
+    /**  图片 */
+    pictures?:Array<string>;
+    /**  年龄 */
+    age?:number;
+    /**  星座 */
+    constellation?:string;
+    /**  介绍语音 */
+    introduceVoice?:string;
+    /**  省 */
+    province?:string;
+    /**  市 */
+    city?:string;
+    /**  区 */
+    area?:string;
+    /** 介绍 */
+    signature?:string;
+    /** 是否完善消息 */
+    isFinishInformation?:boolean;
+    /**  标签列表 */
+    tagList?:Array<number>;
+    /**  用户id(number) */
+    personId?:number;
+    /**  是否是黑名单用户 */
+    isBlack?:boolean;
+    todaySendUnreadReminderNum?:number;
+    lastSendTemplateTime?:number;
+    todaySendVisitorReminderNum?:number;
+}
+export interface GetUserDBAndInitReq{
+    personId?:string;
+    isInit?:boolean;
 }
 }
 export interface ScripIdRequest{
 export interface ScripIdRequest{
     /**  纸条id */
     /**  纸条id */
@@ -641,14 +684,6 @@ export interface RecommendPersonInfo{
     /**  相册 */
     /**  相册 */
     pictures?:Array<string>;
     pictures?:Array<string>;
 }
 }
-export interface FindRecommendRequest{
-    /**  数量 */
-    num?:number;
-    type?:string;
-    sex?:number;
-    /**  ID */
-    personId?:string;
-}
 export interface FindOverSevenDayAvatarReply{
 export interface FindOverSevenDayAvatarReply{
     /**  头像列表 */
     /**  头像列表 */
     list?:Array<string>;
     list?:Array<string>;

+ 2 - 2
js/api/user/user_http_pb.ts

@@ -1,7 +1,7 @@
 // @ts-ignore
 // @ts-ignore
 import request from '@/libs/request';
 import request from '@/libs/request';
-import {UserInfo,UserBalance,UserFindChatListReply,CreateScripRequest,DeleteScripRequest,UserFindScripRequest,PersonLookScripRequest,ReplyScripRequest,KeyRequest,InformationStatus,UserRechargeRequest,PayInfo,RechargeList,VipRechargeList,FindPayOrderListRequest,PayOrderList,FindMatchingAvatarAndNumReply,UserFreeNum,GetRandomMatchingRequest,SendMessageRequest,VipInfo,GetUserLookHandPickNumReply,IsCanGetReturnRewordReply,UserPrivacyStatusInfo,ManagerFindIsCheckQualityUserListRequest,ManagerMarkHighQualityUserRequest,ManagerReMarkHighQualityUserRequest,ManagerUpdateUserCreditRequest,FindRecommendHighQualityUserRequest,FindRecommendHighQualityUserReply,GetUserDBMsgFromWebsocketReply,SendMsgReduceCreditRequest,SendNewMessageUnreadReminderRequest,UpdateUserMatchedNumRequest,UpdateUserMatchedNumAndReturnUserMsgReply,GetRecommendUserDBRequest,ReportUserBlackRequest,AddUserCreditRequest,UserGetInformationAwardByActivityRequest,UserGetInformationAwardByActivityReply,FindUserVipListDBReply,MatchUserDBWithoutMapRequest} from "./user_pb";
-import {SendPhoneCodeRequest,CheckPhoneCodeRequest,UpdateInformationRequest,CreateChatRoomParam,PersonParam,HomeInfo,LookedAndLikedNum,ListPageRequest,WxConfReq,WxConfResponse,SexReq,TagListReply,ListPage2Request,RecommendPersonListReply,FindChatRecordListRequest,ChatRecordListReply,FindChatRoomMsgRequest,ChatRoomMsg,IsLike,MemeRequest,MemeList,FindChatTopicRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex,MemeTitleList,ChatCardInfo,ReportChatRequest,FindOverSevenDayAvatarReply,UpdateLastScripIDRequest,ScripID,ScripReply,FindScripRequest,ScripInfo,ChatRecordInfo,RoomIDRequest,PartnerIDParam,AddFriendMessageInfo,SendMessageReply,HandpickPersonListReply,PersonIDParam,ManagerFindPersonListRequest,ManagerFindPersonListReply,ManagerFindPersonListReply2,ManagerFindCanHandpickUserListRequest,ManagerFindCanHandpickUserListReply,ManagerSetHandpickUserRequest,ManagerSetHandpickUserOneRequest,PersonIDList,ManagerUpdatePersonVoiceRequest,ManagerUpdatePersonPicturesRequest,ManagerUpdatePersonSignatureRequest,ManagerUpdatePersonAvatarRequest,ManagerUpdatePersonNameRequest,ManagerUpdatePersonWeightRequest,ManagerUpdatePersonIsBlackRequest,PersonMsg,PersonDBReply,UpdateLastScripIDDBRequest,FindRecommendRequest,IDParam,PersonDB} from "../common/common_pb";
+import {UserInfo,UserBalance,UserFindChatListReply,CreateScripRequest,DeleteScripRequest,UserFindScripRequest,PersonLookScripRequest,ReplyScripRequest,KeyRequest,InformationStatus,UserRechargeRequest,PayInfo,RechargeList,VipRechargeList,FindPayOrderListRequest,PayOrderList,FindMatchingAvatarAndNumReply,UserFreeNum,GetRandomMatchingRequest,SendMessageRequest,VipInfo,GetUserLookHandPickNumReply,IsCanGetReturnRewordReply,UserPrivacyStatusInfo,ManagerFindIsCheckQualityUserListRequest,ManagerMarkHighQualityUserRequest,ManagerReMarkHighQualityUserRequest,ManagerUpdateUserCreditRequest,FindRecommendHighQualityUserRequest,FindRecommendHighQualityUserReply,GetUserDBMsgFromWebsocketReply,SendMsgReduceCreditRequest,SendNewMessageUnreadReminderRequest,UpdateUserMatchedNumRequest,UpdateUserMatchedNumAndReturnUserMsgReply,GetRecommendUserDBRequest,ReportUserBlackRequest,AddUserCreditRequest,UserGetInformationAwardByActivityRequest,UserGetInformationAwardByActivityReply,FindUserVipListDBReply,MatchUserDBWithoutMapRequest,UpdateTodayRequest,UpdateLastSendTemplateTimeRequest} from "./user_pb";
+import {SendPhoneCodeRequest,CheckPhoneCodeRequest,UpdateInformationRequest,CreateChatRoomParam,PersonParam,HomeInfo,LookedAndLikedNum,ListPageRequest,WxConfReq,WxConfResponse,SexReq,TagListReply,ListPage2Request,RecommendPersonListReply,FindChatRecordListRequest,ChatRecordListReply,FindChatRoomMsgRequest,ChatRoomMsg,IsLike,MemeRequest,MemeList,FindChatTopicRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex,MemeTitleList,ChatCardInfo,ReportChatRequest,FindOverSevenDayAvatarReply,UpdateLastScripIDRequest,ScripID,ScripReply,FindScripRequest,ScripInfo,ChatRecordInfo,RoomIDRequest,PartnerIDParam,AddFriendMessageInfo,SendMessageReply,HandpickPersonListReply,PersonIDParam,ManagerFindPersonListRequest,ManagerFindPersonListReply,ManagerFindPersonListReply2,ManagerFindCanHandpickUserListRequest,ManagerFindCanHandpickUserListReply,ManagerSetHandpickUserRequest,ManagerSetHandpickUserOneRequest,PersonIDList,ManagerUpdatePersonVoiceRequest,ManagerUpdatePersonPicturesRequest,ManagerUpdatePersonSignatureRequest,ManagerUpdatePersonAvatarRequest,ManagerUpdatePersonNameRequest,ManagerUpdatePersonWeightRequest,ManagerUpdatePersonIsBlackRequest,PersonMsg,PersonDBReply,UpdateLastScripIDDBRequest,IDParam,PersonDB,GetUserDBAndInitReq,PersonDBDetails} from "../common/common_pb";
 import {RoomReply,UnreadNumReply,UserRoomInfo,CheckUserPartnerIsRelationshipReply,WindowInfo,GetRandomMatchingReply} from "../chat/chat_pb";
 import {RoomReply,UnreadNumReply,UserRoomInfo,CheckUserPartnerIsRelationshipReply,WindowInfo,GetRandomMatchingReply} from "../chat/chat_pb";
 import {LookAndLikeListReply,LookAndLikeMessageReply,LookMessageReply} from "../statistics/statistics_pb";
 import {LookAndLikeListReply,LookAndLikeMessageReply,LookMessageReply} from "../statistics/statistics_pb";
 
 

+ 9 - 0
js/api/user/user_pb.ts

@@ -1,5 +1,14 @@
 import {Message} from "../common/common_pb";
 import {Message} from "../common/common_pb";
 
 
+export interface UpdateTodayRequest{
+    userId?:string;
+    todaySendUnreadReminderNum?:number;
+    todaySendVisitorReminderNum?:number;
+}
+export interface UpdateLastSendTemplateTimeRequest{
+    userId?:string;
+    lastSendTemplateTime?:number;
+}
 export interface UserPrivacyStatusInfo{
 export interface UserPrivacyStatusInfo{
     /**  是否关闭打招呼 */
     /**  是否关闭打招呼 */
     isCloseGreet?:boolean;
     isCloseGreet?:boolean;

+ 5 - 0
js/api/wx/wx_pb.ts

@@ -0,0 +1,5 @@
+export interface SendNewMessageUnreadReminderRequest{
+    personId?:string;
+    sendPersonId?:string;
+}
+

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