//添加视频保存 func (c Admin) MoviePost(movie models.Movie, category int64) revel.Result { movie.Category = models.Category{Id: category} aff, _ := engine.Insert(&movie) if aff > 0 { //TODO 成功之后 } return c.Redirect(routes.Admin.MovieList()) }
//修改之后保存视频 func (c Admin) MovieEditPost(id int64, movie models.Movie) revel.Result { movie.Id = id aff, _ := engine.Id(id).Update(&movie) if aff > 0 { //TODO 修改成功之后 } return c.Redirect(routes.Admin.MovieList()) }