Browse Source

正文判重数据extracttype=-1,入库

mxs 1 year ago
parent
commit
e6598dfddd
1 changed files with 7 additions and 2 deletions
  1. 7 2
      src/saveServer/processdata.go

+ 7 - 2
src/saveServer/processdata.go

@@ -43,6 +43,7 @@ func NewSaveBidding(tmp map[string]interface{}) (b bool, res int, mgoid, mgocoll
 	}()
 	delete(tmp, "_id")
 	tmp["detail_isvalidity"] = 1 //默认“正文有效性”为有效,1
+	tmp["extracttype"] = 0
 	//href
 	href := qutil.ObjToString(tmp["href"])
 	//竞品信息连接处理、数据判重
@@ -293,7 +294,7 @@ func NewSaveBidding(tmp map[string]interface{}) (b bool, res int, mgoid, mgocoll
 	}
 	//qutil.Debug("-------------tmp--------------")
 	//3.3增加抽取状态字段+信息格式(招标、审批数据)
-	result["extracttype"] = 0
+	//result["extracttype"] = 0
 	result["s_sha"] = uuid
 	result["dataging"] = qutil.IntAll(tmp["dataging"])
 	area := qutil.ObjToString(result["area"])
@@ -399,7 +400,11 @@ func dataRepeat(tmp map[string]interface{}, href, hashHref, uuid string) (b bool
 		tmp["repeatby"] = repeatby
 		tmp["s_sha"] = uuid
 		tmp["hashref"] = hashHref
-		SaveMgoCache <- tmp //记录重复数据
+		SaveMgoCache <- tmp                                         //记录重复数据
+		if repeatby == "bloom_detail" || repeatby == "sha_detail" { //被正文判重,保留数据,打上标记
+			tmp["extracttype"] = -1
+			return false, 4
+		}
 		return true, 4
 		//}
 	}