|
- package svc
-
- import (
- "code.fnuoos.com/EggPlanet/egg_system_rules.git/md"
- egg_system_rules "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils"
- "strconv"
- "time"
- )
-
- func GetEggFriendCircleCommentEsIndex(userId int64) string {
- return md.EggFriendCircleCommentEsIndex + GetUserIdSuffix(userId)
- }
- 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)) // 将 byte 类型的值隐式转换为 int
- return string(lastChar)
- }
|