|
@@ -109,6 +109,13 @@ func biddingTask(mapInfo map[string]interface{}) {
|
|
|
if stype == "bidding_history" && tmp["history_updatetime"] == nil {
|
|
|
return
|
|
|
}
|
|
|
+ //开启OSS时,detail需要重新获取
|
|
|
+ if config.Conf.Env.Oss {
|
|
|
+ id := mongodb.BsonIdToSId(tmp["_id"])
|
|
|
+ val := oss.OssGetObject(id, config.Conf.DB.Oss.DetailBucket)
|
|
|
+ tmp["detail"] = val
|
|
|
+ }
|
|
|
+
|
|
|
indexLock.Lock()
|
|
|
index++
|
|
|
indexLock.Unlock()
|
|
@@ -162,7 +169,12 @@ func biddingTask(mapInfo map[string]interface{}) {
|
|
|
if stype == "bidding" {
|
|
|
uq := bson.M{"gtid": bson.M{"$gte": util.ObjToString(mapInfo["gtid"])},
|
|
|
"lteid": bson.M{"$lte": util.ObjToString(mapInfo["lteid"])}}
|
|
|
- MgoB.Update("bidding_processing_ids", uq, bson.M{"$set": bson.M{"dataprocess": 8, "updatetime": time.Now().Unix(), "index_num": index}}, false, true)
|
|
|
+
|
|
|
+ if config.Conf.Env.Ai {
|
|
|
+ MgoBOld.Update("bidding_processing_ids", uq, bson.M{"$set": bson.M{"dataprocess_ai": 7, "updatetime": time.Now().Unix(), "index_num": index}}, false, true)
|
|
|
+ } else {
|
|
|
+ MgoB.Update("bidding_processing_ids", uq, bson.M{"$set": bson.M{"dataprocess": 8, "updatetime": time.Now().Unix(), "index_num": index}}, false, true)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
////发送udp,附件补采 才需要
|
|
@@ -251,6 +263,13 @@ func biddingAllTask(mapInfo map[string]interface{}) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ //开启OSS时,detail需要重新获取
|
|
|
+ if config.Conf.Env.Oss {
|
|
|
+ id := mongodb.BsonIdToSId(tmp["_id"])
|
|
|
+ val := oss.OssGetObject(id, config.Conf.DB.Oss.DetailBucket)
|
|
|
+ tmp["detail"] = val
|
|
|
+ }
|
|
|
+
|
|
|
indexLock.Lock()
|
|
|
index++
|
|
|
indexLock.Unlock()
|
|
@@ -262,6 +281,19 @@ func biddingAllTask(mapInfo map[string]interface{}) {
|
|
|
newTmp["object_type"] = objectType
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //todo 处理中国移动定制标签
|
|
|
+ if len(globalRegs) > 0 && len(MatchArr) > 0 {
|
|
|
+ gs, _, _ := TaskTags(tmp, globalRegs)
|
|
|
+ if len(gs) > 0 {
|
|
|
+ tags, match, add := TaskTags(tmp, MatchArr)
|
|
|
+ if len(tags) > 0 {
|
|
|
+ newTmp["mobile_tag"] = tags
|
|
|
+ update["mobile_tag"] = tags
|
|
|
+ log.Info("biddingTask", zap.Any(mongodb.BsonIdToSId(tmp["_id"]), match+","+add))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
newTmp["dataweight"] = 0 //索引数据新增 jy置顶字段
|
|
|
if len(update) > 0 {
|
|
|
updateBiddingPool <- map[string]interface{}{
|
|
@@ -402,6 +434,13 @@ func biddingTaskById(mapInfo map[string]interface{}) {
|
|
|
if sensitive := util.ObjToString((*tmp)["sensitive"]); sensitive == "测试" { //bidding中有敏感词,不生索引
|
|
|
return
|
|
|
}
|
|
|
+ //开启OSS时,detail需要重新获取
|
|
|
+ if config.Conf.Env.Oss {
|
|
|
+ id := mongodb.BsonIdToSId((*tmp)["_id"])
|
|
|
+ val := oss.OssGetObject(id, config.Conf.DB.Oss.DetailBucket)
|
|
|
+ (*tmp)["detail"] = val
|
|
|
+ }
|
|
|
+
|
|
|
if util.IntAll((*tmp)["extracttype"]) == 1 {
|
|
|
newTmp, update := GetEsField(*tmp, stype)
|
|
|
newTmp["dataweight"] = 0 //索引数据新增 jy置顶字段
|