소스 검색

wip:采购信息id

wangshan 9 달 전
부모
커밋
69a7cd0255
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      jyBXCore/rpc/model/es/es.go
  2. 1 1
      jyBXCore/rpc/service/purchase.go

+ 1 - 1
jyBXCore/rpc/model/es/es.go

@@ -44,7 +44,7 @@ const (
 	//直采-采购信息
 	PurchaseType              = "bidding_yg"
 	PurchaseIndex             = "bidding_yg"
-	PurchaseBaseField         = `"_id","title","area","city","district","buyerclass","publishtime","isValidFile","budget","bidamount","signendtime","deliver_area","deliver_city","deliver_district","buyer","buyertel","s_subscopeclass","public_type","purchasing","spidercode","subtype"` //"purchasinglist","projectname",
+	PurchaseBaseField         = `"_id","source_id","title","area","city","district","buyerclass","publishtime","isValidFile","budget","bidamount","signendtime","deliver_area","deliver_city","deliver_district","buyer","buyertel","s_subscopeclass","public_type","purchasing","spidercode","subtype"` //"purchasinglist","projectname",
 	PurchaseSearchSort        = `{"publishtime":-1}`
 	PurchaseBaseFieldForPayer = PurchaseBaseField + `,"buyerperson","agency","agencytel","agencyperson","s_winner","winnertel","winnerperson","signendtime","bidendtime","projectinfo","entidlist"`
 )

+ 1 - 1
jyBXCore/rpc/service/purchase.go

@@ -155,7 +155,7 @@ func (p *Purchase) HistoryKeywords() {
 func (p *Purchase) PurchaseListFormat(res []map[string]interface{}) (list []*bxcore.PurchaseList) {
 	for _, rv := range res {
 		logx.Info("title:", MC.InterfaceToStr(rv["title"]))
-		id := MC.InterfaceToStr(rv["_id"])
+		id := MC.InterfaceToStr(rv["source_id"]) //拆分后 多条数据会来自一条bidding数据嘛,把bidding的id记一个source_id;mongo 库中bidding的_id
 		area := MC.InterfaceToStr(rv["area"])
 		city := MC.InterfaceToStr(rv["city"])
 		district := MC.InterfaceToStr(rv["district"])