|
|
@@ -14,8 +14,16 @@ func GetEggFriendCircleCommentEsIndexId(userId int64, circleId string) string { |
|
|
|
return circleId + "_" + strconv.FormatInt(userId, 10) + "_" + egg_system_rules.Int64ToStr(time.Now().Unix()) |
|
|
|
} |
|
|
|
|
|
|
|
func GetEggFriendCircleLikeEsIndex(userId int64) string { |
|
|
|
return md.EggFriendCircleLikeEsIndex + GetUserIdSuffix(userId) |
|
|
|
} |
|
|
|
func GetEggFriendCircleLikeEsIndexId(userId int64, circleId string) string { |
|
|
|
return circleId + "_" + strconv.FormatInt(userId, 10) |
|
|
|
} |
|
|
|
|
|
|
|
func GetUserIdSuffix(userId int64) string { |
|
|
|
numberStr := strconv.FormatInt(userId, 10) // 将数字转换为字符串 |
|
|
|
lastChar := numberStr[len(numberStr)-1] // 获取最后一个字符 |
|
|
|
return strconv.Itoa(int(lastChar)) |
|
|
|
//return strconv.Itoa(int(lastChar)) // 将 byte 类型的值隐式转换为 int |
|
|
|
return string(lastChar) |
|
|
|
} |