package yb_comment_anonymous_user

import (
	"hongze/hongze_yb/global"
	"hongze/hongze_yb/utils"
)

// GetByUserId 根据用户ID，查询记录
func GetByUserId(userId uint64) (item *YbCommentAnonymousUser, err error) {
	err = global.DEFAULT_MYSQL.Where("user_id =  ? ", userId).First(&item).Error
	if err == utils.ErrNoRow {
		err = nil
	}
	return
}
