|
@@ -104,6 +104,15 @@ func biddingTask(mapInfo map[string]interface{}) {
|
|
|
}
|
|
|
wg.Wait()
|
|
|
log.Info("biddingTask over", zap.Int("count", c1), zap.Int("index", index))
|
|
|
+
|
|
|
+ // 重采平台需要
|
|
|
+ //mapInfo["stype"] = ""
|
|
|
+ //datas, _ := json.Marshal(mapInfo)
|
|
|
+ //var next = &net.UDPAddr{
|
|
|
+ // IP: net.ParseIP("127.0.0.1"),
|
|
|
+ // Port: 1910,
|
|
|
+ //}
|
|
|
+ //log.Info("bidding index es over", zap.Any("es", next), zap.String("mapinfo", string(datas)))
|
|
|
}
|
|
|
|
|
|
func biddingAllTask(mapInfo map[string]interface{}) {
|
|
@@ -177,15 +186,15 @@ func biddingTaskById(mapInfo map[string]interface{}) {
|
|
|
if sensitive := util.ObjToString((*tmp)["sensitive"]); sensitive == "测试" { //bidding中有敏感词,不生索引
|
|
|
return
|
|
|
}
|
|
|
- if util.IntAll((*tmp)["dataprocess"]) == 8 {
|
|
|
+ if util.IntAll((*tmp)["extracttype"]) == 1 {
|
|
|
newTmp, update := GetEsField(*tmp, stype)
|
|
|
newTmp["dataweight"] = 0 //索引数据新增 jy置顶字段
|
|
|
if len(update) > 0 {
|
|
|
- updateBiddingPool <- []map[string]interface{}{{
|
|
|
- "_id": mongodb.StringTOBsonId(infoid),
|
|
|
- },
|
|
|
- {"$set": update},
|
|
|
- }
|
|
|
+ //updateBiddingPool <- []map[string]interface{}{{
|
|
|
+ // "_id": mongodb.StringTOBsonId(infoid),
|
|
|
+ //},
|
|
|
+ // {"$set": update},
|
|
|
+ //}
|
|
|
}
|
|
|
saveEsPool <- newTmp
|
|
|
}
|
|
@@ -350,6 +359,8 @@ func GetEsField(tmp map[string]interface{}, stype string) (map[string]interface{
|
|
|
YuceEndtime(newTmp) // 预测结果时间
|
|
|
if stype == "bidding" || stype == "bidding_history" {
|
|
|
newTmp["createtime"] = time.Now().Unix() // es库数据创建时间,只有增量数据有
|
|
|
+ newTmp["pici"] = time.Now().Unix() //createtime跟pici一样,为了剑鱼功能需要,并行存在一段时间,之后可以删掉createtime
|
|
|
+ update["pici"] = time.Now().Unix()
|
|
|
}
|
|
|
|
|
|
if len(saveErr) > 0 {
|