|
|
@@ -73,8 +73,10 @@ func handleEggEnergyDealUserECPMConsume(msgData []byte) error { |
|
|
|
weekStr := utils2.IntToStr(week) |
|
|
|
index := es2.GetAppointIndexFromAlias(yearStr, weekStr) |
|
|
|
id := fmt.Sprintf("%d%d_%d", year, week, msg.Uid) |
|
|
|
id = "202453_16" |
|
|
|
index = "egg_energy_user_egg_score_202453" |
|
|
|
|
|
|
|
script := elastic.NewScript("ctx._source.ecpm += params.inc").Param("inc", utils2.StrToInt64(msg.Ecpm)) |
|
|
|
script := elastic.NewScript("ctx._source.ecpm += params.inc").Param("inc", utils2.StrToFloat64(msg.Ecpm)) |
|
|
|
updateDocRet, err := es.EsClient.Update(). |
|
|
|
Index(index). |
|
|
|
Id(id). |
|
|
@@ -92,6 +94,6 @@ func handleEggEnergyDealUserECPMConsume(msgData []byte) error { |
|
|
|
} |
|
|
|
return err |
|
|
|
} |
|
|
|
fmt.Printf("UpdateCreateDoc ==> %+v \n\n", updateDocRet) |
|
|
|
fmt.Printf("UpdateDoc ==> %+v \n\n", updateDocRet) |
|
|
|
return err |
|
|
|
} |