|
|
@@ -79,6 +79,7 @@ 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) |
|
|
|
|
|
|
@@ -87,6 +88,7 @@ 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)) |
|
|
|
updateDoc, err := es.EsClient.Update(). |
|
|
|
Index(index). |
|
|
|