From 37a02518b04fad6a2c06362a30223925a388379e Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 27 Dec 2024 15:21:32 +0800 Subject: [PATCH 1/3] update es egg energy score struct --- md/es.go | 6 +++--- rule/egg_energy/create_es_score_and_assign_value.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/md/es.go b/md/es.go index 72f428f..7b03889 100644 --- a/md/es.go +++ b/md/es.go @@ -28,7 +28,7 @@ const EggEnergyUserEggScoreEsMapping = ` "type": "short" }, "ecpm":{ - "type": "float" + "type": "double" }, "invite_user_nums":{ "type": "integer" @@ -67,7 +67,7 @@ const EggEnergyUserEggScoreEsMapping = ` "type": "integer" }, "person_add_activity_value":{ - "type": "integer" + "type": "double" }, "created_at":{ "type": "date", @@ -98,7 +98,7 @@ type EggEnergyUserEggScoreEs struct { CollegeLearningNums int `json:"college_learning_nums" label:"学院学习次数"` ViolateNums int `json:"violate_nums" label:"违规次数"` BrowseInterfaceNums int `json:"browse_interface_nums" label:"浏览界面次数"` - PersonAddActivityValue int `json:"person_add_activity_value" label:"个人活跃积分"` + PersonAddActivityValue float64 `json:"person_add_activity_value" label:"个人活跃积分"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` } diff --git a/rule/egg_energy/create_es_score_and_assign_value.go b/rule/egg_energy/create_es_score_and_assign_value.go index a0d75a4..d3a72e0 100644 --- a/rule/egg_energy/create_es_score_and_assign_value.go +++ b/rule/egg_energy/create_es_score_and_assign_value.go @@ -46,7 +46,7 @@ func CreateEsScoreAndAssignValuesDoc(index, id string, uid int64, kind enum.EggE case enum.BrowseInterfaceNums: m.BrowseInterfaceNums = utils.StrToInt(value) case enum.PersonAddActivityValue: - m.PersonAddActivityValue = utils.StrToInt(value) + m.PersonAddActivityValue = utils.StrToFloat64(value) default: } createDoc, err1 := es.CreateDoc(index, id, m) From a441564375e2a4f56d5121e558859ed0092f1504 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 27 Dec 2024 15:31:18 +0800 Subject: [PATCH 2/3] fix: update egg energy score mq struct --- rule/egg_energy/md/mq_egg_app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rule/egg_energy/md/mq_egg_app.go b/rule/egg_energy/md/mq_egg_app.go index 80443a5..4935271 100644 --- a/rule/egg_energy/md/mq_egg_app.go +++ b/rule/egg_energy/md/mq_egg_app.go @@ -62,7 +62,7 @@ type EggStructForAutoScoreData struct { CollegeLearningNums int `json:"college_learning_nums"` ViolateNums int `json:"violate_nums"` BrowseInterfaceNums int `json:"browse_interface_nums"` - PersonAddActivityValue int `json:"person_add_activity_value"` + PersonAddActivityValue float64 `json:"person_add_activity_value"` } type AddPublicPlatoonUserRelationCommissionReq struct { From 802cf07ae61c38d203c0fe13bfdb94042a20c19e Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 27 Dec 2024 17:28:43 +0800 Subject: [PATCH 3/3] feat: add egg comment mq struct --- rule/egg_energy/md/mq_egg_app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rule/egg_energy/md/mq_egg_app.go b/rule/egg_energy/md/mq_egg_app.go index 4935271..9d1fadf 100644 --- a/rule/egg_energy/md/mq_egg_app.go +++ b/rule/egg_energy/md/mq_egg_app.go @@ -10,6 +10,7 @@ const ( EggRoutKeyForRecordActive = "egg_record_active" // 更新活跃记录 EggRoutKeyForAutoScoreData = "egg_auto_score" // 自动打分 EggRoutKeyForSendFriendCircle = "egg_send_friend_circle" // 发送朋友圈 + EggRoutKeyForComment = "egg_comment" // 发送朋友圈 ) type EggNewUserRegisterData struct { @@ -73,3 +74,7 @@ type AddPublicPlatoonUserRelationCommissionReq struct { type EggSendFriendCircleData struct { Uid int64 `json:"uid"` } + +type EggCommentData struct { + Uid int64 `json:"uid"` +}