query.go 479 B

123456789101112
  1. package yb_chart_daily_visit_log
  2. import (
  3. "hongze/hongze_yb/global"
  4. "time"
  5. )
  6. // GetTodayVisitLog 获取今日访问记录
  7. func GetTodayVisitLog(userId, chartInfoId, classifyId int, startTime, endTime time.Time) (item *YbChartDailyVisitLog, err error) {
  8. err = global.DEFAULT_MYSQL.Where("user_id = ? AND chart_info_id = ? AND my_chart_classify_id = ? AND create_time > ? AND create_time < ?", userId, chartInfoId, classifyId, startTime, endTime).First(&item).Error
  9. return
  10. }