Compare commits
No commits in common. "7b93f3a8017ecc026f0a7ac74837fe9c4bcab90c" and "a28b830523a1af7d0a4f95eb9cc57da60eb87537" have entirely different histories.
7b93f3a801
...
a28b830523
|
|
@ -15,7 +15,6 @@ import (
|
||||||
|
|
||||||
// video获取视频列表请求
|
// video获取视频列表请求
|
||||||
type gvlReq struct {
|
type gvlReq struct {
|
||||||
ID int `json:"id" form:"id"`
|
|
||||||
StartTime int64 `json:"begin" form:"begin"`
|
StartTime int64 `json:"begin" form:"begin"`
|
||||||
EndTime int64 `json:"end" form:"end"`
|
EndTime int64 `json:"end" form:"end"`
|
||||||
IP string `json:"ip" form:"ip"`
|
IP string `json:"ip" form:"ip"`
|
||||||
|
|
@ -165,7 +164,7 @@ func GetVideoList(c *gin.Context) {
|
||||||
tm1 = ""
|
tm1 = ""
|
||||||
tm2 = ""
|
tm2 = ""
|
||||||
}
|
}
|
||||||
videos := service.GetVideoList(int(id.(float64)), gvl_req.ID, tm1, tm2, gvl_req.Hour)
|
videos := service.GetVideoList(int(id.(float64)), tm1, tm2, gvl_req.Hour)
|
||||||
c.JSON(http.StatusOK, gin.H{"data": videos, "code": proto.SuccessCode, "message": "success"})
|
c.JSON(http.StatusOK, gin.H{"data": videos, "code": proto.SuccessCode, "message": "success"})
|
||||||
} else {
|
} else {
|
||||||
c.JSON(http.StatusOK, gin.H{"error": err.Error(), "code": proto.ParameterError, "message": "failed"})
|
c.JSON(http.StatusOK, gin.H{"error": err.Error(), "code": proto.ParameterError, "message": "failed"})
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,7 @@ func GetWillDelVideoList(id int) []dao.Video {
|
||||||
return dao.FindWillDelVideoList(id)
|
return dao.FindWillDelVideoList(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetVideoList(auth_id, id int, start, end, hour string) []dao.Video {
|
func GetVideoList(auth_id int, start, end, hour string) []dao.Video {
|
||||||
if id > 0 {
|
|
||||||
return []dao.Video{dao.FindVideoByID(id, auth_id)}
|
|
||||||
}
|
|
||||||
if start == "" {
|
if start == "" {
|
||||||
return dao.FindVideoListsByAuthID(auth_id)
|
return dao.FindVideoListsByAuthID(auth_id)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue