123456789101112131415 |
- package user_view_history
- import "hongze/hongze_yb/global"
- // GetReportByUserId 根据userId查询文章记录
- func GetReportByUserId(userId,reportId uint64) (item *UserViewHistory, err error) {
- err = global.DEFAULT_MYSQL.Where("user_id = ? and research_report_id = ? and research_report_type_id = 0", userId, reportId).First(&item).Error
- return
- }
- // GetReportTypeByUserId 根据userId查询章节记录
- func GetReportTypeByUserId(userId,reportTypeId uint64) (item *UserViewHistory, err error) {
- err = global.DEFAULT_MYSQL.Where("user_id = ? and research_report_type_id = ?", userId, reportTypeId).First(&item).Error
- return
- }
|