修复视频搜索日期错误仍搜索问题
This commit is contained in:
parent
75a0cb9f3c
commit
7c78231d91
|
|
@ -3,6 +3,7 @@ package service
|
|||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
"videoplayer/dao"
|
||||
"videoplayer/proto"
|
||||
)
|
||||
|
|
@ -47,7 +48,11 @@ func GetVideoList(auth_id int, start, end, hour string) []dao.Video {
|
|||
es1 := strings.Split(es[1], ":")
|
||||
end = es[0] + " " + hour + ":" + es1[1] + ":" + es1[2]
|
||||
}
|
||||
|
||||
_, err := time.Parse("2006-01-02 15:04:05", start)
|
||||
_, err2 := time.Parse("2006-01-02 15:04:05", end)
|
||||
if err != nil || err2 != nil {
|
||||
return []dao.Video{}
|
||||
}
|
||||
return dao.FindVideoListByTime(auth_id, start, end)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue