|
@@ -210,7 +210,7 @@ func List(user user.UserInfo, reportId, reportChapterId, oldReportId, oldReport
|
|
err = errors.New("查询精选留言列表出错")
|
|
err = errors.New("查询精选留言列表出错")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- total, err = yb_comment.GetHotListTotalByOldReportId(oldReportId, oldReportChapterId,)
|
|
|
|
|
|
+ total, err = yb_comment.GetHotListTotalByOldReportId(oldReportId, oldReportChapterId)
|
|
if err != nil {
|
|
if err != nil {
|
|
errMsg = err.Error()
|
|
errMsg = err.Error()
|
|
err = errors.New("查询精选留言总数出错")
|
|
err = errors.New("查询精选留言总数出错")
|
|
@@ -284,19 +284,11 @@ func List(user user.UserInfo, reportId, reportChapterId, oldReportId, oldReport
|
|
tmp := new(response.RespCommentItem)
|
|
tmp := new(response.RespCommentItem)
|
|
tmp.CommentId = v.CommentId
|
|
tmp.CommentId = v.CommentId
|
|
tmp.UserId = v.UserId
|
|
tmp.UserId = v.UserId
|
|
- tmp.UserName = "匿名用户"
|
|
|
|
|
|
+ tmp.UserName = "匿名用户"+strconv.Itoa(int(v.CommentId+v.UserId))
|
|
tmp.UserImgUrl = utils.DEFAULT_HONGZE_USER_LOGO
|
|
tmp.UserImgUrl = utils.DEFAULT_HONGZE_USER_LOGO
|
|
- if info, ok := usersMap[v.UserId]; ok {
|
|
|
|
- if v.IsShowName == 1 { //是否匿名 0-匿名,1-不匿名
|
|
|
|
- tmp.UserName = info.NickName
|
|
|
|
- tmp.UserImgUrl = info.Headimgurl
|
|
|
|
- }else{
|
|
|
|
- if info.Mobile != "" {
|
|
|
|
- tmp.UserName += info.Mobile[7:]
|
|
|
|
- }else if info.OpenID != "" {
|
|
|
|
- tmp.UserName += info.OpenID[3:8]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ if info, ok := usersMap[v.UserId]; ok && v.IsShowName == 1{
|
|
|
|
+ tmp.UserName = info.NickName
|
|
|
|
+ tmp.UserImgUrl = info.Headimgurl
|
|
}
|
|
}
|
|
tmp.Content = v.Content
|
|
tmp.Content = v.Content
|
|
tmp.IsHot = v.IsHot
|
|
tmp.IsHot = v.IsHot
|