Jelajahi Sumber

接待员卡片以及领取奖励

wfz 3 tahun lalu
induk
melakukan
d3c8f00ed7

File diff ditekan karena terlalu besar
+ 475 - 273
api/chat/chat.pb.go


+ 19 - 0
api/chat/chat.proto

@@ -31,6 +31,25 @@ service Chat {
   rpc SetBlackChat (SetBlackChatParam) returns (google.protobuf.Empty){};
   // 拉黑
   rpc Report (common.ReportRequest) returns (google.protobuf.Empty){};
+  // 接待员领取开通奖励
+  rpc PartnerGetAward (PartnerGetAwardRequest) returns (PartnerGetAwardReply){};
+  // 房间信息
+  rpc FindRoomCardMsg (FindRoomCardMsgRequest) returns (common.RoomChatMsg){};
+}
+
+message FindRoomCardMsgRequest{
+  string userIdentifyId = 1; // 身份ID
+  string partnerIdentifyId = 2; // 身份ID
+}
+
+message PartnerGetAwardReply {
+ int64 balance = 1;
+}
+
+message PartnerGetAwardRequest{
+  string userIdentifyId = 1; // 身份ID
+  string partnerIdentifyId = 2; // 身份ID
+  string awardType = 3;
 }
 
 message PartnerFindRoomListRequest {

+ 76 - 0
api/chat/chat_grpc.pb.go

@@ -39,6 +39,10 @@ type ChatClient interface {
 	SetBlackChat(ctx context.Context, in *SetBlackChatParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 拉黑
 	Report(ctx context.Context, in *common.ReportRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 接待员领取开通奖励
+	PartnerGetAward(ctx context.Context, in *PartnerGetAwardRequest, opts ...grpc.CallOption) (*PartnerGetAwardReply, error)
+	// 房间信息
+	FindRoomCardMsg(ctx context.Context, in *FindRoomCardMsgRequest, opts ...grpc.CallOption) (*common.RoomChatMsg, error)
 }
 
 type chatClient struct {
@@ -139,6 +143,24 @@ func (c *chatClient) Report(ctx context.Context, in *common.ReportRequest, opts
 	return out, nil
 }
 
+func (c *chatClient) PartnerGetAward(ctx context.Context, in *PartnerGetAwardRequest, opts ...grpc.CallOption) (*PartnerGetAwardReply, error) {
+	out := new(PartnerGetAwardReply)
+	err := c.cc.Invoke(ctx, "/api.chat.Chat/PartnerGetAward", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *chatClient) FindRoomCardMsg(ctx context.Context, in *FindRoomCardMsgRequest, opts ...grpc.CallOption) (*common.RoomChatMsg, error) {
+	out := new(common.RoomChatMsg)
+	err := c.cc.Invoke(ctx, "/api.chat.Chat/FindRoomCardMsg", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // ChatServer is the server API for Chat service.
 // All implementations must embed UnimplementedChatServer
 // for forward compatibility
@@ -162,6 +184,10 @@ type ChatServer interface {
 	SetBlackChat(context.Context, *SetBlackChatParam) (*emptypb.Empty, error)
 	// 拉黑
 	Report(context.Context, *common.ReportRequest) (*emptypb.Empty, error)
+	// 接待员领取开通奖励
+	PartnerGetAward(context.Context, *PartnerGetAwardRequest) (*PartnerGetAwardReply, error)
+	// 房间信息
+	FindRoomCardMsg(context.Context, *FindRoomCardMsgRequest) (*common.RoomChatMsg, error)
 	mustEmbedUnimplementedChatServer()
 }
 
@@ -199,6 +225,12 @@ func (UnimplementedChatServer) SetBlackChat(context.Context, *SetBlackChatParam)
 func (UnimplementedChatServer) Report(context.Context, *common.ReportRequest) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method Report not implemented")
 }
+func (UnimplementedChatServer) PartnerGetAward(context.Context, *PartnerGetAwardRequest) (*PartnerGetAwardReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method PartnerGetAward not implemented")
+}
+func (UnimplementedChatServer) FindRoomCardMsg(context.Context, *FindRoomCardMsgRequest) (*common.RoomChatMsg, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method FindRoomCardMsg not implemented")
+}
 func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
 
 // UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
@@ -392,6 +424,42 @@ func _Chat_Report_Handler(srv interface{}, ctx context.Context, dec func(interfa
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Chat_PartnerGetAward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PartnerGetAwardRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ChatServer).PartnerGetAward(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.chat.Chat/PartnerGetAward",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ChatServer).PartnerGetAward(ctx, req.(*PartnerGetAwardRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Chat_FindRoomCardMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(FindRoomCardMsgRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ChatServer).FindRoomCardMsg(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.chat.Chat/FindRoomCardMsg",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ChatServer).FindRoomCardMsg(ctx, req.(*FindRoomCardMsgRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -439,6 +507,14 @@ var Chat_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "Report",
 			Handler:    _Chat_Report_Handler,
 		},
+		{
+			MethodName: "PartnerGetAward",
+			Handler:    _Chat_PartnerGetAward_Handler,
+		},
+		{
+			MethodName: "FindRoomCardMsg",
+			Handler:    _Chat_FindRoomCardMsg_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "chat.proto",

File diff ditekan karena terlalu besar
+ 238 - 95
api/common/common.pb.go


+ 29 - 2
api/common/common.proto

@@ -55,6 +55,22 @@ message ChatCardInfo{
   bool isFinishInformation = 14;//是否完善资料
 }
 
+message PartnerChatCardInfo{
+  string id = 1; // id
+  string nickname = 2;// 昵称
+  string avatarUrl =3;// 头像链接
+  int64 sex = 4;// 性别
+  int64 age = 6; // 年龄
+  string type = 7;// 类型(新客:new,付费:pay)
+  int64 benefit = 8;// 收益
+  bool isUnlockVoice = 9;// 是否解锁语音
+  bool isUnlockPicture = 10;// 是否解锁图片
+  int64 unlockVoicePrice = 11;// 解锁语音奖励
+  int64 unlockPicturePrice = 12;// 解锁图片奖励
+  bool isGetVoicePrice = 13; // 是否领取了语音奖励
+  bool isGetPicturePrice = 14; // 是否领取了图片奖励
+}
+
 message UserIDParam {
   string userId = 1;
 }
@@ -368,7 +384,7 @@ message ReportChatRequest{
   string reportedPersonId = 4; // 被举报的人的ID
   string reportedPersonType = 5; // 被举报的人的类型
   string contactInformation = 6; // 联系方式
-  string picture = 7;  // 图片
+  repeated string picture = 7;  // 图片
   repeated string category = 8; // 类别
 }
 
@@ -380,7 +396,18 @@ message ReportRequest{
   string reportedPersonId = 5; // 被举报的人的ID
   string reportedPersonType = 6; // 被举报的人的类型
   string contactInformation = 7; // 联系方式
-  string picture = 8;  // 图片
+  repeated string picture = 8;  // 图片
   repeated string category = 9; // 类别
   string reportMsg = 10;// 举报的详情
+}
+
+message RoomChatMsg{
+  string type = 7;// 类型(新客:new,付费:pay)
+  int64 benefit = 8;// 收益
+  bool isUnlockVoice = 9;// 是否解锁语音
+  bool isUnlockPicture = 10;// 是否解锁图片
+  int64 unlockVoicePrice = 11;// 解锁语音奖励
+  int64 unlockPicturePrice = 12;// 解锁图片奖励
+  bool isGetVoicePrice = 13; // 是否领取了语音奖励
+  bool isGetPicturePrice = 14; // 是否领取了图片奖励
 }

File diff ditekan karena terlalu besar
+ 436 - 358
api/partner/partner.pb.go


+ 14 - 1
api/partner/partner.proto

@@ -206,7 +206,7 @@ service Partner {
     };
   };
   // 接待员获取聊天对象的资料卡片
-  rpc PartnerGetChatCard(common.PersonParam) returns (common.ChatCardInfo){
+  rpc PartnerGetChatCard(common.PersonParam) returns (common.PartnerChatCardInfo){
     option (google.api.http) = {
       post: "/api/partner/chat/card",
       body:"*"
@@ -247,6 +247,19 @@ service Partner {
       body:"*"
     };
   };
+  // 接待员领取开通奖励
+  rpc PartnerGetAward (PartnerGetAwardRequest) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/partner/chat/award",
+      body:"*"
+    };
+  };
+}
+
+message PartnerGetAwardRequest{
+  string awardType = 1;// 奖励类型
+  string personID = 2; // 查询目标的ID
+  string personType = 3; // 类型
 }
 
 message LevelTable{

+ 43 - 5
api/partner/partner_grpc.pb.go

@@ -84,7 +84,7 @@ type PartnerClient interface {
 	// 表情包分类名
 	FindMemeTitle(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.MemeTitleList, error)
 	// 接待员获取聊天对象的资料卡片
-	PartnerGetChatCard(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.ChatCardInfo, error)
+	PartnerGetChatCard(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.PartnerChatCardInfo, error)
 	// 聊天话题分类名
 	FindChatTopicTitle(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.MemeTitleList, error)
 	// 接待员关注某人
@@ -95,6 +95,8 @@ type PartnerClient interface {
 	Report(ctx context.Context, in *common.ReportChatRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 拉黑某人
 	PartnerSetBlackChat(ctx context.Context, in *common.RoomIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 接待员领取开通奖励
+	PartnerGetAward(ctx context.Context, in *PartnerGetAwardRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 }
 
 type partnerClient struct {
@@ -393,8 +395,8 @@ func (c *partnerClient) FindMemeTitle(ctx context.Context, in *emptypb.Empty, op
 	return out, nil
 }
 
-func (c *partnerClient) PartnerGetChatCard(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.ChatCardInfo, error) {
-	out := new(common.ChatCardInfo)
+func (c *partnerClient) PartnerGetChatCard(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.PartnerChatCardInfo, error) {
+	out := new(common.PartnerChatCardInfo)
 	err := c.cc.Invoke(ctx, "/api.partner.Partner/PartnerGetChatCard", in, out, opts...)
 	if err != nil {
 		return nil, err
@@ -447,6 +449,15 @@ func (c *partnerClient) PartnerSetBlackChat(ctx context.Context, in *common.Room
 	return out, nil
 }
 
+func (c *partnerClient) PartnerGetAward(ctx context.Context, in *PartnerGetAwardRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.partner.Partner/PartnerGetAward", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // PartnerServer is the server API for Partner service.
 // All implementations must embed UnimplementedPartnerServer
 // for forward compatibility
@@ -513,7 +524,7 @@ type PartnerServer interface {
 	// 表情包分类名
 	FindMemeTitle(context.Context, *emptypb.Empty) (*common.MemeTitleList, error)
 	// 接待员获取聊天对象的资料卡片
-	PartnerGetChatCard(context.Context, *common.PersonParam) (*common.ChatCardInfo, error)
+	PartnerGetChatCard(context.Context, *common.PersonParam) (*common.PartnerChatCardInfo, error)
 	// 聊天话题分类名
 	FindChatTopicTitle(context.Context, *emptypb.Empty) (*common.MemeTitleList, error)
 	// 接待员关注某人
@@ -524,6 +535,8 @@ type PartnerServer interface {
 	Report(context.Context, *common.ReportChatRequest) (*emptypb.Empty, error)
 	// 拉黑某人
 	PartnerSetBlackChat(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
+	// 接待员领取开通奖励
+	PartnerGetAward(context.Context, *PartnerGetAwardRequest) (*emptypb.Empty, error)
 	mustEmbedUnimplementedPartnerServer()
 }
 
@@ -627,7 +640,7 @@ func (UnimplementedPartnerServer) RandomSwiftMessage(context.Context, *common.Ra
 func (UnimplementedPartnerServer) FindMemeTitle(context.Context, *emptypb.Empty) (*common.MemeTitleList, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindMemeTitle not implemented")
 }
-func (UnimplementedPartnerServer) PartnerGetChatCard(context.Context, *common.PersonParam) (*common.ChatCardInfo, error) {
+func (UnimplementedPartnerServer) PartnerGetChatCard(context.Context, *common.PersonParam) (*common.PartnerChatCardInfo, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method PartnerGetChatCard not implemented")
 }
 func (UnimplementedPartnerServer) FindChatTopicTitle(context.Context, *emptypb.Empty) (*common.MemeTitleList, error) {
@@ -645,6 +658,9 @@ func (UnimplementedPartnerServer) Report(context.Context, *common.ReportChatRequ
 func (UnimplementedPartnerServer) PartnerSetBlackChat(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method PartnerSetBlackChat not implemented")
 }
+func (UnimplementedPartnerServer) PartnerGetAward(context.Context, *PartnerGetAwardRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method PartnerGetAward not implemented")
+}
 func (UnimplementedPartnerServer) mustEmbedUnimplementedPartnerServer() {}
 
 // UnsafePartnerServer may be embedded to opt out of forward compatibility for this service.
@@ -1342,6 +1358,24 @@ func _Partner_PartnerSetBlackChat_Handler(srv interface{}, ctx context.Context,
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Partner_PartnerGetAward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PartnerGetAwardRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(PartnerServer).PartnerGetAward(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.partner.Partner/PartnerGetAward",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(PartnerServer).PartnerGetAward(ctx, req.(*PartnerGetAwardRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Partner_ServiceDesc is the grpc.ServiceDesc for Partner service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -1501,6 +1535,10 @@ var Partner_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "PartnerSetBlackChat",
 			Handler:    _Partner_PartnerSetBlackChat_Handler,
 		},
+		{
+			MethodName: "PartnerGetAward",
+			Handler:    _Partner_PartnerGetAward_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "partner.proto",

+ 47 - 4
api/partner/partner_http.pb.go

@@ -50,7 +50,8 @@ type PartnerHTTPServer interface {
 	GetPartnerIsLike(context.Context, *common.PersonParam) (*common.IsLike, error)
 	GetPartnerLookNum(context.Context, *emptypb.Empty) (*statistics.LookMessageReply, error)
 	GetPartnerMessage(context.Context, *emptypb.Empty) (*PartnerMessage, error)
-	PartnerGetChatCard(context.Context, *common.PersonParam) (*common.ChatCardInfo, error)
+	PartnerGetAward(context.Context, *PartnerGetAwardRequest) (*emptypb.Empty, error)
+	PartnerGetChatCard(context.Context, *common.PersonParam) (*common.PartnerChatCardInfo, error)
 	PartnerGetHomeInfo(context.Context, *common.PersonParam) (*common.HomeInfo, error)
 	PartnerGetPersonLikedAndLooked(context.Context, *common.PersonParam) (*common.LookedAndLikedNum, error)
 	PartnerLike(context.Context, *common.PersonParam) (*emptypb.Empty, error)
@@ -98,6 +99,7 @@ func RegisterPartnerHTTPServer(s *http.Server, srv PartnerHTTPServer) {
 	r.POST("/api/partner/unlike", _Partner_PartnerUnLike0_HTTP_Handler(srv))
 	r.POST("/api/partner/report", _Partner_Report0_HTTP_Handler(srv))
 	r.POST("/api/partner/set/black", _Partner_PartnerSetBlackChat0_HTTP_Handler(srv))
+	r.POST("/api/partner/chat/award", _Partner_PartnerGetAward0_HTTP_Handler(srv))
 }
 
 func _Partner_GetPartnerInfo0_HTTP_Handler(srv PartnerHTTPServer) func(ctx http.Context) error {
@@ -964,6 +966,33 @@ func _Partner_PartnerSetBlackChat0_HTTP_Handler(srv PartnerHTTPServer) func(ctx
 	}
 }
 
+func _Partner_PartnerGetAward0_HTTP_Handler(srv PartnerHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in PartnerGetAwardRequest
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.partner.Partner/PartnerGetAward")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.PartnerGetAward(ctx, req.(*PartnerGetAwardRequest))
+		})
+		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)
+	}
+}
+
 type PartnerHTTPClient interface {
 	CheckPhoneCode(ctx context.Context, req *common.CheckPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	CreateUserPartnerRoom(ctx context.Context, req *common.PersonIDParam, opts ...http.CallOption) (rsp *chat.RoomReply, err error)
@@ -985,7 +1014,8 @@ type PartnerHTTPClient interface {
 	GetPartnerIsLike(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.IsLike, err error)
 	GetPartnerLookNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *statistics.LookMessageReply, err error)
 	GetPartnerMessage(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *PartnerMessage, err error)
-	PartnerGetChatCard(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.ChatCardInfo, err error)
+	PartnerGetAward(ctx context.Context, req *PartnerGetAwardRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
+	PartnerGetChatCard(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.PartnerChatCardInfo, err error)
 	PartnerGetHomeInfo(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.HomeInfo, err error)
 	PartnerGetPersonLikedAndLooked(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.LookedAndLikedNum, err error)
 	PartnerLike(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
@@ -1267,8 +1297,21 @@ func (c *PartnerHTTPClientImpl) GetPartnerMessage(ctx context.Context, in *empty
 	return &out, err
 }
 
-func (c *PartnerHTTPClientImpl) PartnerGetChatCard(ctx context.Context, in *common.PersonParam, opts ...http.CallOption) (*common.ChatCardInfo, error) {
-	var out common.ChatCardInfo
+func (c *PartnerHTTPClientImpl) PartnerGetAward(ctx context.Context, in *PartnerGetAwardRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
+	var out emptypb.Empty
+	pattern := "/api/partner/chat/award"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.partner.Partner/PartnerGetAward"))
+	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 *PartnerHTTPClientImpl) PartnerGetChatCard(ctx context.Context, in *common.PersonParam, opts ...http.CallOption) (*common.PartnerChatCardInfo, error) {
+	var out common.PartnerChatCardInfo
 	pattern := "/api/partner/chat/card"
 	path := binding.EncodeURL(pattern, in, false)
 	opts = append(opts, http.Operation("/api.partner.Partner/PartnerGetChatCard"))

+ 5 - 0
define/chat.go

@@ -7,6 +7,11 @@ var (
 	TypeUserPay = "pay" // 付费
 )
 
+var (
+	VoiceAward   = int64(20)
+	PictureAward = int64(40)
+)
+
 var (
 	ChatMessageSuccess   = "success"   // 成功
 	ChatMessageFail      = "fail"      // 失败

+ 1 - 0
errors/chat.go

@@ -7,4 +7,5 @@ var (
 	ErrorRoomNotBelongPerson    = codes.Error(40002, "聊天不属于该用户")
 	ErrorRoomNotMatchSendPerson = codes.Error(40003, "发送者信息与房间不匹配")
 	ErrorBlack                  = codes.Error(40004, "对方拉黑了你")
+	ErrorChatType               = codes.Error(40005, "消息类型不正确")
 )

+ 16 - 0
js/api/chat/chat_pb.ts

@@ -1,3 +1,19 @@
+export interface FindRoomCardMsgRequest{
+    /**  身份ID */
+    userIdentifyId?:string;
+    /**  身份ID */
+    partnerIdentifyId?:string;
+}
+export interface PartnerGetAwardReply{
+    balance?:number;
+}
+export interface PartnerGetAwardRequest{
+    /**  身份ID */
+    userIdentifyId?:string;
+    /**  身份ID */
+    partnerIdentifyId?:string;
+    awardType?:string;
+}
 export interface PartnerFindRoomListRequest{
     nextId?:number;
     offset?:number;

+ 48 - 2
js/api/common/common_pb.ts

@@ -52,6 +52,34 @@ export interface ChatCardInfo{
     /** 是否完善资料 */
     isFinishInformation?:boolean;
 }
+export interface PartnerChatCardInfo{
+    /**  id */
+    id?:string;
+    /**  昵称 */
+    nickname?:string;
+    /**  头像链接 */
+    avatarUrl?:string;
+    /**  性别 */
+    sex?:number;
+    /**  年龄 */
+    age?:number;
+    /**  类型(新客:new,付费:pay) */
+    type?:string;
+    /**  收益 */
+    benefit?:number;
+    /**  是否解锁语音 */
+    isUnlockVoice?:boolean;
+    /**  是否解锁图片 */
+    isUnlockPicture?:boolean;
+    /**  解锁语音奖励 */
+    unlockVoicePrice?:number;
+    /**  解锁图片奖励 */
+    unlockPicturePrice?:number;
+    /**  是否领取了语音奖励 */
+    isGetVoicePrice?:boolean;
+    /**  是否领取了图片奖励 */
+    isGetPicturePrice?:boolean;
+}
 export interface UserIDParam{
     userId?:string;
 }
@@ -457,7 +485,7 @@ export interface ReportChatRequest{
     /**  联系方式 */
     contactInformation?:string;
     /**  图片 */
-    picture?:string;
+    picture?:Array<string>;
     /**  类别 */
     category?:Array<string>;
 }
@@ -477,10 +505,28 @@ export interface ReportRequest{
     /**  联系方式 */
     contactInformation?:string;
     /**  图片 */
-    picture?:string;
+    picture?:Array<string>;
     /**  类别 */
     category?:Array<string>;
     /**  举报的详情 */
     reportMsg?:string;
 }
+export interface RoomChatMsg{
+    /**  类型(新客:new,付费:pay) */
+    type?:string;
+    /**  收益 */
+    benefit?:number;
+    /**  是否解锁语音 */
+    isUnlockVoice?:boolean;
+    /**  是否解锁图片 */
+    isUnlockPicture?:boolean;
+    /**  解锁语音奖励 */
+    unlockVoicePrice?:number;
+    /**  解锁图片奖励 */
+    unlockPicturePrice?:number;
+    /**  是否领取了语音奖励 */
+    isGetVoicePrice?:boolean;
+    /**  是否领取了图片奖励 */
+    isGetPicturePrice?:boolean;
+}
 

+ 8 - 3
js/api/partner/partner_http_pb.ts

@@ -1,7 +1,7 @@
 // @ts-ignore
 import request from '@/libs/request';
-import {PartnerInfo,PartnerBalance,PartnerDBBalance,PartnerMessage,GetRandomPartnerRequest,RandomPartnerInfo,AddPartnerBalanceRequest,LevelTable} from "./partner_pb";
-import {PartnerIDParam,PersonIDParam,PersonMsg,SendPhoneCodeRequest,CheckPhoneCodeRequest,AddFriendMessageInfo,UpdateInformationRequest,PersonParam,HomeInfo,LookedAndLikedNum,ListPageRequest,PersonIDList,PersonDBReply,WxConfReq,WxConfResponse,SexReq,TagListReply,ListPage2Request,OnlinePersonListReply,FindChatRecordListRequest,ChatRecordListReply,FindChatRoomMsgRequest,ChatRoomMsg,IsLike,MemeRequest,MemeList,FindChatTopicRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex,MemeTitleList,ChatCardInfo,ReportChatRequest,RoomIDRequest} from "../common/common_pb";
+import {PartnerInfo,PartnerBalance,PartnerDBBalance,PartnerMessage,GetRandomPartnerRequest,RandomPartnerInfo,AddPartnerBalanceRequest,LevelTable,PartnerGetAwardRequest} from "./partner_pb";
+import {PartnerIDParam,PersonIDParam,PersonMsg,SendPhoneCodeRequest,CheckPhoneCodeRequest,AddFriendMessageInfo,UpdateInformationRequest,PersonParam,HomeInfo,LookedAndLikedNum,ListPageRequest,PersonIDList,PersonDBReply,WxConfReq,WxConfResponse,SexReq,TagListReply,ListPage2Request,OnlinePersonListReply,FindChatRecordListRequest,ChatRecordListReply,FindChatRoomMsgRequest,ChatRoomMsg,IsLike,MemeRequest,MemeList,FindChatTopicRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex,MemeTitleList,PartnerChatCardInfo,ReportChatRequest,RoomIDRequest} from "../common/common_pb";
 import {LookMessageReply,LookAndLikeListReply} from "../statistics/statistics_pb";
 import {RoomReply,PartnerFindRoomListReply} from "../chat/chat_pb";
 
@@ -138,7 +138,7 @@ const PartnerService = {
   },
   /**  接待员获取聊天对象的资料卡片 */
   PartnerGetChatCard: async (req?: PersonParam) => {
-	const res = await request.post<{ data: ChatCardInfo, code: string, message: string }>('/api/partner/chat/card', req);
+	const res = await request.post<{ data: PartnerChatCardInfo, code: string, message: string }>('/api/partner/chat/card', req);
     return res.data.data;
   },
   /**  聊天话题分类名 */
@@ -166,6 +166,11 @@ const PartnerService = {
 	const res = await request.post('/api/partner/set/black', req);
     return res.data.data;
   },
+  /**  接待员领取开通奖励 */
+  PartnerGetAward: async (req?: PartnerGetAwardRequest) => {
+	const res = await request.post('/api/partner/chat/award', req);
+    return res.data.data;
+  },
 
 };
 

+ 8 - 0
js/api/partner/partner_pb.ts

@@ -1,3 +1,11 @@
+export interface PartnerGetAwardRequest{
+    /**  奖励类型 */
+    awardType?:string;
+    /**  查询目标的ID */
+    personID?:string;
+    /**  类型 */
+    personType?:string;
+}
 export interface LevelTable{
     list?:Array<LevelInfo>;
 }

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini