@@ -71,7 +71,7 @@ func handleEggCanalInviteUserNumsConsume(msg []byte) error { | |||||
if canalMsg.Type == md2.CanalMsgInsertSqlType { | if canalMsg.Type == md2.CanalMsgInsertSqlType { | ||||
for _, item := range canalMsg.Data { | for _, item := range canalMsg.Data { | ||||
parentUid := item.ParentUid | parentUid := item.ParentUid | ||||
id := fmt.Sprintf("%d%d-%d", year, week, parentUid) | |||||
id := fmt.Sprintf("%d%d-%s", year, week, parentUid) | |||||
fmt.Println("ESid:" + id + "=====================>") | fmt.Println("ESid:" + id + "=====================>") | ||||
// 新增拉新人数 | // 新增拉新人数 | ||||
@@ -80,9 +80,9 @@ func handleEggCanalPersonAddActivityValueConsume(msg []byte) error { | |||||
if canalMsg.Type == md2.CanalMsgInsertSqlType { | if canalMsg.Type == md2.CanalMsgInsertSqlType { | ||||
for _, item := range canalMsg.Data { | for _, item := range canalMsg.Data { | ||||
uid := item.Uid | uid := item.Uid | ||||
id := fmt.Sprintf("%d%d-%d", year, week, uid) | |||||
id := fmt.Sprintf("%d%d-%s", year, week, uid) | |||||
if item.CoinId != personEggPointsCoinId && item.Direction != 1 { | |||||
if item.CoinId != utils2.IntToStr(personEggPointsCoinId) && item.Direction != "1" { | |||||
continue | continue | ||||
} | } | ||||
@@ -85,7 +85,7 @@ func handleEggCanalViolateNumsConsume(msg []byte) error { | |||||
continue | continue | ||||
} | } | ||||
uid := item.Uid | uid := item.Uid | ||||
id := fmt.Sprintf("%d%d-%d", year, week, uid) | |||||
id := fmt.Sprintf("%d%d-%s", year, week, uid) | |||||
// 2.2. 增加违规次数记录 | // 2.2. 增加违规次数记录 | ||||
script := elastic.NewScript("ctx._source.violate_nums += params.inc").Param("inc", 1) | script := elastic.NewScript("ctx._source.violate_nums += params.inc").Param("inc", 1) | ||||
@@ -115,7 +115,7 @@ func handleEggCanalViolateNumsConsume(msg []byte) error { | |||||
continue | continue | ||||
} | } | ||||
uid := item.Uid | uid := item.Uid | ||||
id := fmt.Sprintf("%d%d-%d", year, week, uid) | |||||
id := fmt.Sprintf("%d%d-%s", year, week, uid) | |||||
// 3.2 减少违规次数记录 | // 3.2 减少违规次数记录 | ||||
script := elastic.NewScript("ctx._source.violate_nums -= params.dec").Param("dec", 1) | script := elastic.NewScript("ctx._source.violate_nums -= params.dec").Param("dec", 1) | ||||
@@ -1,16 +1,16 @@ | |||||
package md | package md | ||||
type CanalUserVirtualCoinFlow struct { | type CanalUserVirtualCoinFlow struct { | ||||
Id int64 `json:"id"` | |||||
Uid int64 `json:"uid"` | |||||
CoinId int `json:"coin_id"` | |||||
Direction int `json:"direction"` | |||||
Id string `json:"id"` | |||||
Uid string `json:"uid"` | |||||
CoinId string `json:"coin_id"` | |||||
Direction string `json:"direction"` | |||||
Title string `json:"title"` | Title string `json:"title"` | ||||
Amount string `json:"amount"` | Amount string `json:"amount"` | ||||
BeforeAmount string `json:"before_amount"` | BeforeAmount string `json:"before_amount"` | ||||
AfterAmount string `json:"after_amount"` | AfterAmount string `json:"after_amount"` | ||||
SysFee string `json:"sys_fee"` | SysFee string `json:"sys_fee"` | ||||
TransferType int `json:"transfer_type"` | |||||
TransferType string `json:"transfer_type"` | |||||
} | } | ||||
type CanalUserVirtualCoinFlowMessage[T any] struct { | type CanalUserVirtualCoinFlowMessage[T any] struct { | ||||
@@ -1,10 +1,10 @@ | |||||
package md | package md | ||||
type CanalUserRelate struct { | type CanalUserRelate struct { | ||||
Id int64 `json:"id"` | |||||
ParentUid int64 `json:"parent_uid"` | |||||
Uid int64 `json:"uid"` | |||||
Level int `json:"level"` | |||||
Id string `json:"id"` | |||||
ParentUid string `json:"parent_uid"` | |||||
Uid string `json:"uid"` | |||||
Level string `json:"level"` | |||||
InviteTime string `json:"invite_time"` | InviteTime string `json:"invite_time"` | ||||
} | } | ||||
@@ -1,9 +1,9 @@ | |||||
package md | package md | ||||
type CanalTagRecords struct { | type CanalTagRecords struct { | ||||
Id int `json:"id" ` | |||||
TagId int `json:"tag_id" ` | |||||
Uid int64 `json:"uid" ` | |||||
Id string `json:"id" ` | |||||
TagId string `json:"tag_id" ` | |||||
Uid string `json:"uid" ` | |||||
Memo string `json:"memo" ` | Memo string `json:"memo" ` | ||||
CreateAt string `json:"create_at" ` | CreateAt string `json:"create_at" ` | ||||
UpdateAt string `json:"update_at" ` | UpdateAt string `json:"update_at" ` | ||||