From 6e0c47e5eabdd4831b514aff2fad774e950d517c Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 13 Dec 2024 16:05:18 +0800 Subject: [PATCH] update es id --- consume/egg_canal_invite_user_nums_consume.go | 2 +- consume/egg_canal_person_add_activity_value_consume.go | 2 +- consume/egg_canal_violate_nums_consume.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/consume/egg_canal_invite_user_nums_consume.go b/consume/egg_canal_invite_user_nums_consume.go index daa008f..06f2774 100644 --- a/consume/egg_canal_invite_user_nums_consume.go +++ b/consume/egg_canal_invite_user_nums_consume.go @@ -71,7 +71,7 @@ func handleEggCanalInviteUserNumsConsume(msg []byte) error { if canalMsg.Type == md2.CanalMsgInsertSqlType { for _, item := range canalMsg.Data { parentUid := item.ParentUid - id := fmt.Sprintf("%d%d-%s", year, week, parentUid) + id := fmt.Sprintf("%d%d_%s", year, week, parentUid) fmt.Println("ESid:" + id + "=====================>") // 新增拉新人数 diff --git a/consume/egg_canal_person_add_activity_value_consume.go b/consume/egg_canal_person_add_activity_value_consume.go index 99d5f59..14ee4b8 100644 --- a/consume/egg_canal_person_add_activity_value_consume.go +++ b/consume/egg_canal_person_add_activity_value_consume.go @@ -80,7 +80,7 @@ func handleEggCanalPersonAddActivityValueConsume(msg []byte) error { if canalMsg.Type == md2.CanalMsgInsertSqlType { for _, item := range canalMsg.Data { uid := item.Uid - id := fmt.Sprintf("%d%d-%s", year, week, uid) + id := fmt.Sprintf("%d%d_%s", year, week, uid) if item.CoinId != utils2.IntToStr(personEggPointsCoinId) && item.Direction != "1" { continue diff --git a/consume/egg_canal_violate_nums_consume.go b/consume/egg_canal_violate_nums_consume.go index a2d0e0b..9a3d727 100644 --- a/consume/egg_canal_violate_nums_consume.go +++ b/consume/egg_canal_violate_nums_consume.go @@ -115,7 +115,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) // 3.2 减少违规次数记录 script := elastic.NewScript("ctx._source.violate_nums -= params.dec").Param("dec", 1)