Compare commits

...

2 Commits

Author SHA1 Message Date
junleea 766dbcd2fb Merge branch 'refs/heads/feat-sql-log' 2024-12-17 19:29:53 +08:00
junleea a3916a77d0 添加SQL日志配置,修复video部分查询问题 2024-12-17 19:29:46 +08:00
1 changed files with 2 additions and 2 deletions

View File

@ -118,9 +118,9 @@ func FindVideoListsByAuthID(auth_id int) []Video {
func FindVideoListByTime(auth_id int, startTime, endTime string) []Video {
var videos []Video
if proto.Config.SERVER_SQL_LOG {
DB.Debug().Where("auth_id = ?", auth_id).Where("create_time > ? and create_time < ? and isdelete=0 and deleted_at is null", startTime, endTime).Find(&videos)
DB.Debug().Where("auth_id = ?", auth_id).Where("create_time > ? and create_time < ? and isdelete=0", startTime, endTime).Find(&videos)
} else {
DB.Where("auth_id = ?", auth_id).Where("create_time > ? and create_time < ? and isdelete=0 and deleted_at is null", startTime, endTime).Find(&videos)
DB.Where("auth_id = ?", auth_id).Where("create_time > ? and create_time < ? and isdelete=0", startTime, endTime).Find(&videos)
}
return videos
}