mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-23 01:16:48 +08:00
🎨 🔥 ✨ 🚑 集成前端代码的&兼容容器化部署插件的插件改造&提供了一个新的轮播图插件
This commit is contained in:
65
server/addons/flashbanner/api/admin/banner/banner.go
Normal file
65
server/addons/flashbanner/api/admin/banner/banner.go
Normal file
@@ -0,0 +1,65 @@
|
||||
// Package banner
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package banner
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/addons/flashbanner/model/input/sysin"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// CreateReq 创建轮播图
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/banner/create" method:"post" tags:"轮播图" summary:"创建轮播图"`
|
||||
sysin.BannerCreateInp
|
||||
}
|
||||
|
||||
type CreateRes struct{}
|
||||
|
||||
// ListReq 查询列表
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/banner/list" method:"get" tags:"轮播图" summary:"获取轮播图列表"`
|
||||
sysin.BannerListInp
|
||||
}
|
||||
|
||||
type ListRes struct {
|
||||
List []*sysin.BannerListModel `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// ViewReq 获取指定信息
|
||||
type ViewReq struct {
|
||||
g.Meta `path:"/banner/view" method:"get" tags:"轮播图" summary:"获取指定轮播图信息"`
|
||||
sysin.BannerViewInp
|
||||
}
|
||||
|
||||
type ViewRes struct {
|
||||
*sysin.BannerViewModel
|
||||
}
|
||||
|
||||
// EditReq 修改/新增轮播图
|
||||
type EditReq struct {
|
||||
g.Meta `path:"/banner/edit" method:"post" tags:"轮播图" summary:"修改/新增轮播图"`
|
||||
sysin.BannerEditInp
|
||||
}
|
||||
|
||||
type EditRes struct{}
|
||||
|
||||
// DeleteReq 删除轮播图
|
||||
type DeleteReq struct {
|
||||
g.Meta `path:"/banner/delete" method:"post" tags:"轮播图" summary:"删除轮播图"`
|
||||
sysin.BannerDeleteInp
|
||||
}
|
||||
|
||||
type DeleteRes struct{}
|
||||
|
||||
// StatusReq 更新轮播图状态
|
||||
type StatusReq struct {
|
||||
g.Meta `path:"/banner/status" method:"post" tags:"轮播图" summary:"更新轮播图状态"`
|
||||
sysin.BannerStatusInp
|
||||
}
|
||||
|
||||
type StatusRes struct{}
|
||||
30
server/addons/flashbanner/api/admin/config/config.go
Normal file
30
server/addons/flashbanner/api/admin/config/config.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Package config
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/addons/flashbanner/model/input/sysin"
|
||||
)
|
||||
|
||||
// GetReq 获取指定分组的配置
|
||||
type GetReq struct {
|
||||
g.Meta `path:"/config/get" method:"get" tags:"轮播图管理" summary:"获取指定分组的配置"`
|
||||
sysin.GetConfigInp
|
||||
}
|
||||
|
||||
type GetRes struct {
|
||||
*sysin.GetConfigModel
|
||||
}
|
||||
|
||||
// UpdateReq 获取指定分组的配置
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/config/update" method:"post" tags:"轮播图管理" summary:"获取指定分组的配置"`
|
||||
sysin.UpdateConfigInp
|
||||
}
|
||||
|
||||
type UpdateRes struct {
|
||||
}
|
||||
33
server/addons/flashbanner/api/admin/index/banner/banner.go
Normal file
33
server/addons/flashbanner/api/admin/index/banner/banner.go
Normal file
@@ -0,0 +1,33 @@
|
||||
// Package banner
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package banner
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/addons/flashbanner/model/input/sysin"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// ListReq 查询列表
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/banner/list" method:"get" tags:"轮播图" summary:"获取轮播图列表"`
|
||||
sysin.BannerListInp
|
||||
}
|
||||
|
||||
type ListRes struct {
|
||||
List []*sysin.BannerListModel `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// ViewReq 获取指定信息
|
||||
type ViewReq struct {
|
||||
g.Meta `path:"/banner/view" method:"get" tags:"轮播图" summary:"获取指定轮播图信息"`
|
||||
sysin.BannerViewInp
|
||||
}
|
||||
|
||||
type ViewRes struct {
|
||||
*sysin.BannerViewModel
|
||||
}
|
||||
23
server/addons/flashbanner/api/admin/index/index.go
Normal file
23
server/addons/flashbanner/api/admin/index/index.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// Package index
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package index
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/addons/flashbanner/model/input/sysin"
|
||||
)
|
||||
|
||||
// TestReq 测试
|
||||
type TestReq struct {
|
||||
g.Meta `path:"/index/test" method:"get" tags:"轮播图管理" summary:"测试后台API"`
|
||||
sysin.IndexTestInp
|
||||
}
|
||||
|
||||
type TestRes struct {
|
||||
*sysin.IndexTestModel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user