mirror of
https://github.com/ProudMuBai/GoFilm.git
synced 2026-02-13 05:24:41 +08:00
update
This commit is contained in:
@@ -162,3 +162,10 @@ func FilmClassify(c *gin.Context) {
|
||||
"content": logic.IL.GetFilmClassify(pid, &page),
|
||||
}, "分类影片信息获取成功", c)
|
||||
}
|
||||
|
||||
// IndexCacheDel 删除首页缓存数据
|
||||
func IndexCacheDel(c *gin.Context) {
|
||||
// 删除首页缓存
|
||||
logic.IL.ClearIndexCache()
|
||||
system.SuccessOnlyMsg("首页缓存数据已清除!!!", c)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"server/plugin/SystemInit"
|
||||
"server/plugin/common/util"
|
||||
"server/plugin/spider"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func ManageIndex(c *gin.Context) {
|
||||
@@ -246,16 +245,11 @@ func BannerList(c *gin.Context) {
|
||||
|
||||
// BannerFind 返回ID对应的横幅信息
|
||||
func BannerFind(c *gin.Context) {
|
||||
idStr := c.Query("id")
|
||||
if idStr == "" {
|
||||
id := c.Query("id")
|
||||
if id == "" {
|
||||
system.Failed("Banner信息获取失败, ID信息异常", c)
|
||||
return
|
||||
}
|
||||
id, err := strconv.ParseInt(idStr, 10, 64)
|
||||
if err != nil {
|
||||
system.Failed("删除失败,参数类型异常", c)
|
||||
return
|
||||
}
|
||||
bl := logic.ML.GetBanners()
|
||||
for _, b := range bl {
|
||||
if b.Id == id {
|
||||
@@ -273,7 +267,13 @@ func BannerAdd(c *gin.Context) {
|
||||
system.Failed("Banner参数提交异常", c)
|
||||
return
|
||||
}
|
||||
// 为新增的banner生成Id
|
||||
b.Id = util.GenerateSalt()
|
||||
bl := logic.ML.GetBanners()
|
||||
if len(bl) > 6 {
|
||||
system.Failed("Banners最大阈值为6, 无法添加新的banner信息", c)
|
||||
return
|
||||
}
|
||||
bl = append(bl, b)
|
||||
if err := logic.ML.SaveBanners(bl); err != nil {
|
||||
system.Failed(fmt.Sprintln("Banners信息添加失败,", err), c)
|
||||
@@ -307,16 +307,11 @@ func BannerUpdate(c *gin.Context) {
|
||||
|
||||
// BannerDel 删除海报数据
|
||||
func BannerDel(c *gin.Context) {
|
||||
idStr := c.Query("id")
|
||||
if idStr == "" {
|
||||
id := c.Query("id")
|
||||
if id == "" {
|
||||
system.Failed("Banner信息获取失败, ID信息异常", c)
|
||||
return
|
||||
}
|
||||
id, err := strconv.ParseInt(idStr, 10, 64)
|
||||
if err != nil {
|
||||
system.Failed("删除失败,参数类型异常", c)
|
||||
return
|
||||
}
|
||||
bl := logic.ML.GetBanners()
|
||||
for i, b := range bl {
|
||||
if b.Id == id {
|
||||
|
||||
@@ -103,6 +103,22 @@ func CoverFilmClass(c *gin.Context) {
|
||||
system.SuccessOnlyMsg("影视分类信息重置成功, 请稍等片刻后刷新页面", c)
|
||||
}
|
||||
|
||||
// DirectedSpider 采集指定的影片
|
||||
func DirectedSpider(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
||||
// SingleUpdateSpider 单一影片更新采集
|
||||
func SingleUpdateSpider(c *gin.Context) {
|
||||
// 获取影片对应的唯一标识
|
||||
id := c.Query("id")
|
||||
if id == "" {
|
||||
system.Failed("参数异常, 资源站标识不能为空", c)
|
||||
return
|
||||
}
|
||||
// 通过ID对指定影片进行同步更新
|
||||
}
|
||||
|
||||
// 校验密码有效性
|
||||
func verifyPassword(c *gin.Context, password string) bool {
|
||||
// 获取已登录的用户信息
|
||||
|
||||
Reference in New Issue
Block a user