|
@@ -77,7 +77,7 @@ func GetReplyListByReplyCommentId(replyCommentIds []uint64) (list []*YbComment,
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
func GetSimpleByCommentId(commentId uint64)(item *YbComment, err error) {
|
|
func GetSimpleByCommentId(commentId uint64)(item *YbComment, err error) {
|
|
err = global.DEFAULT_MYSQL.Model(YbComment{}).
|
|
err = global.DEFAULT_MYSQL.Model(YbComment{}).
|
|
Select("comment_id, user_id, type, enabled").
|
|
Select("comment_id, user_id, type, enabled").
|
|
@@ -87,3 +87,11 @@ func GetSimpleByCommentId(commentId uint64)(item *YbComment, err error) {
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+func GetMyLatestComment(userId uint64) (item *YbComment, err error){
|
|
|
|
+ err = global.DEFAULT_MYSQL.Model(YbComment{}).
|
|
|
|
+ Select("comment_id, user_id, type, enabled, is_show_name").
|
|
|
|
+ Where("user_id = ? and type=1", userId).Order("comment_id desc").First(&item).Error
|
|
|
|
+ return
|
|
|
|
+}
|