蛋蛋星球-制度模式
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
722 B

  1. package svc
  2. import (
  3. "code.fnuoos.com/EggPlanet/egg_system_rules.git/md"
  4. egg_system_rules "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils"
  5. "strconv"
  6. "time"
  7. )
  8. func GetEggFriendCircleCommentEsIndex(userId int64) string {
  9. return md.EggFriendCircleCommentEsIndex + GetUserIdSuffix(userId)
  10. }
  11. func GetEggFriendCircleCommentEsIndexId(userId int64, circleId string) string {
  12. return circleId + "_" + strconv.FormatInt(userId, 10) + "_" + egg_system_rules.Int64ToStr(time.Now().Unix())
  13. }
  14. func GetUserIdSuffix(userId int64) string {
  15. numberStr := strconv.FormatInt(userId, 10) // 将数字转换为字符串
  16. lastChar := numberStr[len(numberStr)-1] // 获取最后一个字符
  17. return strconv.Itoa(int(lastChar))
  18. }