shenjiachi преди 1 седмица
родител
ревизия
4a795309c5
променени са 4 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. +0
    -1
      consume/egg_canal_invite_user_nums_consume.go
  2. +4
    -1
      consume/egg_canal_person_add_activity_value_consume.go
  3. +1
    -1
      consume/egg_canal_violate_nums_consume.go
  4. +1
    -1
      consume/egg_energy_deal_user_ecpm.go

+ 0
- 1
consume/egg_canal_invite_user_nums_consume.go Целия файл

@@ -72,7 +72,6 @@ func handleEggCanalInviteUserNumsConsume(msg []byte) error {
for _, item := range canalMsg.Data {
parentUid := item.ParentUid
id := fmt.Sprintf("%d%d_%s", year, week, parentUid)
fmt.Println("ESid:" + id + "=====================>")

// 新增拉新人数
script := elastic.NewScript("ctx._source.invite_user_nums += params.inc").Param("inc", 1)


+ 4
- 1
consume/egg_canal_person_add_activity_value_consume.go Целия файл

@@ -88,15 +88,18 @@ func handleEggCanalPersonAddActivityValueConsume(msg []byte) error {

// 3. 增加个人活跃积分
script := elastic.NewScript("ctx._source.person_add_activity_value += params.inc").Param("inc", utils2.StrToInt(item.Amount))
_, err = es.EsClient.Update().
updateDoc, err := es.EsClient.Update().
Index(index).
Id(id).
Script(script).
Do(context.Background())
if err != nil {
fmt.Println("EggCanalPersonAddActivityValueConsumeUpdateDoc_ERR::::", err.Error())
return err
}
fmt.Println("updateDoc==========>", updateDoc)
}
}
fmt.Println("EggCanalPersonAddActivityValueConsume_End::::::")
return nil
}

+ 1
- 1
consume/egg_canal_violate_nums_consume.go Целия файл

@@ -85,7 +85,7 @@ func handleEggCanalViolateNumsConsume(msg []byte) error {
continue
}
uid := item.Uid
id := fmt.Sprintf("%d%d-%s", year, week, uid)
id := fmt.Sprintf("%d%d_%s", year, week, uid)

// 2.2. 增加违规次数记录
script := elastic.NewScript("ctx._source.violate_nums += params.inc").Param("inc", 1)


+ 1
- 1
consume/egg_energy_deal_user_ecpm.go Целия файл

@@ -67,7 +67,7 @@ func handleEggEnergyDealUserECPMConsume(msgData []byte) error {
yearStr := utils2.IntToStr(year)
weekStr := utils2.IntToStr(week)
index := es2.GetAppointIndexFromAlias(yearStr, weekStr)
id := fmt.Sprintf("%d%d-%d", year, week, msg.Uid)
id := fmt.Sprintf("%d%d_%d", year, week, msg.Uid)

m := md2.EggEnergyUserEggScoreEs{
Ecpm: utils2.StrToFloat64(msg.Ecpm),


Зареждане…
Отказ
Запис