From 1b9cf8b3d3242a12a558231b9d268ed027a4f400 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Wed, 11 Dec 2024 17:45:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dvideo=E6=8C=89=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dao/video.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dao/video.go b/dao/video.go index d9cfcbe..4124836 100644 --- a/dao/video.go +++ b/dao/video.go @@ -65,13 +65,13 @@ func FindVideoByID(id, auth_id int) Video { // 根据用户id查找视频列表,返回最新30条 func FindVideoListsByAuthID(auth_id int) []Video { var videos []Video - DB.Where("auth_id = ? and isdelete =? ", auth_id, 0).Order("created_at DESC").Limit(30).Find(&videos) + DB.Where("auth_id = ? and isdelete =? ", auth_id, 0).Order("create_time DESC").Limit(30).Find(&videos) return videos } func FindVideoListByTime(auth_id int, startTime, endTime string) []Video { var videos []Video - DB.Where("auth_id = ?", auth_id).Where("isdelete=0").Where("created_at > ? and created_at < ?", startTime, endTime).Find(&videos) + DB.Where("auth_id = ?", auth_id).Where("isdelete=0").Where("create_time > ? and create_time < ?", startTime, endTime).Find(&videos) return videos }