From 7770efd21a65aee642271cb56595af67a49dd12f Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Fri, 25 Oct 2024 18:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E9=A2=91=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=88=9D=E6=9C=AA=E8=AE=BE=E7=BD=AE=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/video.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/handler/video.go b/handler/video.go index 5246d4f..341e005 100644 --- a/handler/video.go +++ b/handler/video.go @@ -160,6 +160,10 @@ func GetVideoList(c *gin.Context) { const layout = "2006-01-02 15:04:05" tm1 := time.Unix(gvl_req.StartTime, 0).Format(layout) tm2 := time.Unix(gvl_req.EndTime, 0).Format(layout) + if gvl_req.StartTime == 0 || gvl_req.EndTime == 0 { + tm1 = "" + tm2 = "" + } videos := service.GetVideoList(int(id.(float64)), tm1, tm2, gvl_req.Hour) c.JSON(http.StatusOK, gin.H{"data": videos, "code": proto.SuccessCode, "message": "success"}) } else {