@@ -28,7 +28,7 @@ const EggEnergyUserEggScoreEsMapping = ` | |||||
"type": "short" | "type": "short" | ||||
}, | }, | ||||
"ecpm":{ | "ecpm":{ | ||||
"type": "float" | |||||
"type": "double" | |||||
}, | }, | ||||
"invite_user_nums":{ | "invite_user_nums":{ | ||||
"type": "integer" | "type": "integer" | ||||
@@ -67,7 +67,7 @@ const EggEnergyUserEggScoreEsMapping = ` | |||||
"type": "integer" | "type": "integer" | ||||
}, | }, | ||||
"person_add_activity_value":{ | "person_add_activity_value":{ | ||||
"type": "integer" | |||||
"type": "double" | |||||
}, | }, | ||||
"created_at":{ | "created_at":{ | ||||
"type": "date", | "type": "date", | ||||
@@ -98,7 +98,7 @@ type EggEnergyUserEggScoreEs struct { | |||||
CollegeLearningNums int `json:"college_learning_nums" label:"学院学习次数"` | CollegeLearningNums int `json:"college_learning_nums" label:"学院学习次数"` | ||||
ViolateNums int `json:"violate_nums" label:"违规次数"` | ViolateNums int `json:"violate_nums" label:"违规次数"` | ||||
BrowseInterfaceNums int `json:"browse_interface_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"` | CreatedAt string `json:"created_at"` | ||||
UpdatedAt string `json:"updated_at"` | UpdatedAt string `json:"updated_at"` | ||||
} | } | ||||
@@ -46,7 +46,7 @@ func CreateEsScoreAndAssignValuesDoc(index, id string, uid int64, kind enum.EggE | |||||
case enum.BrowseInterfaceNums: | case enum.BrowseInterfaceNums: | ||||
m.BrowseInterfaceNums = utils.StrToInt(value) | m.BrowseInterfaceNums = utils.StrToInt(value) | ||||
case enum.PersonAddActivityValue: | case enum.PersonAddActivityValue: | ||||
m.PersonAddActivityValue = utils.StrToInt(value) | |||||
m.PersonAddActivityValue = utils.StrToFloat64(value) | |||||
default: | default: | ||||
} | } | ||||
createDoc, err1 := es.CreateDoc(index, id, m) | createDoc, err1 := es.CreateDoc(index, id, m) | ||||
@@ -10,6 +10,7 @@ const ( | |||||
EggRoutKeyForRecordActive = "egg_record_active" // 更新活跃记录 | EggRoutKeyForRecordActive = "egg_record_active" // 更新活跃记录 | ||||
EggRoutKeyForAutoScoreData = "egg_auto_score" // 自动打分 | EggRoutKeyForAutoScoreData = "egg_auto_score" // 自动打分 | ||||
EggRoutKeyForSendFriendCircle = "egg_send_friend_circle" // 发送朋友圈 | EggRoutKeyForSendFriendCircle = "egg_send_friend_circle" // 发送朋友圈 | ||||
EggRoutKeyForComment = "egg_comment" // 发送朋友圈 | |||||
) | ) | ||||
type EggNewUserRegisterData struct { | type EggNewUserRegisterData struct { | ||||
@@ -62,7 +63,7 @@ type EggStructForAutoScoreData struct { | |||||
CollegeLearningNums int `json:"college_learning_nums"` | CollegeLearningNums int `json:"college_learning_nums"` | ||||
ViolateNums int `json:"violate_nums"` | ViolateNums int `json:"violate_nums"` | ||||
BrowseInterfaceNums int `json:"browse_interface_nums"` | BrowseInterfaceNums int `json:"browse_interface_nums"` | ||||
PersonAddActivityValue int `json:"person_add_activity_value"` | |||||
PersonAddActivityValue float64 `json:"person_add_activity_value"` | |||||
} | } | ||||
type AddPublicPlatoonUserRelationCommissionReq struct { | type AddPublicPlatoonUserRelationCommissionReq struct { | ||||
@@ -73,3 +74,7 @@ type AddPublicPlatoonUserRelationCommissionReq struct { | |||||
type EggSendFriendCircleData struct { | type EggSendFriendCircleData struct { | ||||
Uid int64 `json:"uid"` | Uid int64 `json:"uid"` | ||||
} | } | ||||
type EggCommentData struct { | |||||
Uid int64 `json:"uid"` | |||||
} |
@@ -22,10 +22,10 @@ func GetLatestEffectiveIndexFromAlias(now time.Time) string { | |||||
year, week := now.ISOWeek() | year, week := now.ISOWeek() | ||||
if now.Weekday() > time.Wednesday || (now.Weekday() > time.Wednesday && now.Hour() > 14) { | if now.Weekday() > time.Wednesday || (now.Weekday() > time.Wednesday && now.Hour() > 14) { | ||||
// 当前已经过了周三下午两点 返回上周蛋蛋分 | // 当前已经过了周三下午两点 返回上周蛋蛋分 | ||||
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-10) | |||||
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week) | |||||
} else { | } else { | ||||
// 没过周三下午两点 返回上上周蛋蛋分 | // 没过周三下午两点 返回上上周蛋蛋分 | ||||
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week-20) | |||||
esIndexName = egg_system_rules.IntToStr(year) + egg_system_rules.IntToStr(week) | |||||
} | } | ||||
return esIndexName | return esIndexName | ||||
} | } |