wfz 3 år sedan
förälder
incheckning
4ea9c89939
6 ändrade filer med 347 tillägg och 108 borttagningar
  1. 153 106
      api/user/user.pb.go
  2. 18 1
      api/user/user.proto
  3. 76 0
      api/user/user_grpc.pb.go
  4. 86 0
      api/user/user_http.pb.go
  5. 11 1
      js/api/user/user_http_pb.ts
  6. 3 0
      js/api/user/user_pb.ts

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 153 - 106
api/user/user.pb.go


+ 18 - 1
api/user/user.proto

@@ -503,7 +503,20 @@ service User {
       body:"*"
     };
   };
-
+  // 查询用户查看精选表的次数
+  rpc GetUserLookHandPickNum (google.protobuf.Empty) returns (GetUserLookHandPickNumReply){
+    option (google.api.http) = {
+      post: "/api/user/look/handpick/num",
+      body:"*"
+    };
+  };
+  // 设置用户查看精选表的次数
+  rpc SetUserLookHandPickNum (google.protobuf.Empty) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/user/look/handpick/num/set",
+      body:"*"
+    };
+  };
   // ---manager---
   // 管理员查询用户列表
   rpc ManagerFindUserList (common.ManagerFindPersonListRequest) returns (common.ManagerFindPersonListReply){
@@ -692,6 +705,10 @@ service User {
   rpc FindUserVipDBList (common.PersonIDList) returns (FindUserVipListDBReply){};
 }
 
+message GetUserLookHandPickNumReply{
+  int64 num = 1;
+}
+
 message FindUserVipListDBReply{
   map <string,VipInfo> vipMap = 1;
 }

+ 76 - 0
api/user/user_grpc.pb.go

@@ -162,6 +162,10 @@ type UserClient interface {
 	GetVipInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VipInfo, error)
 	// 精选列表
 	FindHandpickUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.HandpickPersonListReply, error)
+	// 查询用户查看精选表的次数
+	GetUserLookHandPickNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetUserLookHandPickNumReply, error)
+	// 设置用户查看精选表的次数
+	SetUserLookHandPickNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// ---manager---
 	// 管理员查询用户列表
 	ManagerFindUserList(ctx context.Context, in *common.ManagerFindPersonListRequest, opts ...grpc.CallOption) (*common.ManagerFindPersonListReply, error)
@@ -879,6 +883,24 @@ func (c *userClient) FindHandpickUser(ctx context.Context, in *emptypb.Empty, op
 	return out, nil
 }
 
+func (c *userClient) GetUserLookHandPickNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetUserLookHandPickNumReply, error) {
+	out := new(GetUserLookHandPickNumReply)
+	err := c.cc.Invoke(ctx, "/api.user.User/GetUserLookHandPickNum", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userClient) SetUserLookHandPickNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.user.User/SetUserLookHandPickNum", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 func (c *userClient) ManagerFindUserList(ctx context.Context, in *common.ManagerFindPersonListRequest, opts ...grpc.CallOption) (*common.ManagerFindPersonListReply, error) {
 	out := new(common.ManagerFindPersonListReply)
 	err := c.cc.Invoke(ctx, "/api.user.User/ManagerFindUserList", in, out, opts...)
@@ -1401,6 +1423,10 @@ type UserServer interface {
 	GetVipInfo(context.Context, *emptypb.Empty) (*VipInfo, error)
 	// 精选列表
 	FindHandpickUser(context.Context, *emptypb.Empty) (*common.HandpickPersonListReply, error)
+	// 查询用户查看精选表的次数
+	GetUserLookHandPickNum(context.Context, *emptypb.Empty) (*GetUserLookHandPickNumReply, error)
+	// 设置用户查看精选表的次数
+	SetUserLookHandPickNum(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	// ---manager---
 	// 管理员查询用户列表
 	ManagerFindUserList(context.Context, *common.ManagerFindPersonListRequest) (*common.ManagerFindPersonListReply, error)
@@ -1701,6 +1727,12 @@ func (UnimplementedUserServer) GetVipInfo(context.Context, *emptypb.Empty) (*Vip
 func (UnimplementedUserServer) FindHandpickUser(context.Context, *emptypb.Empty) (*common.HandpickPersonListReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindHandpickUser not implemented")
 }
+func (UnimplementedUserServer) GetUserLookHandPickNum(context.Context, *emptypb.Empty) (*GetUserLookHandPickNumReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetUserLookHandPickNum not implemented")
+}
+func (UnimplementedUserServer) SetUserLookHandPickNum(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SetUserLookHandPickNum not implemented")
+}
 func (UnimplementedUserServer) ManagerFindUserList(context.Context, *common.ManagerFindPersonListRequest) (*common.ManagerFindPersonListReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method ManagerFindUserList not implemented")
 }
@@ -3082,6 +3114,42 @@ func _User_FindHandpickUser_Handler(srv interface{}, ctx context.Context, dec fu
 	return interceptor(ctx, in, info, handler)
 }
 
+func _User_GetUserLookHandPickNum_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.(UserServer).GetUserLookHandPickNum(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/GetUserLookHandPickNum",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).GetUserLookHandPickNum(ctx, req.(*emptypb.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _User_SetUserLookHandPickNum_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.(UserServer).SetUserLookHandPickNum(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/SetUserLookHandPickNum",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).SetUserLookHandPickNum(ctx, req.(*emptypb.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 func _User_ManagerFindUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(common.ManagerFindPersonListRequest)
 	if err := dec(in); err != nil {
@@ -4121,6 +4189,14 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "FindHandpickUser",
 			Handler:    _User_FindHandpickUser_Handler,
 		},
+		{
+			MethodName: "GetUserLookHandPickNum",
+			Handler:    _User_GetUserLookHandPickNum_Handler,
+		},
+		{
+			MethodName: "SetUserLookHandPickNum",
+			Handler:    _User_SetUserLookHandPickNum_Handler,
+		},
 		{
 			MethodName: "ManagerFindUserList",
 			Handler:    _User_ManagerFindUserList_Handler,

+ 86 - 0
api/user/user_http.pb.go

@@ -68,6 +68,7 @@ type UserHTTPServer interface {
 	GetUserFreeNum(context.Context, *emptypb.Empty) (*UserFreeNum, error)
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
 	GetUserIsLike(context.Context, *common.PersonParam) (*common.IsLike, error)
+	GetUserLookHandPickNum(context.Context, *emptypb.Empty) (*GetUserLookHandPickNumReply, error)
 	GetUserLookNum(context.Context, *emptypb.Empty) (*statistics.LookMessageReply, error)
 	GetUserRoomByPerson(context.Context, *common.PersonParam) (*chat.UserRoomInfo, error)
 	GetVipInfo(context.Context, *emptypb.Empty) (*VipInfo, error)
@@ -100,6 +101,7 @@ type UserHTTPServer interface {
 	Report(context.Context, *common.ReportChatRequest) (*emptypb.Empty, error)
 	SendMessage(context.Context, *SendMessageRequest) (*common.SendMessageReply, error)
 	SendPhoneCode(context.Context, *common.SendPhoneCodeRequest) (*emptypb.Empty, error)
+	SetUserLookHandPickNum(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	UnlockLookRecord(context.Context, *common.PersonParam) (*emptypb.Empty, error)
 	UnlockPicture(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
 	UnlockVoice(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
@@ -192,6 +194,8 @@ func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer) {
 	r.POST("/api/user/message/send", _User_SendMessage0_HTTP_Handler(srv))
 	r.POST("/api/vip/info", _User_GetVipInfo0_HTTP_Handler(srv))
 	r.POST("/api/handpick/list", _User_FindHandpickUser0_HTTP_Handler(srv))
+	r.POST("/api/user/look/handpick/num", _User_GetUserLookHandPickNum0_HTTP_Handler(srv))
+	r.POST("/api/user/look/handpick/num/set", _User_SetUserLookHandPickNum0_HTTP_Handler(srv))
 	r.POST("/api/manager/user/list", _User_ManagerFindUserList0_HTTP_Handler(srv))
 	r.POST("/api/manager/user/list/information", _User_ManagerFindInformationUserList0_HTTP_Handler(srv))
 	r.POST("/api/manager/user/list/ischeckquality", _User_ManagerFindIsCheckQualityUserList0_HTTP_Handler(srv))
@@ -2077,6 +2081,60 @@ func _User_FindHandpickUser0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Cont
 	}
 }
 
+func _User_GetUserLookHandPickNum0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in emptypb.Empty
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.user.User/GetUserLookHandPickNum")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.GetUserLookHandPickNum(ctx, req.(*emptypb.Empty))
+		})
+		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 _User_SetUserLookHandPickNum0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in emptypb.Empty
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.user.User/SetUserLookHandPickNum")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.SetUserLookHandPickNum(ctx, req.(*emptypb.Empty))
+		})
+		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 _User_ManagerFindUserList0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
 	return func(ctx http.Context) error {
 		var in common.ManagerFindPersonListRequest
@@ -2656,6 +2714,7 @@ type UserHTTPClient interface {
 	GetUserFreeNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserFreeNum, err error)
 	GetUserInfo(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserInfo, err error)
 	GetUserIsLike(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.IsLike, err error)
+	GetUserLookHandPickNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *GetUserLookHandPickNumReply, err error)
 	GetUserLookNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *statistics.LookMessageReply, err error)
 	GetUserRoomByPerson(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *chat.UserRoomInfo, err error)
 	GetVipInfo(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *VipInfo, err error)
@@ -2688,6 +2747,7 @@ type UserHTTPClient interface {
 	Report(ctx context.Context, req *common.ReportChatRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	SendMessage(ctx context.Context, req *SendMessageRequest, opts ...http.CallOption) (rsp *common.SendMessageReply, err error)
 	SendPhoneCode(ctx context.Context, req *common.SendPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
+	SetUserLookHandPickNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UnlockLookRecord(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UnlockPicture(ctx context.Context, req *common.RoomIDRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UnlockVoice(ctx context.Context, req *common.RoomIDRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
@@ -3211,6 +3271,19 @@ func (c *UserHTTPClientImpl) GetUserIsLike(ctx context.Context, in *common.Perso
 	return &out, err
 }
 
+func (c *UserHTTPClientImpl) GetUserLookHandPickNum(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*GetUserLookHandPickNumReply, error) {
+	var out GetUserLookHandPickNumReply
+	pattern := "/api/user/look/handpick/num"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/GetUserLookHandPickNum"))
+	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 *UserHTTPClientImpl) GetUserLookNum(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*statistics.LookMessageReply, error) {
 	var out statistics.LookMessageReply
 	pattern := "/api/user/look/num"
@@ -3627,6 +3700,19 @@ func (c *UserHTTPClientImpl) SendPhoneCode(ctx context.Context, in *common.SendP
 	return &out, err
 }
 
+func (c *UserHTTPClientImpl) SetUserLookHandPickNum(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*emptypb.Empty, error) {
+	var out emptypb.Empty
+	pattern := "/api/user/look/handpick/num/set"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/SetUserLookHandPickNum"))
+	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 *UserHTTPClientImpl) UnlockLookRecord(ctx context.Context, in *common.PersonParam, opts ...http.CallOption) (*emptypb.Empty, error) {
 	var out emptypb.Empty
 	pattern := "/api/user/look/unlock"

+ 11 - 1
js/api/user/user_http_pb.ts

@@ -1,6 +1,6 @@
 // @ts-ignore
 import request from '@/libs/request';
-import {UserInfo,UserBalance,UserFindChatListReply,CreateScripRequest,DeleteScripRequest,UserFindScripRequest,PersonLookScripRequest,ReplyScripRequest,KeyRequest,InformationStatus,UserRechargeRequest,PayInfo,RechargeList,VipRechargeList,FindPayOrderListRequest,PayOrderList,FindMatchingAvatarAndNumReply,UserFreeNum,SendMessageRequest,VipInfo,ManagerFindIsCheckQualityUserListRequest,ManagerMarkHighQualityUserRequest,ManagerReMarkHighQualityUserRequest,ManagerUpdateUserCreditRequest,FindRecommendHighQualityUserRequest,FindRecommendHighQualityUserReply,GetUserDBMsgFromWebsocketReply,SendMsgReduceCreditRequest,SendNewMessageUnreadReminderRequest,UpdateUserMatchedNumRequest,UpdateUserMatchedNumAndReturnUserMsgReply,GetRecommendUserDBRequest,ReportUserBlackRequest,AddUserCreditRequest,UserGetInformationAwardByActivityRequest,UserGetInformationAwardByActivityReply,FindUserVipListDBReply} from "./user_pb";
+import {UserInfo,UserBalance,UserFindChatListReply,CreateScripRequest,DeleteScripRequest,UserFindScripRequest,PersonLookScripRequest,ReplyScripRequest,KeyRequest,InformationStatus,UserRechargeRequest,PayInfo,RechargeList,VipRechargeList,FindPayOrderListRequest,PayOrderList,FindMatchingAvatarAndNumReply,UserFreeNum,SendMessageRequest,VipInfo,GetUserLookHandPickNumReply,ManagerFindIsCheckQualityUserListRequest,ManagerMarkHighQualityUserRequest,ManagerReMarkHighQualityUserRequest,ManagerUpdateUserCreditRequest,FindRecommendHighQualityUserRequest,FindRecommendHighQualityUserReply,GetUserDBMsgFromWebsocketReply,SendMsgReduceCreditRequest,SendNewMessageUnreadReminderRequest,UpdateUserMatchedNumRequest,UpdateUserMatchedNumAndReturnUserMsgReply,GetRecommendUserDBRequest,ReportUserBlackRequest,AddUserCreditRequest,UserGetInformationAwardByActivityRequest,UserGetInformationAwardByActivityReply,FindUserVipListDBReply} 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,ManagerFindPersonListRequest,ManagerFindPersonListReply,ManagerFindPersonListReply2,ManagerFindCanHandpickUserListRequest,ManagerFindCanHandpickUserListReply,ManagerSetHandpickUserRequest,ManagerSetHandpickUserOneRequest,PersonIDParam,PersonIDList,ManagerUpdatePersonVoiceRequest,ManagerUpdatePersonPicturesRequest,ManagerUpdatePersonSignatureRequest,ManagerUpdatePersonAvatarRequest,ManagerUpdatePersonNameRequest,ManagerUpdatePersonWeightRequest,ManagerUpdatePersonIsBlackRequest,PersonMsg,PersonDBReply,UpdateLastScripIDDBRequest,FindRecommendRequest,IDParam,PersonDB} from "../common/common_pb";
 import {RoomReply,UnreadNumReply,UserRoomInfo,CheckUserPartnerIsRelationshipReply,WindowInfo,GetRandomMatchingReply} from "../chat/chat_pb";
 import {LookAndLikeListReply,LookAndLikeMessageReply,LookMessageReply} from "../statistics/statistics_pb";
@@ -353,6 +353,16 @@ const UserService = {
 	const res = await request.post<{ data: HandpickPersonListReply, code: string, message: string }>('/api/handpick/list', req);
     return res.data.data;
   },
+  /**  查询用户查看精选表的次数 */
+  GetUserLookHandPickNum: async (req?: undefined) => {
+	const res = await request.post<{ data: GetUserLookHandPickNumReply, code: string, message: string }>('/api/user/look/handpick/num', req);
+    return res.data.data;
+  },
+  /**  设置用户查看精选表的次数 */
+  SetUserLookHandPickNum: async (req?: undefined) => {
+	const res = await request.post('/api/user/look/handpick/num/set', req);
+    return res.data.data;
+  },
   /**  ---manager---
 // 管理员查询用户列表 */
   ManagerFindUserList: async (req?: ManagerFindPersonListRequest) => {

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

@@ -1,5 +1,8 @@
 import {Message} from "../common/common_pb";
 
+export interface GetUserLookHandPickNumReply{
+    num?:number;
+}
 export interface FindUserVipListDBReply{
     vipMap?:any;
 }

Vissa filer visades inte eftersom för många filer har ändrats