Browse Source

feat:采购单位画像 相关数据

wangshan 2 năm trước cách đây
mục cha
commit
21fbdbbeb6

+ 25 - 0
jyBXBuyer/api/bxbuyer.api

@@ -33,8 +33,33 @@ type (
 		Err_msg  string      `json:"error_msg"`
 		Data     interface{} `json:"data"`
 	}
+	//用户基本信息
+	baseParam {
+		EntId        int64  `header:"entId,optional"`        // 企业id
+		EntUserId    int64  `header:"entUserId,optional"`    // 企业下用户id
+		PositionType int64  `header:"positionType,optional"` // 职位类型 0个人 1企业
+		PositionId   int64  `header:"positionId,optional"`   //职位id
+		AccountId    int64  `header:"accountId,optional"`    //账户id
+		MgoUserId    string `header:"mgoUserId,optional"`    //原userId
+		AppId        string `header:"appId,optional"`        //剑鱼10000
+		UserId       string `header:"userId,optional"`       //用户id
+		NewUserId    int64  `header:"newUserId,optional"`    //base_user_id
+		EntAccountId int64  `header:"entAccountId,optional"` //企业账户id
+		Phone        string `header:"phone,optional"`
+	}
+	//采购单位关联信息
+	relatesInformationReq {
+		baseParam
+		BiddingCount int    `json:"biddingCount,optional"` //关联招标信息数量---根据采购单位
+		BuyerCount   int    `json:"buyerCount,optional"`   //关联采购单位信息---根据地区
+		Buyer        string `json:"buyer,optional"`        //采购单位
+		Area         string `json:"area,optional"`         //地区
+		City         string `json:"city,optional"`         //城市
+	}
 )
 service bxbuyer-api {
 	@handler buyerSearchList
 	post /jybx/buyer/:userType/buyerList(buyerListReq) returns (commonResp)
+	@handler relatesInformation
+	post /jybx/buyer/relates/information(relatesInformationReq) returns (commonResp)
 }

+ 28 - 0
jyBXBuyer/api/internal/handler/relatesInformationHandler.go

@@ -0,0 +1,28 @@
+package handler
+
+import (
+	"net/http"
+
+	"github.com/zeromicro/go-zero/rest/httpx"
+	"jyBXBuyer/api/internal/logic"
+	"jyBXBuyer/api/internal/svc"
+	"jyBXBuyer/api/internal/types"
+)
+
+func relatesInformationHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.RelatesInformationReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewRelatesInformationLogic(r.Context(), svcCtx, r)
+		resp, err := l.RelatesInformation(&req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 5 - 0
jyBXBuyer/api/internal/handler/routes.go

@@ -17,6 +17,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/buyer/:userType/buyerList",
 				Handler: buyerSearchListHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/buyer/relates/information",
+				Handler: relatesInformationHandler(serverCtx),
+			},
 		},
 	)
 }

+ 0 - 1
jyBXBuyer/api/internal/logic/buyerSearchListLogic.go

@@ -62,5 +62,4 @@ func (l *BuyerSearchListLogic) BuyerSearchList(req *types.BuyerListReq) (resp *t
 		Err_msg:  res.ErrMsg,
 		Data:     res.Data,
 	}, nil
-	return
 }

+ 53 - 0
jyBXBuyer/api/internal/logic/relatesInformationLogic.go

@@ -0,0 +1,53 @@
+package logic
+
+import (
+	"context"
+	"jyBXBuyer/rpc/type/bxbuyer"
+	"net/http"
+
+	"jyBXBuyer/api/internal/svc"
+	"jyBXBuyer/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type RelatesInformationLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewRelatesInformationLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *RelatesInformationLogic {
+	return &RelatesInformationLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *RelatesInformationLogic) RelatesInformation(req *types.RelatesInformationReq) (resp *types.CommonResp, err error) {
+	res, err0 := l.svcCtx.Buyer.RelatesInfo(l.ctx, &bxbuyer.RelatesInformationReq{
+		Area:         req.Area,
+		City:         req.City,
+		BiddingCount: int64(req.BiddingCount),
+		BuyerCount:   int64(req.BuyerCount),
+		Buyer:        req.Buyer,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		Phone:        req.Phone,
+	})
+	if err0 != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "错误",
+			Data:     nil,
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+}

+ 23 - 0
jyBXBuyer/api/internal/types/types.go

@@ -23,3 +23,26 @@ type CommonResp struct {
 	Err_msg  string      `json:"error_msg"`
 	Data     interface{} `json:"data"`
 }
+
+type BaseParam struct {
+	EntId        int64  `header:"entId,optional"`        // 企业id
+	EntUserId    int64  `header:"entUserId,optional"`    // 企业下用户id
+	PositionType int64  `header:"positionType,optional"` // 职位类型 0个人 1企业
+	PositionId   int64  `header:"positionId,optional"`   //职位id
+	AccountId    int64  `header:"accountId,optional"`    //账户id
+	MgoUserId    string `header:"mgoUserId,optional"`    //原userId
+	AppId        string `header:"appId,optional"`        //剑鱼10000
+	UserId       string `header:"userId,optional"`       //用户id
+	NewUserId    int64  `header:"newUserId,optional"`    //base_user_id
+	EntAccountId int64  `header:"entAccountId,optional"` //企业账户id
+	Phone        string `header:"phone,optional"`
+}
+
+type RelatesInformationReq struct {
+	BaseParam
+	BiddingCount int    `json:"biddingCount,optional"` //关联招标信息数量---根据采购单位
+	BuyerCount   int    `json:"buyerCount,optional"`   //关联采购单位信息---根据地区
+	Buyer        string `json:"buyer,optional"`        //采购单位
+	Area         string `json:"area,optional"`         //地区
+	City         string `json:"city,optional"`         //城市
+}

+ 29 - 0
jyBXBuyer/rpc/bxbuyer.proto

@@ -45,7 +45,36 @@ message  BuyerList {
   string  recId = 8;//领取id
 }
 
+message relatesInformationReq {
+  int64  biddingCount = 1;
+  int64  buyerCount=2;
+  string buyer = 3;
+  string area = 4;
+  string city = 5;
+  int64  positionId = 6; // 职位id
+  int64  positionType =7;// 职位类型 0个人 1企业
+  string phone = 8 ;// 手机号
+}
+//
+message relatesInformationResp{
+  int64 err_code = 1;
+  string err_msg = 2;
+  relatesInformation data = 3;
+}
+message relatesInformation {
+  repeated infoList buyerList =1;//采购单位信息
+  repeated infoList biddingList = 2;//类似采购单位招标信息
+}
+//
+message infoList {
+  string name =1;//采购单位名称||信息标题
+  string id = 2;//信息类型id
+  string publishTime = 3;
+}
+
 service Bxbuyer {
   //采购单位搜索
   rpc BuyerList(BuyerListReq) returns(BuyerListResp);
+  //采购单位画像 关联信息
+  rpc RelatesInfo(relatesInformationReq) returns(relatesInformationResp);
 }

+ 16 - 4
jyBXBuyer/rpc/bxbuyer/bxbuyer.go

@@ -13,14 +13,20 @@ import (
 )
 
 type (
-	BuyerData     = bxbuyer.BuyerData
-	BuyerList     = bxbuyer.BuyerList
-	BuyerListReq  = bxbuyer.BuyerListReq
-	BuyerListResp = bxbuyer.BuyerListResp
+	BuyerData              = bxbuyer.BuyerData
+	BuyerList              = bxbuyer.BuyerList
+	BuyerListReq           = bxbuyer.BuyerListReq
+	BuyerListResp          = bxbuyer.BuyerListResp
+	InfoList               = bxbuyer.InfoList
+	RelatesInformation     = bxbuyer.RelatesInformation
+	RelatesInformationReq  = bxbuyer.RelatesInformationReq
+	RelatesInformationResp = bxbuyer.RelatesInformationResp
 
 	Bxbuyer interface {
 		// 采购单位搜索
 		BuyerList(ctx context.Context, in *BuyerListReq, opts ...grpc.CallOption) (*BuyerListResp, error)
+		// 采购单位画像 关联信息
+		RelatesInfo(ctx context.Context, in *RelatesInformationReq, opts ...grpc.CallOption) (*RelatesInformationResp, error)
 	}
 
 	defaultBxbuyer struct {
@@ -39,3 +45,9 @@ func (m *defaultBxbuyer) BuyerList(ctx context.Context, in *BuyerListReq, opts .
 	client := bxbuyer.NewBxbuyerClient(m.cli.Conn())
 	return client.BuyerList(ctx, in, opts...)
 }
+
+// 采购单位画像 关联信息
+func (m *defaultBxbuyer) RelatesInfo(ctx context.Context, in *RelatesInformationReq, opts ...grpc.CallOption) (*RelatesInformationResp, error) {
+	client := bxbuyer.NewBxbuyerClient(m.cli.Conn())
+	return client.RelatesInfo(ctx, in, opts...)
+}

+ 1 - 1
jyBXBuyer/rpc/etc/db.yaml

@@ -10,7 +10,7 @@ redis:
     addr:
         - other=192.168.3.206:1712
 es:
-    addr: http://192.168.3.206:9800
+    addr: http://192.168.3.241:9205
     size: 30
     version: v7
     userName: ""

+ 28 - 0
jyBXBuyer/rpc/internal/logic/relatesinfologic.go

@@ -0,0 +1,28 @@
+package logic
+
+import (
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+	"jyBXBuyer/rpc/internal/svc"
+	"jyBXBuyer/rpc/service"
+	"jyBXBuyer/rpc/type/bxbuyer"
+)
+
+type RelatesInfoLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewRelatesInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RelatesInfoLogic {
+	return &RelatesInfoLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 采购单位画像 关联信息
+func (l *RelatesInfoLogic) RelatesInfo(in *bxbuyer.RelatesInformationReq) (*bxbuyer.RelatesInformationResp, error) {
+	return service.GetRelatesInfo(in), nil
+}

+ 6 - 0
jyBXBuyer/rpc/internal/server/bxbuyerserver.go

@@ -27,3 +27,9 @@ func (s *BxbuyerServer) BuyerList(ctx context.Context, in *bxbuyer.BuyerListReq)
 	l := logic.NewBuyerListLogic(ctx, s.svcCtx)
 	return l.BuyerList(in)
 }
+
+// 采购单位画像 关联信息
+func (s *BxbuyerServer) RelatesInfo(ctx context.Context, in *bxbuyer.RelatesInformationReq) (*bxbuyer.RelatesInformationResp, error) {
+	l := logic.NewRelatesInfoLogic(ctx, s.svcCtx)
+	return l.RelatesInfo(in)
+}

+ 78 - 0
jyBXBuyer/rpc/service/service.go

@@ -0,0 +1,78 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	elastic "app.yhyue.com/moapp/jybase/es"
+	"fmt"
+	"jyBXBuyer/rpc/type/bxbuyer"
+	"log"
+	"math/rand"
+	"time"
+)
+
+func GetRelatesInfo(in *bxbuyer.RelatesInformationReq) *bxbuyer.RelatesInformationResp {
+	relatesInfo := &bxbuyer.RelatesInformationResp{Data: &bxbuyer.RelatesInformation{BiddingList: []*bxbuyer.InfoList{}, BuyerList: []*bxbuyer.InfoList{}}}
+	if err := Checking(in); err != nil {
+		relatesInfo.ErrCode = -1
+		relatesInfo.ErrMsg = err.Error()
+		return relatesInfo
+	}
+	//获取随机数
+	// 使用当前时间作为随机数生成器的种子
+	rand.Seed(time.Now().UnixNano())
+	// 获取一个范围在 [0, 100) 的随机整数
+	start := rand.Intn(100)
+	//关联采购单位:同省份采购单位名称随机展示30个
+	if in.Area != "" {
+		in.Area = fmt.Sprintf(`,{"term": {"province": "%s"}`, in.Area)
+	}
+	buyerQuery := fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "name"}}%s}]}},"from": %d,"size": %d}`, in.Area, start, in.BuyerCount)
+	log.Println("buyerQuery:", buyerQuery)
+	buyerList := elastic.Get("buyer", "buyer", buyerQuery)
+	if len(*buyerList) > 0 {
+		var buyers []*bxbuyer.InfoList
+		for _, b := range *buyerList {
+			buyers = append(buyers, &bxbuyer.InfoList{
+				Name: common.ObjToString(b["name"]),
+				Id:   encrypt.EncodeArticleId2ByCheck(common.ObjToString(b["_id"])),
+			})
+		}
+		relatesInfo.Data.BuyerList = buyers
+	}
+	//关联动态:采购单位标讯动态
+	if in.Buyer != "" {
+		biddingQuery := fmt.Sprintf(`{"query":{"bool":{"must":[{"term":{"buyer":"%s"}}]} },"sort": [{"publishtime": "desc"}],"from":0,"size":%d }`, in.Buyer, in.BuyerCount)
+		biddingList := elastic.Get("bidding", "bidding", biddingQuery)
+		if len(*biddingList) > 0 {
+			var biddingInfos []*bxbuyer.InfoList
+			for _, b := range *biddingList {
+				publishtime := common.Int64All(b["publishtime"])
+				biddingInfos = append(biddingInfos, &bxbuyer.InfoList{
+					Name:        common.ObjToString(b["title"]),
+					Id:          encrypt.EncodeArticleId2ByCheck(common.ObjToString(b["id"])),
+					PublishTime: date.FormatDateByInt64(&publishtime, date.Date_Small_Layout),
+				})
+			}
+			relatesInfo.Data.BiddingList = biddingInfos
+		}
+	}
+	log.Println("relatesinfo:", relatesInfo)
+	return relatesInfo
+}
+
+func Checking(in *bxbuyer.RelatesInformationReq) error {
+	if in.Buyer == "" && in.Area == "" {
+		return fmt.Errorf("参数异常")
+	}
+	//默认30个采购单位
+	if in.BuyerCount == 0 {
+		in.BuyerCount = 30
+	}
+	//默认10条招标信息
+	if in.BiddingCount == 0 {
+		in.BiddingCount = 10
+	}
+	return nil
+}

+ 405 - 25
jyBXBuyer/rpc/type/bxbuyer/bxbuyer.pb.go

@@ -1,13 +1,12 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.23.0
+// 	protoc-gen-go v1.28.0
 // 	protoc        v3.15.5
 // source: bxbuyer.proto
 
 package bxbuyer
 
 import (
-	proto "github.com/golang/protobuf/proto"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -21,10 +20,6 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-// This is a compile-time assertion that a sufficiently up-to-date version
-// of the legacy proto package is being used.
-const _ = proto.ProtoPackageIsVersion4
-
 type BuyerListReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -429,6 +424,292 @@ func (x *BuyerList) GetRecId() string {
 	return ""
 }
 
+type RelatesInformationReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	BiddingCount int64  `protobuf:"varint,1,opt,name=biddingCount,proto3" json:"biddingCount,omitempty"`
+	BuyerCount   int64  `protobuf:"varint,2,opt,name=buyerCount,proto3" json:"buyerCount,omitempty"`
+	Buyer        string `protobuf:"bytes,3,opt,name=buyer,proto3" json:"buyer,omitempty"`
+	Area         string `protobuf:"bytes,4,opt,name=area,proto3" json:"area,omitempty"`
+	City         string `protobuf:"bytes,5,opt,name=city,proto3" json:"city,omitempty"`
+	PositionId   int64  `protobuf:"varint,6,opt,name=positionId,proto3" json:"positionId,omitempty"`     // 职位id
+	PositionType int64  `protobuf:"varint,7,opt,name=positionType,proto3" json:"positionType,omitempty"` // 职位类型 0个人 1企业
+	Phone        string `protobuf:"bytes,8,opt,name=phone,proto3" json:"phone,omitempty"`                // 手机号
+}
+
+func (x *RelatesInformationReq) Reset() {
+	*x = RelatesInformationReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbuyer_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *RelatesInformationReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RelatesInformationReq) ProtoMessage() {}
+
+func (x *RelatesInformationReq) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbuyer_proto_msgTypes[4]
+	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 RelatesInformationReq.ProtoReflect.Descriptor instead.
+func (*RelatesInformationReq) Descriptor() ([]byte, []int) {
+	return file_bxbuyer_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *RelatesInformationReq) GetBiddingCount() int64 {
+	if x != nil {
+		return x.BiddingCount
+	}
+	return 0
+}
+
+func (x *RelatesInformationReq) GetBuyerCount() int64 {
+	if x != nil {
+		return x.BuyerCount
+	}
+	return 0
+}
+
+func (x *RelatesInformationReq) GetBuyer() string {
+	if x != nil {
+		return x.Buyer
+	}
+	return ""
+}
+
+func (x *RelatesInformationReq) GetArea() string {
+	if x != nil {
+		return x.Area
+	}
+	return ""
+}
+
+func (x *RelatesInformationReq) GetCity() string {
+	if x != nil {
+		return x.City
+	}
+	return ""
+}
+
+func (x *RelatesInformationReq) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+	}
+	return 0
+}
+
+func (x *RelatesInformationReq) GetPositionType() int64 {
+	if x != nil {
+		return x.PositionType
+	}
+	return 0
+}
+
+func (x *RelatesInformationReq) GetPhone() string {
+	if x != nil {
+		return x.Phone
+	}
+	return ""
+}
+
+//
+type RelatesInformationResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64               `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string              `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+	Data    *RelatesInformation `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *RelatesInformationResp) Reset() {
+	*x = RelatesInformationResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbuyer_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *RelatesInformationResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RelatesInformationResp) ProtoMessage() {}
+
+func (x *RelatesInformationResp) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbuyer_proto_msgTypes[5]
+	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 RelatesInformationResp.ProtoReflect.Descriptor instead.
+func (*RelatesInformationResp) Descriptor() ([]byte, []int) {
+	return file_bxbuyer_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *RelatesInformationResp) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *RelatesInformationResp) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+func (x *RelatesInformationResp) GetData() *RelatesInformation {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type RelatesInformation struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	BuyerList   []*InfoList `protobuf:"bytes,1,rep,name=buyerList,proto3" json:"buyerList,omitempty"`     //采购单位信息
+	BiddingList []*InfoList `protobuf:"bytes,2,rep,name=biddingList,proto3" json:"biddingList,omitempty"` //类似采购单位招标信息
+}
+
+func (x *RelatesInformation) Reset() {
+	*x = RelatesInformation{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbuyer_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *RelatesInformation) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RelatesInformation) ProtoMessage() {}
+
+func (x *RelatesInformation) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbuyer_proto_msgTypes[6]
+	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 RelatesInformation.ProtoReflect.Descriptor instead.
+func (*RelatesInformation) Descriptor() ([]byte, []int) {
+	return file_bxbuyer_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *RelatesInformation) GetBuyerList() []*InfoList {
+	if x != nil {
+		return x.BuyerList
+	}
+	return nil
+}
+
+func (x *RelatesInformation) GetBiddingList() []*InfoList {
+	if x != nil {
+		return x.BiddingList
+	}
+	return nil
+}
+
+//
+type InfoList struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //采购单位名称||信息标题
+	Id          string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`     //信息类型id
+	PublishTime string `protobuf:"bytes,3,opt,name=publishTime,proto3" json:"publishTime,omitempty"`
+}
+
+func (x *InfoList) Reset() {
+	*x = InfoList{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbuyer_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *InfoList) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InfoList) ProtoMessage() {}
+
+func (x *InfoList) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbuyer_proto_msgTypes[7]
+	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 InfoList.ProtoReflect.Descriptor instead.
+func (*InfoList) Descriptor() ([]byte, []int) {
+	return file_bxbuyer_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *InfoList) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *InfoList) GetId() string {
+	if x != nil {
+		return x.Id
+	}
+	return ""
+}
+
+func (x *InfoList) GetPublishTime() string {
+	if x != nil {
+		return x.PublishTime
+	}
+	return ""
+}
+
 var File_bxbuyer_proto protoreflect.FileDescriptor
 
 var file_bxbuyer_proto_rawDesc = []byte{
@@ -492,12 +773,54 @@ var file_bxbuyer_proto_rawDesc = []byte{
 	0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 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, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x63, 0x49,
-	0x64, 0x32, 0x45, 0x0a, 0x07, 0x42, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x09,
-	0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x62, 0x78, 0x62, 0x75,
-	0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
-	0x1a, 0x16, 0x2e, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72,
-	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x62, 0x78,
-	0x62, 0x75, 0x79, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x64, 0x22, 0xf3, 0x01, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66,
+	0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62,
+	0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0c, 0x62, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
+	0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
+	0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74,
+	0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a,
+	0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a,
+	0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+	0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x7d, 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, 0x74,
+	0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07,
+	0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65,
+	0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65,
+	0x6c, 0x61, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+	0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7a, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65,
+	0x73, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x09,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+	0x11, 0x2e, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x4c, 0x69,
+	0x73, 0x74, 0x52, 0x09, 0x62, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x33, 0x0a,
+	0x0b, 0x62, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x66,
+	0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x0b, 0x62, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x69,
+	0x73, 0x74, 0x22, 0x50, 0x0a, 0x08, 0x69, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12,
+	0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+	0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+	0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d,
+	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
+	0x54, 0x69, 0x6d, 0x65, 0x32, 0x95, 0x01, 0x0a, 0x07, 0x42, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72,
+	0x12, 0x3a, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e,
+	0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x42,
+	0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4e, 0x0a, 0x0b,
+	0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x62, 0x78,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66,
+	0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66,
+	0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09,
+	0x2e, 0x2f, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
 var (
@@ -512,23 +835,32 @@ func file_bxbuyer_proto_rawDescGZIP() []byte {
 	return file_bxbuyer_proto_rawDescData
 }
 
-var file_bxbuyer_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_bxbuyer_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
 var file_bxbuyer_proto_goTypes = []interface{}{
-	(*BuyerListReq)(nil),  // 0: bxbuyer.BuyerListReq
-	(*BuyerListResp)(nil), // 1: bxbuyer.BuyerListResp
-	(*BuyerData)(nil),     // 2: bxbuyer.BuyerData
-	(*BuyerList)(nil),     // 3: bxbuyer.BuyerList
+	(*BuyerListReq)(nil),           // 0: bxbuyer.BuyerListReq
+	(*BuyerListResp)(nil),          // 1: bxbuyer.BuyerListResp
+	(*BuyerData)(nil),              // 2: bxbuyer.BuyerData
+	(*BuyerList)(nil),              // 3: bxbuyer.BuyerList
+	(*RelatesInformationReq)(nil),  // 4: bxbuyer.relatesInformationReq
+	(*RelatesInformationResp)(nil), // 5: bxbuyer.relatesInformationResp
+	(*RelatesInformation)(nil),     // 6: bxbuyer.relatesInformation
+	(*InfoList)(nil),               // 7: bxbuyer.infoList
 }
 var file_bxbuyer_proto_depIdxs = []int32{
 	2, // 0: bxbuyer.BuyerListResp.data:type_name -> bxbuyer.BuyerData
 	3, // 1: bxbuyer.BuyerData.list:type_name -> bxbuyer.BuyerList
-	0, // 2: bxbuyer.Bxbuyer.BuyerList:input_type -> bxbuyer.BuyerListReq
-	1, // 3: bxbuyer.Bxbuyer.BuyerList:output_type -> bxbuyer.BuyerListResp
-	3, // [3:4] is the sub-list for method output_type
-	2, // [2:3] is the sub-list for method input_type
-	2, // [2:2] is the sub-list for extension type_name
-	2, // [2:2] is the sub-list for extension extendee
-	0, // [0:2] is the sub-list for field type_name
+	6, // 2: bxbuyer.relatesInformationResp.data:type_name -> bxbuyer.relatesInformation
+	7, // 3: bxbuyer.relatesInformation.buyerList:type_name -> bxbuyer.infoList
+	7, // 4: bxbuyer.relatesInformation.biddingList:type_name -> bxbuyer.infoList
+	0, // 5: bxbuyer.Bxbuyer.BuyerList:input_type -> bxbuyer.BuyerListReq
+	4, // 6: bxbuyer.Bxbuyer.RelatesInfo:input_type -> bxbuyer.relatesInformationReq
+	1, // 7: bxbuyer.Bxbuyer.BuyerList:output_type -> bxbuyer.BuyerListResp
+	5, // 8: bxbuyer.Bxbuyer.RelatesInfo:output_type -> bxbuyer.relatesInformationResp
+	7, // [7:9] is the sub-list for method output_type
+	5, // [5:7] is the sub-list for method input_type
+	5, // [5:5] is the sub-list for extension type_name
+	5, // [5:5] is the sub-list for extension extendee
+	0, // [0:5] is the sub-list for field type_name
 }
 
 func init() { file_bxbuyer_proto_init() }
@@ -585,6 +917,54 @@ func file_bxbuyer_proto_init() {
 				return nil
 			}
 		}
+		file_bxbuyer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RelatesInformationReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxbuyer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RelatesInformationResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxbuyer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RelatesInformation); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxbuyer_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*InfoList); 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{
@@ -592,7 +972,7 @@ func file_bxbuyer_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_bxbuyer_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   4,
+			NumMessages:   8,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 38 - 0
jyBXBuyer/rpc/type/bxbuyer/bxbuyer_grpc.pb.go

@@ -24,6 +24,8 @@ const _ = grpc.SupportPackageIsVersion7
 type BxbuyerClient interface {
 	//采购单位搜索
 	BuyerList(ctx context.Context, in *BuyerListReq, opts ...grpc.CallOption) (*BuyerListResp, error)
+	//采购单位画像 关联信息
+	RelatesInfo(ctx context.Context, in *RelatesInformationReq, opts ...grpc.CallOption) (*RelatesInformationResp, error)
 }
 
 type bxbuyerClient struct {
@@ -43,12 +45,23 @@ func (c *bxbuyerClient) BuyerList(ctx context.Context, in *BuyerListReq, opts ..
 	return out, nil
 }
 
+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...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BxbuyerServer is the server API for Bxbuyer service.
 // All implementations must embed UnimplementedBxbuyerServer
 // for forward compatibility
 type BxbuyerServer interface {
 	//采购单位搜索
 	BuyerList(context.Context, *BuyerListReq) (*BuyerListResp, error)
+	//采购单位画像 关联信息
+	RelatesInfo(context.Context, *RelatesInformationReq) (*RelatesInformationResp, error)
 	mustEmbedUnimplementedBxbuyerServer()
 }
 
@@ -59,6 +72,9 @@ type UnimplementedBxbuyerServer struct {
 func (UnimplementedBxbuyerServer) BuyerList(context.Context, *BuyerListReq) (*BuyerListResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method BuyerList not implemented")
 }
+func (UnimplementedBxbuyerServer) RelatesInfo(context.Context, *RelatesInformationReq) (*RelatesInformationResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method RelatesInfo not implemented")
+}
 func (UnimplementedBxbuyerServer) mustEmbedUnimplementedBxbuyerServer() {}
 
 // UnsafeBxbuyerServer may be embedded to opt out of forward compatibility for this service.
@@ -90,6 +106,24 @@ func _Bxbuyer_BuyerList_Handler(srv interface{}, ctx context.Context, dec func(i
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Bxbuyer_RelatesInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(RelatesInformationReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxbuyerServer).RelatesInfo(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxbuyer.Bxbuyer/RelatesInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxbuyerServer).RelatesInfo(ctx, req.(*RelatesInformationReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Bxbuyer_ServiceDesc is the grpc.ServiceDesc for Bxbuyer service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -101,6 +135,10 @@ var Bxbuyer_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "BuyerList",
 			Handler:    _Bxbuyer_BuyerList_Handler,
 		},
+		{
+			MethodName: "RelatesInfo",
+			Handler:    _Bxbuyer_RelatesInfo_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "bxbuyer.proto",