瀏覽代碼

update

tmp
dengbiao 1 周之前
父節點
當前提交
94eccf8f81
共有 1 個檔案被更改,包括 8 行新增0 行删除
  1. +8
    -0
      app/svc/friend_circle/svc_firend_circle.go

+ 8
- 0
app/svc/friend_circle/svc_firend_circle.go 查看文件

@@ -9,6 +9,7 @@ import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/md"
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
svc3 "code.fnuoos.com/EggPlanet/egg_system_rules.git/svc"
"code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es"
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
"context"
@@ -114,6 +115,11 @@ func MySelfList(c *gin.Context, req friend_circles.MySelfListReq) (resp friend_c
return
}
doc.CircleIndexId = hit.Id
likeId := svc3.GetEggFriendCircleLikeEsIndexId(user.Id, hit.Index)
likeDoc, _ := es.FirstDoc(md.EggFriendCircleLikeEsAlias, likeId)
if likeDoc.Found { // 表示已点赞
doc.IsLike = true
}
resp.List = append(resp.List, doc)
}

@@ -202,6 +208,8 @@ func CommentList(req friend_circles.CommentListReq) (resp friend_circles.Comment
doc.NickName = user.Nickname
doc.AvatarUrl = user.AvatarUrl
doc.CommentIndexId = hit.Id
isLike, _ := GetUserWithCommentLike(hit.Index, doc.Uid)
doc.IsLike = isLike
resp.List = append(resp.List, doc)
}



Loading…
取消
儲存