This commit is contained in:
孟帅
2023-02-23 17:53:04 +08:00
parent 7cf1b8ce8e
commit 61d0988d2c
402 changed files with 18340 additions and 35547 deletions

View File

@@ -0,0 +1,62 @@
// Package addons
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package addons
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/addons/list" method:"get" tags:"插件管理" summary:"获取插件列表"`
sysin.AddonsListInp
}
type ListRes struct {
List []*sysin.AddonsListModel `json:"list" dc:"数据列表"`
form.PageRes
}
type SelectsReq struct {
g.Meta `path:"/addons/selects" method:"get" tags:"插件管理" summary:"生成入口选项"`
}
type SelectsRes struct {
*sysin.AddonsSelectsModel
}
// BuildReq 提交生成
type BuildReq struct {
g.Meta `path:"/addons/build" method:"post" tags:"插件管理" summary:"提交生成"`
sysin.AddonsBuildInp
}
type BuildRes struct {
}
// InstallReq 安装模块
type InstallReq struct {
g.Meta `path:"/addons/install" method:"post" tags:"插件管理" summary:"安装模块"`
sysin.AddonsInstallInp
}
type InstallRes struct {
}
// UpgradeReq 更新模块
type UpgradeReq struct {
g.Meta `path:"/addons/upgrade" method:"post" tags:"插件管理" summary:"更新模块"`
sysin.AddonsUpgradeInp
}
type UpgradeRes struct {
}
// UnInstallReq 卸载模块
type UnInstallReq struct {
g.Meta `path:"/addons/uninstall" method:"post" tags:"插件管理" summary:"卸载模块"`
sysin.AddonsUnInstallInp
}
type UnInstallRes struct {
}

View File

@@ -0,0 +1,68 @@
// Package attachment
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package attachment
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
MemberId int64 `json:"member_id"`
Drive string `json:"drive"`
g.Meta `path:"/attachment/list" method:"get" tags:"附件" summary:"获取附件列表"`
}
type ListRes struct {
List []*sysin.AttachmentListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取信息
type ViewReq struct {
Id int64 `json:"id" v:"required#附件ID不能为空" dc:"附件ID"`
g.Meta `path:"/attachment/view" method:"get" tags:"附件" summary:"获取指定信息"`
}
type ViewRes struct {
*sysin.AttachmentViewModel
}
// EditReq 修改/新增
type EditReq struct {
entity.AdminNotice
g.Meta `path:"/attachment/edit" method:"post" tags:"附件" summary:"修改/新增附件"`
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
Id interface{} `json:"id" v:"required#附件ID不能为空" dc:"附件ID"`
g.Meta `path:"/attachment/delete" method:"post" tags:"附件" summary:"删除附件"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"附件ID"`
g.Meta `path:"/attachment/maxSort" method:"get" tags:"附件" summary:"附件最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新状态
type StatusReq struct {
entity.AdminNotice
g.Meta `path:"/attachment/status" method:"post" tags:"附件" summary:"更新附件状态"`
}
type StatusRes struct{}

View File

@@ -0,0 +1,68 @@
// Package blacklist
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package blacklist
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
Title string `json:"title"`
Content string `json:"content"`
g.Meta `path:"/blacklist/list" method:"get" tags:"黑名单" summary:"获取黑名单列表"`
}
type ListRes struct {
List []*sysin.BlacklistListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取信息
type ViewReq struct {
Id int64 `json:"id" v:"required#黑名单ID不能为空" dc:"黑名单ID"`
g.Meta `path:"/blacklist/view" method:"get" tags:"黑名单" summary:"获取指定信息"`
}
type ViewRes struct {
*sysin.BlacklistViewModel
}
// EditReq 修改/新增
type EditReq struct {
entity.SysBlacklist
g.Meta `path:"/blacklist/edit" method:"post" tags:"黑名单" summary:"修改/新增黑名单"`
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
Id interface{} `json:"id" v:"required#黑名单ID不能为空" dc:"黑名单ID"`
g.Meta `path:"/blacklist/delete" method:"post" tags:"黑名单" summary:"删除黑名单"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"黑名单ID"`
g.Meta `path:"/blacklist/maxSort" method:"get" tags:"黑名单" summary:"黑名单最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新状态
type StatusReq struct {
entity.SysBlacklist
g.Meta `path:"/blacklist/status" method:"post" tags:"黑名单" summary:"更新黑名单状态"`
}
type StatusRes struct{}

View File

@@ -0,0 +1,39 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import "github.com/gogf/gf/v2/frame/g"
// ConsoleStatReq 控制台统计
type ConsoleStatReq struct {
g.Meta `path:"/console/stat" method:"get" tags:"控制台" summary:"综合数据统计"`
}
type ConsoleStatRes struct {
Visits struct {
DayVisits float64 `json:"dayVisits"`
Rise float64 `json:"rise"`
Decline float64 `json:"decline"`
Amount float64 `json:"amount"`
} `json:"visits"`
Saleroom struct {
WeekSaleroom float64 `json:"weekSaleroom"`
Amount float64 `json:"amount"`
Degree float64 `json:"degree"`
} `json:"saleroom"`
OrderLarge struct {
WeekLarge float64 `json:"weekLarge"`
Rise float64 `json:"rise"`
Decline float64 `json:"decline"`
Amount float64 `json:"amount"`
} `json:"orderLarge"`
Volume struct {
WeekLarge float64 `json:"weekLarge"`
Rise float64 `json:"rise"`
Decline float64 `json:"decline"`
Amount float64 `json:"amount"`
} `json:"volume"`
}

View File

@@ -0,0 +1,26 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import (
"github.com/gogf/gf/v2/frame/g"
)
// SendTestEmailReq 发送测试邮件
type SendTestEmailReq struct {
To string `json:"to" v:"required#接收者邮件不能为空" dc:"接收者邮件,多个用;隔开"`
g.Meta `path:"/ems/sendTest" tags:"邮件" method:"post" summary:"发送测试邮件"`
}
type SendTestEmailRes struct {
}
// SendBindEmsReq 发送换绑邮件
type SendBindEmsReq struct {
g.Meta `path:"/ems/sendBind" tags:"邮件" method:"post" summary:"发送换绑邮件"`
}
type SendBindEmsRes struct {
}

View File

@@ -0,0 +1,57 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/adminin"
)
// LoginLogoutReq 注销登录
type LoginLogoutReq struct {
g.Meta `path:"/site/logout" method:"get" tags:"后台基础" summary:"注销登录"`
}
type LoginLogoutRes struct{}
// LoginCaptchaReq 获取登录验证码
type LoginCaptchaReq struct {
g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"`
}
type LoginCaptchaRes struct {
Cid string `json:"cid" dc:"验证码ID"`
Base64 string `json:"base64" dc:"验证码"`
}
// LoginReq 提交登录
type LoginReq struct {
g.Meta `path:"/site/login" method:"post" tags:"后台基础" summary:"账号登录"`
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
Cid string `json:"cid" dc:"验证码ID"`
Code string `json:"code" dc:"验证码"`
IsLock bool `json:"isLock" dc:"是否为锁屏状态"`
}
type LoginRes struct {
*adminin.MemberLoginModel
}
// SiteConfigReq 获取配置
type SiteConfigReq struct {
g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"`
}
type SiteConfigRes struct {
Version string `json:"version" dc:"系统版本"`
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
Domain string `json:"domain" dc:"对外域名"`
}
// SitePingReq ping
type SitePingReq struct {
g.Meta `path:"/site/ping" method:"get" tags:"后台基础" summary:"ping"`
}
type SitePingRes struct{}

View File

@@ -0,0 +1,26 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import "github.com/gogf/gf/v2/frame/g"
// SendTestSmsReq 发送测试短信
type SendTestSmsReq struct {
Event string `json:"event" v:"required#事件模板不能为空" dc:"事件模板"`
Mobile string `json:"mobile" v:"required#接收手机号不能为空" dc:"接收手机号"`
Code string `json:"code" v:"required#接收验证码不能为空" dc:"接收验证码"`
g.Meta `path:"/sms/sendTest" tags:"短信" method:"post" summary:"发送测试短信"`
}
type SendTestSmsRes struct {
}
// SendBindSmsReq 发送换绑短信
type SendBindSmsReq struct {
g.Meta `path:"/sms/sendBind" tags:"短信" method:"post" summary:"发送换绑短信"`
}
type SendBindSmsRes struct {
}

View File

@@ -0,0 +1,26 @@
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/sysin"
)
// UploadImageReq 上传图片
type UploadImageReq struct {
g.Meta `path:"/upload/image" tags:"上传" method:"post" summary:"上传图片"`
}
type UploadImageRes *sysin.AttachmentListModel
// UploadFileReq 上传文件
type UploadFileReq struct {
g.Meta `path:"/upload/file" tags:"上传" method:"post" summary:"上传附件"`
}
type UploadFileRes *sysin.AttachmentListModel

View File

@@ -0,0 +1,36 @@
// Package config
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 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/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// GetReq 获取指定分组的配置
type GetReq struct {
Group string `json:"group" dc:"分组名称" v:"required#分组名称不能为空" `
g.Meta `path:"/config/get" method:"get" tags:"配置" summary:"获取指定分组的配置"`
}
type GetRes struct {
*sysin.GetConfigModel
}
// UpdateReq 获取指定分组的配置
type UpdateReq struct {
Group string `json:"group" dc:"分组名称" v:"required#分组名称不能为空" `
List g.Map `json:"list" dc:"更新配置列表" `
g.Meta `path:"/config/update" method:"post" tags:"配置" summary:"获取指定分组的配置"`
}
type UpdateRes struct {
}
// TypeSelectReq 数据类型选项
type TypeSelectReq struct {
g.Meta `path:"/config/typeSelect" method:"get" tags:"配置" summary:"数据类型选项"`
}
type TypeSelectRes []form.Select

View File

@@ -0,0 +1,75 @@
// Package cron
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package cron
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
Title string `json:"title"`
Content string `json:"content"`
g.Meta `path:"/cron/list" method:"get" tags:"定时任务" summary:"获取定时任务列表"`
}
type ListRes struct {
List []*sysin.CronListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取信息
type ViewReq struct {
Id int64 `json:"id" v:"required#定时任务ID不能为空" dc:"定时任务ID"`
g.Meta `path:"/cron/view" method:"get" tags:"定时任务" summary:"获取指定信息"`
}
type ViewRes struct {
*sysin.CronViewModel
}
// EditReq 修改/新增
type EditReq struct {
entity.SysCron
g.Meta `path:"/cron/edit" method:"post" tags:"定时任务" summary:"修改/新增定时任务"`
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
Id interface{} `json:"id" v:"required#定时任务ID不能为空" dc:"定时任务ID"`
g.Meta `path:"/cron/delete" method:"post" tags:"定时任务" summary:"删除定时任务"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"定时任务ID"`
g.Meta `path:"/cron/maxSort" method:"get" tags:"定时任务" summary:"定时任务最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新状态
type StatusReq struct {
entity.SysCron
g.Meta `path:"/cron/status" method:"post" tags:"定时任务" summary:"更新定时任务状态"`
}
type StatusRes struct{}
// OnlineExecReq 在线执行
type OnlineExecReq struct {
g.Meta `path:"/cron/onlineExec" method:"post" tags:"定时任务" summary:"在线执行"`
sysin.OnlineExecInp
}
type OnlineExecRes struct{}

View File

@@ -0,0 +1,75 @@
// Package cron
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package cron
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// GroupListReq 查询列表
type GroupListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
Title string `json:"title"`
Content string `json:"content"`
g.Meta `path:"/cronGroup/list" method:"get" tags:"定时任务分组" summary:"获取定时任务分组列表"`
}
type GroupListRes struct {
List []*sysin.CronGroupListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// GroupViewReq 获取信息
type GroupViewReq struct {
Id int64 `json:"id" v:"required#定时任务分组ID不能为空" dc:"定时任务分组ID"`
g.Meta `path:"/cronGroup/view" method:"get" tags:"定时任务分组" summary:"获取指定信息"`
}
type GroupViewRes struct {
*sysin.CronGroupViewModel
}
// GroupEditReq 修改/新增
type GroupEditReq struct {
entity.SysCronGroup
g.Meta `path:"/cronGroup/edit" method:"post" tags:"定时任务分组" summary:"修改/新增定时任务分组"`
}
type GroupEditRes struct{}
// GroupDeleteReq 删除
type GroupDeleteReq struct {
Id interface{} `json:"id" v:"required#定时任务分组ID不能为空" dc:"定时任务分组ID"`
g.Meta `path:"/cronGroup/delete" method:"post" tags:"定时任务分组" summary:"删除定时任务分组"`
}
type GroupDeleteRes struct{}
// GroupMaxSortReq 最大排序
type GroupMaxSortReq struct {
Id int64 `json:"id" dc:"定时任务分组ID"`
g.Meta `path:"/cronGroup/maxSort" method:"get" tags:"定时任务分组" summary:"定时任务分组最大排序"`
}
type GroupMaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// GroupStatusReq 更新状态
type GroupStatusReq struct {
entity.SysCronGroup
g.Meta `path:"/cronGroup/status" method:"post" tags:"定时任务分组" summary:"更新定时任务分组状态"`
}
type GroupStatusRes struct{}
// GroupSelectReq 定时任务分组选项
type GroupSelectReq struct {
g.Meta `path:"/cronGroup/select" method:"get" tags:"定时任务分组" summary:"定时任务分组选项"`
}
type GroupSelectRes sysin.DictTypeSelectModel

View File

@@ -0,0 +1,85 @@
// Package curddemo
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
// @AutoGenerate Version 2.1.4
// @AutoGenerate Date 2023-02-20 16:41:58
//
package curddemo
import (
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
"github.com/gogf/gf/v2/frame/g"
)
// ListReq 查询生成演示列表
type ListReq struct {
g.Meta `path:"/curdDemo/list" method:"get" tags:"生成演示" summary:"获取生成演示列表"`
sysin.CurdDemoListInp
}
type ListRes struct {
form.PageRes
List []*sysin.CurdDemoListModel `json:"list" dc:"数据列表"`
}
// ExportReq 导出生成演示列表
type ExportReq struct {
g.Meta `path:"/curdDemo/export" method:"get" tags:"生成演示" summary:"导出生成演示列表"`
sysin.CurdDemoListInp
}
type ExportRes struct{}
// ViewReq 获取生成演示指定信息
type ViewReq struct {
g.Meta `path:"/curdDemo/view" method:"get" tags:"生成演示" summary:"获取生成演示指定信息"`
sysin.CurdDemoViewInp
}
type ViewRes struct {
*sysin.CurdDemoViewModel
}
// EditReq 修改/新增生成演示
type EditReq struct {
g.Meta `path:"/curdDemo/edit" method:"post" tags:"生成演示" summary:"修改/新增生成演示"`
sysin.CurdDemoEditInp
}
type EditRes struct{}
// DeleteReq 删除生成演示
type DeleteReq struct {
g.Meta `path:"/curdDemo/delete" method:"post" tags:"生成演示" summary:"删除生成演示"`
sysin.CurdDemoDeleteInp
}
type DeleteRes struct{}
// MaxSortReq 获取生成演示最大排序
type MaxSortReq struct {
g.Meta `path:"/curdDemo/maxSort" method:"get" tags:"生成演示" summary:"获取生成演示最大排序"`
}
type MaxSortRes struct {
*sysin.CurdDemoMaxSortModel
}
// StatusReq 更新生成演示状态
type StatusReq struct {
g.Meta `path:"/curdDemo/status" method:"post" tags:"生成演示" summary:"更新生成演示状态"`
sysin.CurdDemoStatusInp
}
type StatusRes struct{}
// SwitchReq 更新生成演示开关状态
type SwitchReq struct {
g.Meta `path:"/curdDemo/switch" method:"post" tags:"生成演示" summary:"更新生成演示状态"`
sysin.CurdDemoSwitchInp
}
type SwitchRes struct{}

View File

@@ -0,0 +1,79 @@
// Package dept
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package dept
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/adminin"
)
// NameUniqueReq 名称是否唯一
type NameUniqueReq struct {
Name string `json:"name" v:"required#部门名称不能为空" dc:"部门名称"`
Id int64 `json:"id" dc:"部门ID"`
g.Meta `path:"/dept/name_unique" method:"get" tags:"部门" summary:"部门名称是否唯一"`
}
type NameUniqueRes struct {
IsUnique bool `json:"is_unique" dc:"是否唯一"`
}
// ListTreeReq 查询列表树
type ListTreeReq struct {
Id int64 `json:"id" dc:"部门ID"`
g.Meta `path:"/dept/list_tree" method:"get" tags:"部门" summary:"获取部门列表树"`
}
type ListTreeRes []*adminin.DeptListTreeModel
// ListReq 查询列表
type ListReq struct {
Name string `json:"name" dc:"部门名称"`
Code string `json:"code" dc:"部门编码"`
g.Meta `path:"/dept/list" method:"get" tags:"部门" summary:"获取部门列表"`
}
type ListRes adminin.DeptListModel
// ViewReq 获取指定信息
type ViewReq struct {
Id int64 `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
g.Meta `path:"/dept/view" method:"get" tags:"部门" summary:"获取指定信息"`
}
type ViewRes struct {
*adminin.DeptViewModel
}
// EditReq 修改/新增字典数据
type EditReq struct {
entity.AdminDept
g.Meta `path:"/dept/edit" method:"post" tags:"部门" summary:"修改/新增部门"`
}
type EditRes struct{}
// DeleteReq 删除字典类型
type DeleteReq struct {
Id interface{} `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
g.Meta `path:"/dept/delete" method:"post" tags:"部门" summary:"删除部门"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"部门ID"`
g.Meta `path:"/dept/maxSort" method:"get" tags:"部门" summary:"部门最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新部门状态
type StatusReq struct {
entity.AdminDept
g.Meta `path:"/dept/status" method:"post" tags:"部门" summary:"更新部门状态"`
}
type StatusRes struct{}

View File

@@ -0,0 +1,58 @@
// Package dict
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package dict
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// DataEditReq 修改/新增字典数据
type DataEditReq struct {
entity.SysDictData
TypeID int64 `json:"typeID" dc:"字典类型ID"`
g.Meta `path:"/dictData/edit" method:"post" tags:"字典数据" summary:"修改/新增字典数据"`
}
type DataEditRes struct{}
// DataDeleteReq 删除字典数据
type DataDeleteReq struct {
Id interface{} `json:"id" v:"required#字典数据ID不能为空" dc:"字典数据ID"`
g.Meta `path:"/dictData/delete" method:"post" tags:"字典数据" summary:"删除字典数据"`
}
type DataDeleteRes struct{}
// DataListReq 查询列表
type DataListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
TypeID int64 `json:"typeId" v:"required#字典类型ID不能为空" dc:"字典类型ID"` //
Type string `json:"type"`
Label string `json:"label"`
g.Meta `path:"/dictData/list" method:"get" tags:"字典数据" summary:"获取字典数据列表"`
}
type DataListRes struct {
List []*sysin.DictDataListModel `json:"list" dc:"数据列表"`
form.PageRes
}
type DataSelectReq struct {
g.Meta `path:"/dictData/option/{Type}" method:"get" summary:"字典数据" tags:"获取指定字典选项"`
Type string `in:"path" v:"required#字典类型不能为空" dc:"字典类型"`
}
type DataSelectRes sysin.DataSelectModel
type DataSelectsReq struct {
g.Meta `path:"/dictData/options" method:"get" summary:"字典数据" tags:"获取多个字典选项"`
Types []string `json:"types"`
}
type DataSelectsRes map[string]sysin.DataSelectModel

View File

@@ -0,0 +1,43 @@
// Package dict
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package dict
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/sysin"
)
// TypeTreeReq 字典类型树
type TypeTreeReq struct {
g.Meta `path:"/dictType/tree" tags:"字典类型" method:"get" summary:"字典类型树列表"`
}
type TypeTreeRes struct {
List []map[string]interface{} `json:"list" dc:"数据列表"`
}
// TypeEditReq 修改/新增字典数据
type TypeEditReq struct {
entity.AdminDept
g.Meta `path:"/dictType/edit" method:"post" tags:"字典类型" summary:"修改/新增字典类型"`
}
type TypeEditRes struct{}
// TypeDeleteReq 删除字典类型
type TypeDeleteReq struct {
Id interface{} `json:"id" v:"required#字典类型ID不能为空" dc:"字典类型ID"`
g.Meta `path:"/dictType/delete" method:"post" tags:"字典类型" summary:"删除字典类型"`
}
type TypeDeleteRes struct{}
// TypeSelectReq 修改/新增字典数据
type TypeSelectReq struct {
g.Meta `path:"/dictType/select" method:"get" tags:"字典类型" summary:"字典类型选项"`
}
type TypeSelectRes sysin.DictTypeSelectModel

View File

@@ -0,0 +1,61 @@
// Package emslog
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package emslog
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/emsLog/list" method:"get" tags:"邮件记录" summary:"获取邮件记录列表"`
sysin.EmsLogListInp
}
type ListRes struct {
List []*sysin.EmsLogListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取指定信息
type ViewReq struct {
g.Meta `path:"/emsLog/view" method:"get" tags:"邮件记录" summary:"获取指定信息"`
sysin.EmsLogViewInp
}
type ViewRes struct {
*sysin.EmsLogViewModel
}
// EditReq 修改/新增数据
type EditReq struct {
g.Meta `path:"/emsLog/edit" method:"post" tags:"邮件记录" summary:"修改/新增邮件记录"`
sysin.EmsLogEditInp
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
g.Meta `path:"/emsLog/delete" method:"post" tags:"邮件记录" summary:"删除邮件记录"`
sysin.EmsLogDeleteInp
}
type DeleteRes struct{}
// StatusReq 更新状态
type StatusReq struct {
g.Meta `path:"/emsLog/status" method:"post" tags:"邮件记录" summary:"更新邮件记录状态"`
sysin.EmsLogStatusInp
}
type StatusRes struct{}
// SendTestReq 更新状态
type SendTestReq struct {
g.Meta `path:"/emsLog/sendTest" method:"post" tags:"邮件记录" summary:"发送测试邮件"`
sysin.SendEmsInp
}
type SendTestRes struct{}

View File

@@ -0,0 +1,108 @@
// Package gencodes
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package gencodes
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/genCodes/list" method:"get" tags:"生成代码" summary:"获取生成代码列表"`
sysin.GenCodesListInp
}
type ListRes struct {
List []*sysin.GenCodesListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取指定信息
type ViewReq struct {
Id int64 `json:"id" v:"required#生成代码ID不能为空" dc:"生成代码ID"`
g.Meta `path:"/genCodes/view" method:"get" tags:"生成代码" summary:"获取指定信息"`
}
type ViewRes struct {
*sysin.GenCodesViewModel
}
// EditReq 修改/新增数据
type EditReq struct {
entity.SysGenCodes
g.Meta `path:"/genCodes/edit" method:"post" tags:"生成代码" summary:"修改/新增生成代码"`
}
type EditRes struct {
*sysin.GenCodesEditModel
}
// DeleteReq 删除
type DeleteReq struct {
Id interface{} `json:"id" v:"required#生成代码ID不能为空" dc:"生成代码ID"`
g.Meta `path:"/genCodes/delete" method:"post" tags:"生成代码" summary:"删除生成代码"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"生成代码ID"`
g.Meta `path:"/genCodes/maxSort" method:"get" tags:"生成代码" summary:"生成代码最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新状态
type StatusReq struct {
entity.SysGenCodes
g.Meta `path:"/genCodes/status" method:"post" tags:"生成代码" summary:"更新生成代码状态"`
}
type StatusRes struct{}
type SelectsReq struct {
g.Meta `path:"/genCodes/selects" method:"get" tags:"生成代码" summary:"生成入口选项"`
}
type SelectsRes struct {
*sysin.GenCodesSelectsModel
}
type TableSelectReq struct {
g.Meta `path:"/genCodes/tableSelect" method:"get" tags:"生成代码" summary:"数据库表选项"`
sysin.GenCodesTableSelectInp
}
type TableSelectRes []*sysin.GenCodesTableSelectModel
type ColumnSelectReq struct {
g.Meta `path:"/genCodes/columnSelect" method:"get" tags:"生成代码" summary:"表字段选项"`
sysin.GenCodesColumnSelectInp
}
type ColumnSelectRes []*sysin.GenCodesColumnSelectModel
type ColumnListReq struct {
g.Meta `path:"/genCodes/columnList" method:"get" tags:"生成代码" summary:"表字段列表"`
sysin.GenCodesColumnListInp
}
type ColumnListRes []*sysin.GenCodesColumnListModel
// PreviewReq 生成预览
type PreviewReq struct {
g.Meta `path:"/genCodes/preview" method:"post" tags:"生成代码" summary:"生成预览"`
sysin.GenCodesPreviewInp
}
type PreviewRes struct {
*sysin.GenCodesPreviewModel
}
// BuildReq 提交生成
type BuildReq struct {
g.Meta `path:"/genCodes/build" method:"post" tags:"生成代码" summary:"提交生成"`
sysin.GenCodesPreviewInp
}
type BuildRes struct {
}

View File

@@ -0,0 +1,70 @@
// Package log
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package log
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ClearReq 清空日志
type ClearReq struct {
g.Meta `path:"/log/clear" method:"post" tags:"日志" summary:"清空日志"`
}
type ClearRes struct{}
// ExportReq 导出
type ExportReq struct {
g.Meta `path:"/log/export" method:"get" tags:"日志" summary:"导出日志"`
form.PageReq
form.RangeDateReq
Module string `json:"module" dc:"应用端口"`
MemberId int `json:"member_id" dc:"用户ID"`
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
Method string `json:"method" dc:"请求方式"`
Url string `json:"url" dc:"请求路径"`
Ip string `json:"ip" dc:"访问IP"`
ErrorCode string `json:"error_code" dc:"状态码"`
}
type ExportRes struct{}
// ListReq 获取菜单列表
type ListReq struct {
g.Meta `path:"/log/list" method:"get" tags:"日志" summary:"获取日志列表"`
form.PageReq
form.RangeDateReq
Module string `json:"module" dc:"应用端口"`
MemberId int `json:"member_id" dc:"用户ID"`
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
Method string `json:"method" dc:"请求方式"`
Url string `json:"url" dc:"请求路径"`
Ip string `json:"ip" dc:"访问IP"`
ErrorCode string `json:"error_code" dc:"状态码"`
CreatedAt []int64 `json:"created_at " dc:"访问时间区间"`
}
type ListRes struct {
List []*sysin.LogListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// DeleteReq 删除
type DeleteReq struct {
g.Meta `path:"/log/delete" method:"post" tags:"日志" summary:"删除日志"`
Id interface{} `json:"id" v:"required#日志ID不能为空" description:"日志ID"`
}
type DeleteRes struct{}
// ViewReq 获取指定信息
type ViewReq struct {
g.Meta `path:"/log/view" method:"get" tags:"日志" summary:"获取指定信息"`
Id string `json:"id" v:"required#日志ID不能为空" description:"日志ID"`
}
type ViewRes struct {
*sysin.LogViewModel
}

View File

@@ -0,0 +1,50 @@
// Package loginlog
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package loginlog
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询登录日志列表
type ListReq struct {
g.Meta `path:"/loginLog/list" method:"get" tags:"登录日志" summary:"获取登录日志列表"`
sysin.LoginLogListInp
}
type ListRes struct {
form.PageRes
List []*sysin.LoginLogListModel `json:"list" dc:"数据列表"`
}
// ExportReq 导出登录日志列表
type ExportReq struct {
g.Meta `path:"/loginLog/export" method:"get" tags:"登录日志" summary:"导出登录日志列表"`
sysin.LoginLogListInp
}
type ExportRes struct{}
// ViewReq 获取登录日志指定信息
type ViewReq struct {
g.Meta `path:"/loginLog/view" method:"get" tags:"登录日志" summary:"获取登录日志指定信息"`
sysin.LoginLogViewInp
}
type ViewRes struct {
*sysin.LoginLogViewModel
}
// DeleteReq 删除登录日志
type DeleteReq struct {
g.Meta `path:"/loginLog/delete" method:"post" tags:"登录日志" summary:"删除登录日志"`
sysin.LoginLogDeleteInp
}
type DeleteRes struct{}

View File

@@ -0,0 +1,147 @@
// Package member
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package member
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"
)
// UpdateCashReq 更新提现信息
type UpdateCashReq struct {
g.Meta `path:"/member/updateCash" method:"post" tags:"用户" summary:"更新提现信息"`
adminin.MemberUpdateCashInp
}
type UpdateCashRes struct{}
// UpdateEmailReq 换绑邮箱
type UpdateEmailReq struct {
g.Meta `path:"/member/updateEmail" method:"post" tags:"用户" summary:"换绑邮箱"`
adminin.MemberUpdateEmailInp
}
type UpdateEmailRes struct{}
// UpdateMobileReq 换绑手机号
type UpdateMobileReq struct {
g.Meta `path:"/member/updateMobile" method:"post" tags:"用户" summary:"换绑手机号"`
adminin.MemberUpdateMobileInp
}
type UpdateMobileRes struct{}
// UpdateProfileReq 更新用户资料
type UpdateProfileReq struct {
g.Meta `path:"/member/updateProfile" method:"post" tags:"用户" summary:"更新用户资料"`
adminin.MemberUpdateProfileInp
}
type UpdateProfileRes struct{}
// UpdatePwdReq 修改登录密码
type UpdatePwdReq struct {
g.Meta `path:"/member/updatePwd" method:"post" tags:"用户" summary:"重置密码"`
adminin.MemberUpdatePwdInp
}
type UpdatePwdRes struct{}
// ResetPwdReq 重置密码
type ResetPwdReq struct {
g.Meta `path:"/member/resetPwd" method:"post" tags:"用户" summary:"重置密码"`
adminin.MemberResetPwdInp
}
type ResetPwdRes struct{}
// EmailUniqueReq 邮箱是否唯一
type EmailUniqueReq struct {
g.Meta `path:"/member/emailUnique" method:"get" tags:"用户" summary:"邮箱是否唯一"`
adminin.MemberEmailUniqueInp
}
type EmailUniqueRes struct {
*adminin.MemberEmailUniqueModel
}
// MobileUniqueReq 手机号是否唯一
type MobileUniqueReq struct {
g.Meta `path:"/member/mobileUnique" method:"get" tags:"用户" summary:"手机号是否唯一"`
adminin.MemberMobileUniqueInp
}
type MobileUniqueRes struct {
*adminin.MemberMobileUniqueModel
}
// NameUniqueReq 名称是否唯一
type NameUniqueReq struct {
g.Meta `path:"/member/nameUnique" method:"get" tags:"用户" summary:"用户名称是否唯一"`
adminin.MemberNameUniqueInp
}
type NameUniqueRes struct {
*adminin.MemberNameUniqueModel
}
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/member/list" method:"get" tags:"用户" summary:"获取用户列表"`
adminin.MemberListInp
}
type ListRes struct {
List []*adminin.MemberListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取指定信息
type ViewReq struct {
g.Meta `path:"/member/view" method:"get" tags:"用户" summary:"获取指定信息"`
adminin.MemberViewInp
}
type ViewRes struct {
*adminin.MemberViewModel
}
// EditReq 修改/新增
type EditReq struct {
g.Meta `path:"/member/edit" method:"post" tags:"用户" summary:"修改/新增用户"`
adminin.MemberEditInp
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
g.Meta `path:"/member/delete" method:"post" tags:"用户" summary:"删除用户"`
adminin.MemberDeleteInp
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
g.Meta `path:"/member/maxSort" method:"get" tags:"用户" summary:"用户最大排序"`
adminin.MemberMaxSortInp
}
type MaxSortRes struct {
*adminin.MemberMaxSortModel
}
// LoginInfoReq 获取登录用户信息
type LoginInfoReq struct {
g.Meta `path:"/member/info" method:"get" tags:"用户" summary:"获取登录用户信息" dc:"获取管理后台的登录用户信息"`
}
type LoginInfoRes struct {
*adminin.LoginMemberInfoModel
}
// StatusReq 更新用户状态
type StatusReq struct {
g.Meta `path:"/member/status" method:"post" tags:"用户" summary:"更新用户状态"`
adminin.MemberStatusInp
}
type StatusRes struct{}
// SelectReq 获取可选的后台用户选项
type SelectReq struct {
g.Meta `path:"/member/option" method:"get" summary:"用户" tags:"获取可选的后台用户选项"`
}
type SelectRes []*adminin.MemberSelectModel

View File

@@ -0,0 +1,97 @@
// Package menu
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package menu
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
)
// MaxSortReq 菜单最大排序
type MaxSortReq struct {
g.Meta `path:"/menu/maxSort" method:"get" tags:"菜单" summary:"菜单最大排序"`
Id int64 `json:"id" dc:"菜单ID"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// CodeUniqueReq 菜单编码是否唯一
type CodeUniqueReq struct {
g.Meta `path:"/menu/code_unique" method:"get" tags:"菜单" summary:"菜单编码是否唯一"`
Code string `json:"code" v:"required#菜单编码不能为空" dc:"菜单编码"`
Id int64 `json:"id" dc:"菜单ID"`
}
type CodeUniqueRes struct {
IsUnique bool `json:"is_unique" dc:"是否唯一"`
}
// NameUniqueReq 菜单名称是否唯一
type NameUniqueReq struct {
g.Meta `path:"/menu/name_unique" method:"get" tags:"菜单" summary:"菜单名称是否唯一"`
Name string `json:"name" v:"required#菜单名称不能为空" dc:"菜单名称"`
Id int64 `json:"id" dc:"菜单ID"`
}
type NameUniqueRes struct {
IsUnique bool `json:"is_unique" dc:"是否唯一"`
}
// EditReq 修改/新增菜单
type EditReq struct {
g.Meta `path:"/menu/edit" method:"post" tags:"菜单" summary:"修改/新增菜单"`
entity.AdminMenu
}
type EditRes struct{}
// DeleteReq 删除菜单
type DeleteReq struct {
g.Meta `path:"/menu/delete" method:"post" tags:"菜单" summary:"删除菜单"`
Id interface{} `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
}
type DeleteRes struct{}
// ViewReq 获取指定菜单信息
type ViewReq struct {
g.Meta `path:"/menu/view" method:"get" tags:"菜单" summary:"获取指定菜单信息"`
Id string `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
}
type ViewRes struct {
*entity.AdminMenu
}
// ListReq 获取菜单列表
type ListReq struct {
g.Meta `path:"/menu/list" method:"get" tags:"菜单" summary:"获取菜单列表"`
form.PageReq
Pid int64 `json:"pid" dc:"父ID"`
}
type ListRes struct {
List []map[string]interface{} `json:"list" dc:"数据列表"`
}
// SearchListReq 查询菜单列表
type SearchListReq struct {
g.Meta `path:"/menu/search_list" method:"get" tags:"菜单" summary:"获取菜单列表"`
Name string `json:"name" dc:"菜单名称"`
form.StatusReq
}
type SearchListRes []*model.TreeMenu
// RoleListReq 查询角色菜单列表
type RoleListReq struct {
g.Meta `path:"/menu/role_list" method:"get" tags:"菜单" summary:"查询角色菜单列表"`
RoleId string `json:"role_id" dc:"角色ID"`
}
type RoleListRes struct {
Menus []*model.LabelTreeMenu `json:"menus" dc:"菜单列表"`
CheckedKeys []int64 `json:"checkedKeys" dc:"选择的菜单ID"`
}

View File

@@ -0,0 +1,69 @@
// Package monitor
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package monitor
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
)
// OfflineReq 下线用户
type OfflineReq struct {
g.Meta `path:"/monitor/offline" method:"post" tags:"在线用户" summary:"下线用户"`
Id string `json:"id" v:"required#SID不能为空" description:"SID"`
}
type OfflineRes struct{}
// OnlineListReq 获取在线用户列表
type OnlineListReq struct {
g.Meta `path:"/monitor/onlineList" method:"get" tags:"在线用户" summary:"获取监控列表"`
form.PageReq
form.RangeDateReq
form.StatusReq
UserId int64 `json:"userId" description:"用户ID"`
Addr string `json:"addr" description:"登录地址"`
}
type OnlineListRes struct {
List []*OnlineModel `json:"list" description:"数据列表"`
form.PageRes
}
// OnlineViewReq 获取指定信息
type OnlineViewReq struct {
g.Meta `path:"/monitor/onlineView" method:"get" tags:"在线用户" summary:"获取指定用户信息"`
Id string `json:"id" v:"required#SID不能为空" description:"SID"`
}
type OnlineViewRes struct {
*OnlineModel
}
type OnlineModel struct {
ID string `json:"id"` // 连接唯一标识
Addr string `json:"addr"` // 客户端地址
Os string `json:"os"` // 客户端系统名称
Browser string `json:"browser"` // 浏览器
FirstTime uint64 `json:"firstTime"` // 首次连接时间
HeartbeatTime uint64 `json:"heartbeatTime"` // 用户上次心跳时间
App string `json:"app"` // 应用名称
UserId int64 `json:"userId"` // 用户ID
Username string `json:"username"` // 用户名
Avatar string `json:"avatar"` // 头像
ExpTime int64 `json:"expTime"` // 过期时间
}
type OnlineModels []*OnlineModel
func (p OnlineModels) Len() int {
return len(p)
}
func (p OnlineModels) Swap(i, j int) {
p[i], p[j] = p[j], p[i]
}
func (p OnlineModels) Less(i, j int) bool {
return p[j].FirstTime < p[i].FirstTime
}

View File

@@ -0,0 +1,129 @@
// Package notice
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package notice
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"
)
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/notice/list" method:"get" tags:"公告" summary:"获取公告列表"`
adminin.NoticeListInp
}
type ListRes struct {
List []*adminin.NoticeListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取指定信息
type ViewReq struct {
g.Meta `path:"/notice/view" method:"get" tags:"公告" summary:"获取指定信息"`
adminin.NoticeViewInp
}
type ViewRes struct {
*adminin.NoticeViewModel
}
// EditReq 修改/新增字典数据
type EditReq struct {
g.Meta `path:"/notice/edit" method:"post" tags:"公告" summary:"修改/新增公告"`
adminin.NoticeEditInp
}
type EditRes struct{}
// DeleteReq 删除字典类型
type DeleteReq struct {
g.Meta `path:"/notice/delete" method:"post" tags:"公告" summary:"删除公告"`
adminin.NoticeDeleteInp
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
g.Meta `path:"/notice/maxSort" method:"get" tags:"公告" summary:"公告最大排序"`
adminin.NoticeMaxSortInp
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新公告状态
type StatusReq struct {
g.Meta `path:"/notice/status" method:"post" tags:"公告" summary:"更新公告状态"`
adminin.NoticeStatusInp
}
type StatusRes struct{}
// EditNotifyReq 修改/新增通知
type EditNotifyReq struct {
g.Meta `path:"/notice/editNotify" method:"post" tags:"公告" summary:"修改/新增通知"`
adminin.NoticeEditInp
}
type EditNotifyRes struct{}
// EditNoticeReq 修改/新增公告
type EditNoticeReq struct {
g.Meta `path:"/notice/editNotice" method:"post" tags:"公告" summary:"修改/新增公告"`
adminin.NoticeEditInp
}
type EditNoticeRes struct{}
// EditLetterReq 修改/新增公告
type EditLetterReq struct {
g.Meta `path:"/notice/editLetter" method:"post" tags:"公告" summary:"修改/新增私信"`
adminin.NoticeEditInp
}
type EditLetterRes struct{}
// PullMessagesReq 拉取我的消息
type PullMessagesReq struct {
g.Meta `path:"/notice/pullMessages" method:"get" tags:"公告" summary:"拉取我的消息"`
adminin.PullMessagesInp
}
type PullMessagesRes struct {
*adminin.PullMessagesModel
}
// ReadAllReq 全部已读
type ReadAllReq struct {
g.Meta `path:"/notice/readAll" method:"post" tags:"公告" summary:"全部已读"`
adminin.NoticeReadAllInp
}
type ReadAllRes struct {
}
// UpReadReq 更新已读
type UpReadReq struct {
g.Meta `path:"/notice/upRead" method:"post" tags:"公告" summary:"更新已读"`
adminin.NoticeUpReadInp
}
type UpReadRes struct{}
// MessageListReq 我的消息列表
type MessageListReq struct {
g.Meta `path:"/notice/messageList" method:"get" tags:"公告" summary:"我的消息列表"`
adminin.NoticeMessageListInp
}
type MessageListRes struct {
List []*adminin.NoticeMessageListModel `json:"list" dc:"数据列表"`
form.PageRes
}

View File

@@ -0,0 +1,88 @@
// Package post
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package post
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"
)
// EditReq 修改/新增岗位
type EditReq struct {
g.Meta `path:"/post/edit" method:"post" tags:"岗位" summary:"修改/新增岗位"`
entity.AdminPost
}
type EditRes struct{}
// DeleteReq 删除岗位
type DeleteReq struct {
g.Meta `path:"/post/delete" method:"post" tags:"岗位" summary:"删除岗位"`
Id interface{} `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
g.Meta `path:"/post/maxSort" method:"get" tags:"岗位" summary:"岗位最大排序"`
Id int64 `json:"id" description:"岗位ID"`
}
type MaxSortRes struct {
Sort int `json:"sort" description:"排序"`
}
// ListReq 获取列表
type ListReq struct {
g.Meta `path:"/post/list" method:"get" tags:"岗位" summary:"获取岗位列表"`
form.PageReq
form.RangeDateReq
form.StatusReq
Name string `json:"name" description:"岗位名称"`
Code string `json:"code" description:"岗位编码"`
}
type ListRes struct {
List []*adminin.PostListModel `json:"list" description:"数据列表"`
form.PageRes
}
// ViewReq 获取指定信息
type ViewReq struct {
g.Meta `path:"/post/view" method:"get" tags:"岗位" summary:"获取指定信息"`
Id string `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
}
type ViewRes struct {
*adminin.PostViewModel
}
// CodeUniqueReq 编码是否唯一
type CodeUniqueReq struct {
g.Meta `path:"/post/code_unique" method:"get" tags:"岗位" summary:"岗位编码是否唯一"`
Code string `json:"code" v:"required#岗位编码不能为空" description:"岗位编码"`
Id int64 `json:"id" description:"岗位ID"`
}
type CodeUniqueRes struct {
IsUnique bool `json:"is_unique" description:"是否唯一"`
}
// NameUniqueReq 名称是否唯一
type NameUniqueReq struct {
g.Meta `path:"/post/name_unique" method:"get" tags:"岗位" summary:"岗位名称是否唯一"`
Name string `json:"name" v:"required#岗位名称不能为空" description:"岗位名称"`
Id int64 `json:"id" description:"岗位ID"`
}
type NameUniqueRes struct {
IsUnique bool `json:"is_unique" description:"是否唯一"`
}
// StatusReq 更新状态
type StatusReq struct {
entity.AdminPost
g.Meta `path:"/post/status" method:"post" tags:"岗位" summary:"更新岗位状态"`
}
type StatusRes struct{}

View File

@@ -0,0 +1,111 @@
// Package provinces
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package provinces
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
Title string `json:"title"`
Content string `json:"content"`
g.Meta `path:"/provinces/list" method:"get" tags:"省市区" summary:"获取省市区列表"`
}
type ListRes struct {
List []*sysin.ProvincesListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取信息
type ViewReq struct {
Id int64 `json:"id" v:"required#省市区ID不能为空" dc:"省市区ID"`
g.Meta `path:"/provinces/view" method:"get" tags:"省市区" summary:"获取指定信息"`
}
type ViewRes struct {
*sysin.ProvincesViewModel
}
// EditReq 修改/新增
type EditReq struct {
g.Meta `path:"/provinces/edit" method:"post" tags:"省市区" summary:"修改/新增省市区"`
sysin.ProvincesEditInp
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
g.Meta `path:"/provinces/delete" method:"post" tags:"省市区" summary:"删除省市区"`
sysin.ProvincesDeleteInp
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
g.Meta `path:"/provinces/maxSort" method:"get" tags:"省市区" summary:"省市区最大排序"`
}
type MaxSortRes struct {
*sysin.ProvincesMaxSortModel
}
// StatusReq 更新状态
type StatusReq struct {
entity.SysProvinces
g.Meta `path:"/provinces/status" method:"post" tags:"省市区" summary:"更新省市区状态"`
}
type StatusRes struct{}
// TreeReq 关系树选项列表
type TreeReq struct {
g.Meta `path:"/provinces/tree" tags:"省市区" method:"get" summary:"省市区关系树选项列表"`
}
type TreeRes struct {
List []map[string]interface{} `json:"list" dc:"数据列表"`
}
// ChildrenListReq 获取省市区下级列表
type ChildrenListReq struct {
g.Meta `path:"/provinces/childrenList" method:"get" tags:"省市区" summary:"获取省市区下级列表"`
sysin.ProvincesChildrenListInp
}
type ChildrenListRes struct {
List []*sysin.ProvincesChildrenListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// UniqueIdReq 地区ID是否唯一
type UniqueIdReq struct {
g.Meta `path:"/provinces/uniqueId" method:"get" tags:"省市区" summary:"地区ID是否唯一"`
sysin.ProvincesUniqueIdInp
}
type UniqueIdRes struct {
*sysin.ProvincesUniqueIdModel
}
// SelectReq 省市区选项
type SelectReq struct {
g.Meta `path:"/provinces/select" method:"get" summary:"省市区" tags:"省市区选项"`
sysin.ProvincesSelectInp
}
type SelectRes struct {
*sysin.ProvincesSelectModel
}
// CityLabelReq 获取指定城市标签
type CityLabelReq struct {
g.Meta `path:"/provinces/cityLabel" method:"get" summary:"省市区" tags:"获取指定城市标签"`
sysin.ProvincesCityLabelInp
}
type CityLabelRes sysin.ProvincesCityLabelModel

View File

@@ -0,0 +1,146 @@
// Package role
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package role
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/adminin"
"hotgo/internal/model/input/form"
)
// MemberListReq 查询列表
type MemberListReq struct {
g.Meta `path:"/role/member_list" method:"get" tags:"角色" summary:"获取角色下的用户列表"`
form.PageReq
form.RangeDateReq
form.StatusReq
Role int `json:"role" description:"角色ID"`
DeptId int `json:"deptId" description:"部门ID"`
Mobile int `json:"mobile" description:"手机号"`
Username string `json:"username" description:"用户名"`
Realname string `json:"realname" description:"真实姓名"`
StartTime string `json:"start_time" description:"开始时间"`
EndTime string `json:"end_time" description:"结束时间"`
Name string `json:"name" description:"岗位名称"`
Code string `json:"code" description:"岗位编码"`
}
type MemberListRes struct {
List []*adminin.MemberListModel `json:"list" description:"数据列表"`
form.PageRes
}
// ListReq 查询列表
type ListReq struct {
g.Meta `path:"/role/list" method:"get" tags:"角色" summary:"获取角色列表"`
form.PageReq
form.RangeDateReq
form.StatusReq
DeptId int `json:"deptId" description:"部门ID"`
Mobile int `json:"mobile" description:"手机号"`
Username string `json:"username" description:"用户名"`
Realname string `json:"realname" description:"真实姓名"`
StartTime string `json:"start_time" description:"开始时间"`
EndTime string `json:"end_time" description:"结束时间"`
Name string `json:"name" description:"岗位名称"`
Code string `json:"code" description:"岗位编码"`
}
type ListRes struct {
List []g.Map `json:"list" description:"数据列表"`
form.PageRes
}
// DynamicReq 动态路由
type DynamicReq struct {
g.Meta `path:"/role/dynamic" method:"get" tags:"路由" summary:"获取动态路由" description:"获取登录用户动态路由"`
}
type DynamicMeta struct {
Title string `json:"title" description:"菜单标题"`
Icon string `json:"icon" description:"菜单图标"`
NoCache bool `json:"noCache" description:"是否缓存"`
Remark string `json:"remark" description:"备注"`
}
type DynamicBase struct {
Id int64 `json:"id" description:"菜单ID"`
Pid int64 `json:"pid" description:"父ID"`
Name string `json:"name" description:"菜单名称"`
Code string `json:"code" description:"菜单编码"`
Path string `json:"path" description:"路由地址"`
Hidden bool `json:"hidden" description:"是否隐藏"`
Redirect string `json:"redirect" description:"重定向"`
Component string `json:"component" description:"组件路径"`
AlwaysShow bool `json:"alwaysShow" description:"暂时不知道干啥"`
IsFrame string `json:"isFrame" description:"是否为外链0是 1否"`
Meta *DynamicMeta `json:"meta" description:"配置数据集"`
}
type DynamicMenu struct {
DynamicBase
Children []*DynamicBase `json:"children" description:"子菜单"`
}
type DynamicRes struct {
List []adminin.MenuRoute `json:"list" description:"数据列表"`
}
type MenuEditReq struct {
g.Meta `path:"/role/edit" method:"post" tags:"角色" summary:"编辑角色"`
RoleId int64 `json:"id"`
MenuIds []int64 `json:"menuIds"`
}
type MenuEditRes struct{}
type UpdatePermissionsReq struct {
g.Meta `path:"/role/updatePermissions" method:"post" tags:"角色" summary:"编辑角色菜单权限"`
RoleId int64 `json:"id"`
MenuIds []int64 `json:"menuIds"`
}
type UpdatePermissionsRes struct{}
type GetPermissionsReq struct {
g.Meta `path:"/role/getPermissions" method:"get" tags:"角色" summary:"获取指定角色权限"`
RoleId int64 `json:"id"`
}
type GetPermissionsRes struct {
MenuIds []int64 `json:"menuIds"`
}
// EditReq 修改/新增角色
type EditReq struct {
g.Meta `path:"/role/edit" method:"post" tags:"角色" summary:"修改/新增角色"`
entity.AdminRole
}
type EditRes struct{}
// DeleteReq 删除角色
type DeleteReq struct {
g.Meta `path:"/role/delete" method:"post" tags:"角色" summary:"删除角色"`
Id int64 `json:"id" v:"required"`
}
type DeleteRes struct{}
// DataScopeSelectReq 获取数据权限选项
type DataScopeSelectReq struct {
g.Meta `path:"/role/dataScope/select" method:"get" summary:"角色" tags:"获取数据权限选项"`
}
type DataScopeSelectRes struct {
List form.Selects `json:"list" dc:"数据选项"`
}
// DataScopeEditReq 修改指定角色的数据权限
type DataScopeEditReq struct {
g.Meta `path:"/role/dataScope/edit" method:"post" tags:"角色" summary:"修改指定角色的数据权限"`
adminin.DataScopeEditInp
}
type DataScopeEditRes struct{}

View File

@@ -0,0 +1,50 @@
// Package servelog
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package servelog
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询服务日志列表
type ListReq struct {
g.Meta `path:"/serveLog/list" method:"get" tags:"服务日志" summary:"获取服务日志列表"`
sysin.ServeLogListInp
}
type ListRes struct {
form.PageRes
List []*sysin.ServeLogListModel `json:"list" dc:"数据列表"`
}
// ExportReq 导出服务日志列表
type ExportReq struct {
g.Meta `path:"/serveLog/export" method:"get" tags:"服务日志" summary:"导出服务日志列表"`
sysin.ServeLogListInp
}
type ExportRes struct{}
// ViewReq 获取服务日志指定信息
type ViewReq struct {
g.Meta `path:"/serveLog/view" method:"get" tags:"服务日志" summary:"获取服务日志指定信息"`
sysin.ServeLogViewInp
}
type ViewRes struct {
*sysin.ServeLogViewModel
}
// DeleteReq 删除服务日志
type DeleteReq struct {
g.Meta `path:"/serveLog/delete" method:"post" tags:"服务日志" summary:"删除服务日志"`
sysin.ServeLogDeleteInp
}
type DeleteRes struct{}

View File

@@ -0,0 +1,69 @@
package smslog
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model/entity"
"hotgo/internal/model/input/form"
"hotgo/internal/model/input/sysin"
)
// ListReq 查询列表
type ListReq struct {
form.PageReq
form.RangeDateReq
form.StatusReq
Title string `json:"title"`
Content string `json:"content"`
g.Meta `path:"/smsLog/list" method:"get" tags:"短信记录" summary:"获取短信记录列表"`
}
type ListRes struct {
List []*sysin.SmsLogListModel `json:"list" dc:"数据列表"`
form.PageRes
}
// ViewReq 获取指定信息
type ViewReq struct {
Id int64 `json:"id" v:"required#短信记录ID不能为空" dc:"短信记录ID"`
g.Meta `path:"/smsLog/view" method:"get" tags:"短信记录" summary:"获取指定信息"`
}
type ViewRes struct {
*sysin.SmsLogViewModel
}
// EditReq 修改/新增数据
type EditReq struct {
entity.SysSmsLog
g.Meta `path:"/smsLog/edit" method:"post" tags:"短信记录" summary:"修改/新增短信记录"`
}
type EditRes struct{}
// DeleteReq 删除
type DeleteReq struct {
Id interface{} `json:"id" v:"required#短信记录ID不能为空" dc:"短信记录ID"`
g.Meta `path:"/smsLog/delete" method:"post" tags:"短信记录" summary:"删除短信记录"`
}
type DeleteRes struct{}
// MaxSortReq 最大排序
type MaxSortReq struct {
Id int64 `json:"id" dc:"短信记录ID"`
g.Meta `path:"/smsLog/maxSort" method:"get" tags:"短信记录" summary:"短信记录最大排序"`
}
type MaxSortRes struct {
Sort int `json:"sort" dc:"排序"`
}
// StatusReq 更新状态
type StatusReq struct {
entity.SysSmsLog
g.Meta `path:"/smsLog/status" method:"post" tags:"短信记录" summary:"更新短信记录状态"`
}
type StatusRes struct{}
// SendTestReq 更新状态
type SendTestReq struct {
entity.SysSmsLog
g.Meta `path:"/smsLog/sendTest" method:"post" tags:"短信记录" summary:"发送测试短信"`
}
type SendTestRes struct{}

View File

@@ -0,0 +1,18 @@
// Package user
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package user
import (
"github.com/gogf/gf/v2/frame/g"
)
type HelloReq struct {
g.Meta `path:"/hello" tags:"Hello" method:"get" summary:"You first hello api"`
}
type HelloRes struct {
g.Meta `mime:"text/html" example:"string"`
}