修复删除时间未设置问题。

This commit is contained in:
lijun 2024-05-22 11:31:03 +08:00
parent 8227718ee2
commit 883d1e915a
2 changed files with 5 additions and 1 deletions

View File

@ -46,6 +46,10 @@ func UpdateVideo(videoPath, videoName string, cameraID, videoID, authID, human,
if res.Error != nil { if res.Error != nil {
return false return false
} }
res = DB.Debug().Exec("update videos set delete_time= DATE_ADD(NOW(), INTERVAL 20 DAY) where id=? and auth_id=?", videoID, authID) //delete_time= DATE_ADD(NOW(), INTERVAL 20 DAY)
if res.Error != nil {
return false
}
return true return true
} }

View File

@ -67,7 +67,7 @@ type delayReq struct {
func SetUpVideoGroup(router *gin.Engine) { func SetUpVideoGroup(router *gin.Engine) {
videoGroup := router.Group("/video") videoGroup := router.Group("/video")
videoGroup.POST("/get_video_list", GetVideoList) videoGroup.POST("/get_video_list", GetVideoList)
videoGroup.POST("/will_del_video_list", GetWillDelVideoList) videoGroup.GET("/will_del_video_list", GetWillDelVideoList)
videoGroup.POST("/create", CreateVideo) videoGroup.POST("/create", CreateVideo)
videoGroup.GET("/mp4", GetVideo) videoGroup.GET("/mp4", GetVideo)
videoGroup.POST("/delay", DelayVideo) videoGroup.POST("/delay", DelayVideo)