wangchuanjin 3 ヶ月 前
コミット
ad15562bb2

+ 8 - 5
pushmember/report/statistic/job/matchjob.go

@@ -129,11 +129,6 @@ func (m *MatchJob) OnceBiddingBatch(batchIndex int, start int64, prevPublishtime
 		if util.ObjToString(temp["area"]) == "A" {
 		if util.ObjToString(temp["area"]) == "A" {
 			temp["area"] = "全国"
 			temp["area"] = "全国"
 		}
 		}
-		if util.ObjToString(temp["detail"]) == "" {
-			if repl, err := client.GetBidDetailByRpc(Config.OssAddr, &entity.Args{"detail", _id}); err != nil {
-				temp["detail"] = repl.Data
-			}
-		}
 		res = append(res, temp)
 		res = append(res, temp)
 		temp = make(map[string]interface{})
 		temp = make(map[string]interface{})
 		index++
 		index++
@@ -141,6 +136,14 @@ func (m *MatchJob) OnceBiddingBatch(batchIndex int, start int64, prevPublishtime
 			logger.Info("第", batchIndex, "批", "加载", DbConf.Mongodb.Bidding.Collection, "数据:", index)
 			logger.Info("第", batchIndex, "批", "加载", DbConf.Mongodb.Bidding.Collection, "数据:", index)
 		}
 		}
 	}
 	}
+	for _, temp := range res {
+		if util.ObjToString(temp["detail"]) != "" {
+			continue
+		}
+		if repl, err := client.GetBidDetailByRpc(Config.OssAddr, &entity.Args{"detail", util.ObjToString(temp["_id"])}); err != nil {
+			temp["detail"] = repl.Data
+		}
+	}
 	BiddingRepair(res, "filetext")
 	BiddingRepair(res, "filetext")
 	logger.Info("第", batchIndex, "批", DbConf.Mongodb.Bidding.Collection, "数据已经加载结束。。。", index)
 	logger.Info("第", batchIndex, "批", DbConf.Mongodb.Bidding.Collection, "数据已经加载结束。。。", index)
 	return &res
 	return &res

+ 0 - 6
pushmember/report_experience/statistic/job/matchjob.go

@@ -118,12 +118,6 @@ func (m *MatchJob) OnceBiddingBatch(batchIndex int, start int64, prevPublishtime
 			logger.Info("第", batchIndex, "批", "加载", DbConf.Mongodb.Bidding.Collection, "数据:", index)
 			logger.Info("第", batchIndex, "批", "加载", DbConf.Mongodb.Bidding.Collection, "数据:", index)
 		}
 		}
 	}
 	}
-	for _, temp := range res {
-		repl, err := client.GetBidDetailByRpc(ossAddr, &entity.Args{"detail", ObjToString(temp["_id"])})
-		if err != nil {
-			temp["detail"] = repl.Data
-		}
-	}
 	logger.Info("第", batchIndex, "批", DbConf.Mongodb.Bidding.Collection, "数据已经加载结束。。。", index)
 	logger.Info("第", batchIndex, "批", DbConf.Mongodb.Bidding.Collection, "数据已经加载结束。。。", index)
 	return &res
 	return &res
 }
 }