Browse Source

wip:订阅列表增加信息来源字段

fuwencai 2 years ago
parent
commit
18d453f269

+ 2 - 2
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -64,7 +64,7 @@ message subscribeInfo {
   int64  ca_isvip = 20;
   bool   ca_fileExists = 21;
   int64  source = 22;//来源;1:个人订阅 2:企业自动分发 3:企业手动分发
-  string  site = 23;
+  string  site = 23; // 网站名称
   string buyerTel = 24; // 采购单位联系方式
   string buyerPerson = 25; // 采购单位联系人
   string agency =26;//代理机构
@@ -73,7 +73,7 @@ message subscribeInfo {
   int64 signendTime=29 ;// 报名截止日期
   int64 bidendTime=30;// 投标截止日期
   repeated WinnerInfo winnerInfo = 31;// 中标企业信息
-
+  string spiderCode = 33;//网站代码
 
 }
 //

+ 3 - 2
jyBXSubscribe/rpc/model/push.go

@@ -28,8 +28,8 @@ import (
 const (
 	pageSize            = 100
 	AllSubPushCacheSize = 200
-	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","buyertel","buyerperson","agency","agencyperson","agencytel","winnerperson","winnertel","signendtime","bidendtime","entidlist"],"from":0,"size":%d}`
-	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1,"filetext":1,"buyertel":1,"buyerperson":1,"agency":1,"agencyperson":1,"agencytel":1,"winnerperson":1,"winnertel":1,"signendtime":1,"bidendtime":1,"entidlist":1}`
+	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","spidercode","site","buyertel","buyerperson","agency","agencyperson","agencytel","winnerperson","winnertel","signendtime","bidendtime","entidlist"],"from":0,"size":%d}`
+	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1,"filetext":1,"spidercode":1,"site":1,"buyertel":1,"buyerperson":1,"agency":1,"agencyperson":1,"agencytel":1,"winnerperson":1,"winnertel":1,"signendtime":1,"bidendtime":1,"entidlist":1}`
 
 	SubFreeFlag  = "fType"
 	SubVipFlag   = "vType"
@@ -230,6 +230,7 @@ func (s *subscribePush) InfoFormat(p *PushCa, info *map[string]interface{}, isPa
 		CaFileExists: p.FileExists,
 		Source:       p.Source,
 		Site:         common.InterfaceToStr((*info)["site"]),
+		SpiderCode:   common.InterfaceToStr((*info)["spidercode"]),
 	}
 	// 免费用户返回精简列表字段
 	if !isPay {

+ 14 - 4
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -395,8 +395,8 @@ type SubscribeInfo struct {
 	BidOpenTime  int64         `protobuf:"varint,19,opt,name=bidOpenTime,proto3" json:"bidOpenTime,omitempty"`
 	CaIsvip      int64         `protobuf:"varint,20,opt,name=ca_isvip,json=caIsvip,proto3" json:"ca_isvip,omitempty"`
 	CaFileExists bool          `protobuf:"varint,21,opt,name=ca_fileExists,json=caFileExists,proto3" json:"ca_fileExists,omitempty"`
-	Source       int64         `protobuf:"varint,22,opt,name=source,proto3" json:"source,omitempty"` //来源;1:个人订阅 2:企业自动分发 3:企业手动分发
-	Site         string        `protobuf:"bytes,23,opt,name=site,proto3" json:"site,omitempty"`
+	Source       int64         `protobuf:"varint,22,opt,name=source,proto3" json:"source,omitempty"`            //来源;1:个人订阅 2:企业自动分发 3:企业手动分发
+	Site         string        `protobuf:"bytes,23,opt,name=site,proto3" json:"site,omitempty"`                 // 网站名称
 	BuyerTel     string        `protobuf:"bytes,24,opt,name=buyerTel,proto3" json:"buyerTel,omitempty"`         // 采购单位联系方式
 	BuyerPerson  string        `protobuf:"bytes,25,opt,name=buyerPerson,proto3" json:"buyerPerson,omitempty"`   // 采购单位联系人
 	Agency       string        `protobuf:"bytes,26,opt,name=agency,proto3" json:"agency,omitempty"`             //代理机构
@@ -405,6 +405,7 @@ type SubscribeInfo struct {
 	SignendTime  int64         `protobuf:"varint,29,opt,name=signendTime,proto3" json:"signendTime,omitempty"`  // 报名截止日期
 	BidendTime   int64         `protobuf:"varint,30,opt,name=bidendTime,proto3" json:"bidendTime,omitempty"`    // 投标截止日期
 	WinnerInfo   []*WinnerInfo `protobuf:"bytes,31,rep,name=winnerInfo,proto3" json:"winnerInfo,omitempty"`     // 中标企业信息
+	SpiderCode   string        `protobuf:"bytes,33,opt,name=spiderCode,proto3" json:"spiderCode,omitempty"`     //网站代码
 }
 
 func (x *SubscribeInfo) Reset() {
@@ -656,6 +657,13 @@ func (x *SubscribeInfo) GetWinnerInfo() []*WinnerInfo {
 	return nil
 }
 
+func (x *SubscribeInfo) GetSpiderCode() string {
+	if x != nil {
+		return x.SpiderCode
+	}
+	return ""
+}
+
 //
 type WinnerInfo struct {
 	state         protoimpl.MessageState
@@ -2444,7 +2452,7 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x2e, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
 	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73,
 	0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22,
-	0x93, 0x07, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66,
+	0xb3, 0x07, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66,
 	0x6f, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
 	0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
 	0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61,
@@ -2501,7 +2509,9 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b,
 	0x32, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x57,
 	0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x6e, 0x65,
-	0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x0a, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72,
+	0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x43,
+	0x6f, 0x64, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x70, 0x69, 0x64, 0x65,
+	0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0a, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72,
 	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x01,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09,
 	0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,