修复视频查询初未设置情况
This commit is contained in:
parent
b5f01572cc
commit
7770efd21a
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue