diff --git a/consume/egg_canal_person_add_activity_value_consume.go b/consume/egg_canal_person_add_activity_value_consume.go index 3314e74..0ce0505 100644 --- a/consume/egg_canal_person_add_activity_value_consume.go +++ b/consume/egg_canal_person_add_activity_value_consume.go @@ -79,7 +79,6 @@ func handleEggCanalPersonAddActivityValueConsume(msg []byte) error { // 2. 监听插入信息 if canalMsg.Type == md2.CanalMsgInsertSqlType { for _, item := range canalMsg.Data { - fmt.Println("item======>", item) uid := item.Uid id := fmt.Sprintf("%d%d_%s", year, week, uid) @@ -88,8 +87,8 @@ func handleEggCanalPersonAddActivityValueConsume(msg []byte) error { } // 3. 增加个人活跃积分 - fmt.Println("amount==========>", item.Amount) - script := elastic.NewScript("ctx._source.person_add_activity_value += params.inc").Param("inc", utils2.StrToInt(item.Amount)) + amount := utils2.StrToFloat64(item.Amount) + script := elastic.NewScript("ctx._source.person_add_activity_value += params.inc").Param("inc", int(amount)) updateDoc, err := es.EsClient.Update(). Index(index). Id(id).