瀏覽代碼

Merge branch 'feature/v1.1.43_ws' of BaseService/jyMicroservices into feature/v1.1.43

fuwencai 1 年之前
父節點
當前提交
165c028152

+ 1 - 1
jyBXBuyer/rpc/bxbuyer.proto

@@ -37,7 +37,7 @@ message  BuyerList {
   string  buyer = 1;//采购单位名称
   string  province = 2;//省份
   string  city = 3;//城市
-//  bool  isFollowed = 4;//是否关注
+  bool  isFollowed = 4;//是否关注
   bool  isReceived = 5;//是否已领取
   string  recId = 6;//领取id
   string buyerClass = 7;// 采购单位类型

+ 9 - 0
jyBXBuyer/rpc/model/buyerListBYEs.go

@@ -323,6 +323,10 @@ func SupplyFollowInfo(in *bxbuyer.BuyerListReq, buyerNames []string, resp *bxbuy
 	logx.Info("客户领取耗时:", time.Since(t2))
 	//客户关注
 	t3 := time.Now()
+	isFws := map[string]bool{}
+	if in.IsCheckFollow {
+		isFws = IsFollowd(buyerNames, in.UserId)
+	}
 	logx.Info("采购单位关注耗时:", time.Since(t3))
 	for _, bv := range resp.Data.List {
 		if in.IsCheckReceive {
@@ -331,6 +335,11 @@ func SupplyFollowInfo(in *bxbuyer.BuyerListReq, buyerNames []string, resp *bxbuy
 				bv.RecId = isRws[bv.Buyer]
 			}
 		}
+		if in.IsCheckFollow {
+			if isFws[bv.Buyer] {
+				bv.IsFollowed = true
+			}
+		}
 	}
 	return resp
 }

+ 16 - 9
jyBXBuyer/rpc/type/bxbuyer/bxbuyer.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.28.0
-// 	protoc        v3.19.4
+// 	protoc-gen-go v1.30.0
+// 	protoc        v3.21.12
 // source: bxbuyer.proto
 
 package bxbuyer
@@ -318,10 +318,10 @@ type BuyerList struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Buyer    string `protobuf:"bytes,1,opt,name=buyer,proto3" json:"buyer,omitempty"`       //采购单位名称
-	Province string `protobuf:"bytes,2,opt,name=province,proto3" json:"province,omitempty"` //省份
-	City     string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"`         //城市
-	//  bool  isFollowed = 4;//是否关注
+	Buyer          string  `protobuf:"bytes,1,opt,name=buyer,proto3" json:"buyer,omitempty"`                      //采购单位名称
+	Province       string  `protobuf:"bytes,2,opt,name=province,proto3" json:"province,omitempty"`                //省份
+	City           string  `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"`                        //城市
+	IsFollowed     bool    `protobuf:"varint,4,opt,name=isFollowed,proto3" json:"isFollowed,omitempty"`           //是否关注
 	IsReceived     bool    `protobuf:"varint,5,opt,name=isReceived,proto3" json:"isReceived,omitempty"`           //是否已领取
 	RecId          string  `protobuf:"bytes,6,opt,name=recId,proto3" json:"recId,omitempty"`                      //领取id
 	BuyerClass     string  `protobuf:"bytes,7,opt,name=buyerClass,proto3" json:"buyerClass,omitempty"`            // 采购单位类型
@@ -385,6 +385,13 @@ func (x *BuyerList) GetCity() string {
 	return ""
 }
 
+func (x *BuyerList) GetIsFollowed() bool {
+	if x != nil {
+		return x.IsFollowed
+	}
+	return false
+}
+
 func (x *BuyerList) GetIsReceived() bool {
 	if x != nil {
 		return x.IsReceived
@@ -544,7 +551,6 @@ func (x *RelatesInformationReq) GetPhone() string {
 	return ""
 }
 
-//
 type RelatesInformationResp struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -663,7 +669,6 @@ func (x *RelatesInformation) GetBiddingList() []*InfoList {
 	return nil
 }
 
-//
 type InfoList struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -996,12 +1001,14 @@ var file_bxbuyer_proto_rawDesc = []byte{
 	0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
 	0x26, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
 	0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73,
-	0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xd2, 0x02, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x65,
+	0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xf2, 0x02, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x65,
 	0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x01,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70,
 	0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
 	0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18,
 	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x69,
+	0x73, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
+	0x0a, 0x69, 0x73, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69,
 	0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
 	0x0a, 0x69, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72,
 	0x65, 0x63, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x63, 0x49,

+ 18 - 12
jyBXBuyer/rpc/type/bxbuyer/bxbuyer_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.19.4
+// - protoc-gen-go-grpc v1.3.0
+// - protoc             v3.21.12
 // source: bxbuyer.proto
 
 package bxbuyer
@@ -18,15 +18,21 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
+const (
+	Bxbuyer_BuyerList_FullMethodName       = "/bxbuyer.Bxbuyer/BuyerList"
+	Bxbuyer_BuyerSupplyInfo_FullMethodName = "/bxbuyer.Bxbuyer/BuyerSupplyInfo"
+	Bxbuyer_RelatesInfo_FullMethodName     = "/bxbuyer.Bxbuyer/RelatesInfo"
+)
+
 // BxbuyerClient is the client API for Bxbuyer 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 BxbuyerClient interface {
-	//采购单位搜索
+	// 采购单位搜索
 	BuyerList(ctx context.Context, in *BuyerListReq, opts ...grpc.CallOption) (*BuyerListResp, error)
 	// 采购单位搜索补充信息 招标动态数量 、历史联系人数量、项目数量、采购规模
 	BuyerSupplyInfo(ctx context.Context, in *BuyerSupplyInfoReq, opts ...grpc.CallOption) (*BuyerSupplyResp, error)
-	//采购单位画像 关联信息
+	// 采购单位画像 关联信息
 	RelatesInfo(ctx context.Context, in *RelatesInformationReq, opts ...grpc.CallOption) (*RelatesInformationResp, error)
 }
 
@@ -40,7 +46,7 @@ func NewBxbuyerClient(cc grpc.ClientConnInterface) BxbuyerClient {
 
 func (c *bxbuyerClient) BuyerList(ctx context.Context, in *BuyerListReq, opts ...grpc.CallOption) (*BuyerListResp, error) {
 	out := new(BuyerListResp)
-	err := c.cc.Invoke(ctx, "/bxbuyer.Bxbuyer/BuyerList", in, out, opts...)
+	err := c.cc.Invoke(ctx, Bxbuyer_BuyerList_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -49,7 +55,7 @@ func (c *bxbuyerClient) BuyerList(ctx context.Context, in *BuyerListReq, opts ..
 
 func (c *bxbuyerClient) BuyerSupplyInfo(ctx context.Context, in *BuyerSupplyInfoReq, opts ...grpc.CallOption) (*BuyerSupplyResp, error) {
 	out := new(BuyerSupplyResp)
-	err := c.cc.Invoke(ctx, "/bxbuyer.Bxbuyer/BuyerSupplyInfo", in, out, opts...)
+	err := c.cc.Invoke(ctx, Bxbuyer_BuyerSupplyInfo_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -58,7 +64,7 @@ func (c *bxbuyerClient) BuyerSupplyInfo(ctx context.Context, in *BuyerSupplyInfo
 
 func (c *bxbuyerClient) RelatesInfo(ctx context.Context, in *RelatesInformationReq, opts ...grpc.CallOption) (*RelatesInformationResp, error) {
 	out := new(RelatesInformationResp)
-	err := c.cc.Invoke(ctx, "/bxbuyer.Bxbuyer/RelatesInfo", in, out, opts...)
+	err := c.cc.Invoke(ctx, Bxbuyer_RelatesInfo_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -69,11 +75,11 @@ func (c *bxbuyerClient) RelatesInfo(ctx context.Context, in *RelatesInformationR
 // All implementations must embed UnimplementedBxbuyerServer
 // for forward compatibility
 type BxbuyerServer interface {
-	//采购单位搜索
+	// 采购单位搜索
 	BuyerList(context.Context, *BuyerListReq) (*BuyerListResp, error)
 	// 采购单位搜索补充信息 招标动态数量 、历史联系人数量、项目数量、采购规模
 	BuyerSupplyInfo(context.Context, *BuyerSupplyInfoReq) (*BuyerSupplyResp, error)
-	//采购单位画像 关联信息
+	// 采购单位画像 关联信息
 	RelatesInfo(context.Context, *RelatesInformationReq) (*RelatesInformationResp, error)
 	mustEmbedUnimplementedBxbuyerServer()
 }
@@ -114,7 +120,7 @@ func _Bxbuyer_BuyerList_Handler(srv interface{}, ctx context.Context, dec func(i
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/bxbuyer.Bxbuyer/BuyerList",
+		FullMethod: Bxbuyer_BuyerList_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxbuyerServer).BuyerList(ctx, req.(*BuyerListReq))
@@ -132,7 +138,7 @@ func _Bxbuyer_BuyerSupplyInfo_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/bxbuyer.Bxbuyer/BuyerSupplyInfo",
+		FullMethod: Bxbuyer_BuyerSupplyInfo_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxbuyerServer).BuyerSupplyInfo(ctx, req.(*BuyerSupplyInfoReq))
@@ -150,7 +156,7 @@ func _Bxbuyer_RelatesInfo_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/bxbuyer.Bxbuyer/RelatesInfo",
+		FullMethod: Bxbuyer_RelatesInfo_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxbuyerServer).RelatesInfo(ctx, req.(*RelatesInformationReq))