chore: 初始开源发布

iotlcm-admin-svr:管理后台服务。

- Go module:iotlcm → git.5iot.com/iotlcm-public/iotlcm-admin-svr(729 文件)
- 凭据与地址脱敏:JWT signingKey(含代码里的 MustGet 默认值)、
  MySQL DSN、Redis 口令、告警邮件发件人邮箱全部改为占位;
  私网 IP → 文档地址段;库名 xiujie_admin → iotlcm
- 真实手机号/邮箱 → 合法 11 位编造号 / example.com
- 移除内部资产:CI 触发器、过时 DDL(sql/db_iotlcm.sql)、
  私有依赖 go get 行、明文 registry 登录口令
- 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名
- Dockerfile 改用公共基础镜像
- 拼错的 RADEME.md → README.md,README 重写
- 需要真实数据库的用例改为可用 IOTLCM_TEST_WITH_DB=1 显式启用
- 补 Apache-2.0 LICENSE,LF 行尾 + .gitattributes

数据库 schema 不随本仓发布(生产 DDL 已过时),README 已说明。
This commit is contained in:
MiFaZhan
2026-10-23 14:46:05 +08:00
commit 59eb34976a
1132 changed files with 138197 additions and 0 deletions
+93
View File
@@ -0,0 +1,93 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"github.com/gogf/gf/v2/frame/g"
)
type LoginReq struct {
g.Meta `path:"/auth/login" method:"post" tags:"系统-授权" summary:"登录"`
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
CaptchaID string `json:"captchaID" dc:"验证码ID"`
CaptchaValue string `json:"captchaValue" v:"required#验证码不能为空" dc:"验证码"`
}
type LoginRes struct {
ID int64 `json:"id" dc:"用户ID"`
Username string `json:"username" dc:"用户名"`
NickName string `json:"nickName" dc:"昵称"`
Avatar string `json:"avatar" dc:"头像"`
AccessToken string `json:"accessToken" dc:"访问令牌"`
}
type SendSmsLoginCodeReq struct {
g.Meta `path:"/auth/sms-code" method:"post" tags:"系统-授权" summary:"发送手机验证码登录短信"`
Phone string `json:"phone" v:"required|phone#手机号不能为空|手机号格式不正确" dc:"手机号"`
}
type SendSmsLoginCodeRes struct{}
type SmsLoginReq struct {
g.Meta `path:"/auth/sms-login" method:"post" tags:"系统-授权" summary:"手机验证码登录"`
Phone string `json:"phone" v:"required|phone#手机号不能为空|手机号格式不正确" dc:"手机号"`
Code string `json:"code" v:"required|length:6,6#验证码不能为空|验证码应为6位" dc:"短信验证码"`
}
type SmsLoginRes struct {
ID int64 `json:"id" dc:"用户ID"`
Username string `json:"username" dc:"用户名"`
NickName string `json:"nickName" dc:"昵称"`
Avatar string `json:"avatar" dc:"头像"`
AccessToken string `json:"accessToken" dc:"访问令牌"`
}
type RefreshTokenReq struct {
g.Meta `path:"/auth/refresh" method:"post" tags:"系统-授权" summary:"刷新访问令牌"`
WithCredentials bool `json:"withCredentials" dc:"是否携带凭证"`
}
type RefreshTokenRes struct {
Data string `json:"data" dc:"新的访问令牌"`
Status int `json:"status" dc:"状态码"`
}
type LogoutReq struct {
g.Meta `path:"/auth/logout" method:"post" tags:"系统-授权" summary:"退出登录"`
WithCredentials bool `json:"withCredentials" dc:"是否携带凭证"`
}
type LogoutRes struct {
Data string `json:"data" dc:"退出登录"`
Status int `json:"status" dc:"状态码"`
}
type GetAccessCodesReq struct {
g.Meta `path:"/auth/codes" method:"get" tags:"系统-授权" summary:"获取用户权限码"`
IsCache bool `json:"isCache" dc:"是否从缓存中获取"`
}
type GetAccessCodesRes struct {
Data []string `json:"data" dc:"用户权限码"`
Status int `json:"status" dc:"状态码"`
}
type TenantListReq struct {
g.Meta `path:"/auth/getTenantList" method:"get" tags:"系统-授权" summary:"获取租户列表"`
}
type TenantListData struct {
CompanyName string `json:"companyName" dc:"企业名称"`
Domain string `json:"domain" dc:"域名"`
TenantId string `json:"tenantId" dc:"租户ID"`
}
type TenantListRes struct {
TenantEnabled bool `json:"tenantEnabled" dc:"是否启用租户"`
VoList []TenantListData `json:"voList" dc:"租户列表"`
}
+18
View File
@@ -0,0 +1,18 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import "github.com/gogf/gf/v2/frame/g"
// 获取验证码
type GetCaptchaReq struct {
g.Meta `path:"/captcha" method:"get" tags:"系统-授权" summary:"获取验证码"`
}
type GetCaptchaRes struct {
CaptchaID string `json:"captchaID" dc:"验证码ID"`
CaptchaImage string `json:"captchaImage" dc:"验证码图片"`
}
+68
View File
@@ -0,0 +1,68 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysClientListReq struct {
g.Meta `path:"/client/list" method:"get" tags:"系统-客户端管理" summary:"获取客户端列表" x-check-permission:"cpm:system:client:list"`
model.SysClientListParam
}
type SysClientListRes struct {
Items []*model.SysClientListModel `json:"items"`
response.PageResult
}
type SysClientViewReq struct {
g.Meta `path:"/client/view" method:"get" tags:"系统-客户端管理" summary:"获取客户端详情" x-check-permission:"cpm:system:client:query"`
*model.SysClientViewParam
}
type SysClientViewRes struct {
*model.SysClientViewModel
}
type SysClientAddReq struct {
g.Meta `path:"/client/add" method:"post" tags:"系统-客户端管理" summary:"添加客户端" x-check-permission:"cpm:system:client:add"`
*model.SysClientAddParam
}
type SysClientAddRes struct {
*model.SysClientAddModel
}
type SysClientEditReq struct {
g.Meta `path:"/client/edit" method:"post" tags:"系统-客户端管理" summary:"编辑客户端" x-check-permission:"cpm:system:client:edit"`
*model.SysClientEditParam
}
type SysClientEditRes struct {
*model.SysClientEditModel
}
type SysClientDeleteReq struct {
g.Meta `path:"/client/delete" method:"post" tags:"系统-客户端管理" summary:"删除客户端" x-check-permission:"cpm:system:client:remove"`
*model.SysClientDeleteParam
}
type SysClientDeleteRes struct {
*model.SysClientDeleteModel
}
type SysClientStatusReq struct {
g.Meta `path:"/client/status" method:"post" tags:"系统-客户端管理" summary:"修改客户端状态" x-check-permission:"cpm:system:client:edit"`
*model.SysClientStatusParam
}
type SysClientStatusRes struct {
*model.SysClientStatusModel
}
+59
View File
@@ -0,0 +1,59 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type GetConfigListReq struct {
g.Meta `path:"/config/list" method:"get" tags:"系统-配置管理" summary:"获取系统配置列表" x-check-permission:"cpm:system:config:list"`
model.SysConfigListParam
}
type GetConfigListRes struct {
response.PageResult
Data []*model.SysConfigListModel `json:"items" dc:"系统配置列表"`
}
type AddConfigReq struct {
g.Meta `path:"/config/add" method:"post" tags:"系统-配置管理" summary:"添加系统配置" x-check-permission:"cpm:system:config:add"`
model.SysConfigAddParam
}
type AddConfigRes struct {
model.SysConfigAddModel
}
type EditConfigReq struct {
g.Meta `path:"/config/edit" method:"post" tags:"系统-配置管理" summary:"编辑系统配置" x-check-permission:"cpm:system:config:edit"`
model.SysConfigEditParam
}
type EditConfigRes struct {
model.SysConfigEditModel
}
type DeleteConfigReq struct {
g.Meta `path:"/config/delete" method:"post" tags:"系统-配置管理" summary:"删除系统配置" x-check-permission:"cpm:system:config:remove"`
model.SysConfigDeleteParam
}
type DeleteConfigRes struct {
model.SysConfigDeleteModel
}
type GetConfigByIdReq struct {
g.Meta `path:"/config/view" method:"get" tags:"系统-配置管理" summary:"获取系统配置详情" x-check-permission:"cpm:system:config:query"`
model.SysConfigViewParam
}
type GetConfigByIdRes struct {
model.SysConfigViewModel
}
+83
View File
@@ -0,0 +1,83 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type DeptListReq struct {
g.Meta `path:"/dept/list" method:"get" tags:"系统-部门管理" summary:"获取部门列表" x-check-permission:"cpm:system:dept:list"`
request.PageInfo
model.SysDeptListParam
}
type DeptListRes struct {
response.PageResult
Data []*model.SysDeptListModel `json:"items" dc:"部门列表"`
}
type DeptTreeReq struct {
g.Meta `path:"/dept/tree" method:"get" tags:"系统-部门管理" summary:"获取部门树" x-check-permission:"cpm:system:dept:list"`
model.SysDeptTreeParam
}
type DeptTreeRes struct {
Data []*model.SysDeptTreeModel `json:"items" dc:"部门树"`
}
// DeptFullTreeReq 组织管理页专用的完整部门树。
//
// 与 DeptTreeReq 分开而非复用:/dept/tree 有 10+ 处调用方(部门选择器、
// 用户管理左栏、通知公告等),它们只依赖精简的7 个字段,不能改动其结构。
type DeptFullTreeReq struct {
g.Meta `path:"/dept/tree/full" method:"get" tags:"系统-部门管理" summary:"获取完整部门树" x-check-permission:"cpm:system:dept:list"`
model.SysDeptFullTreeParam
}
type DeptFullTreeRes struct {
Data []*model.SysDeptFullTreeModel `json:"items" dc:"完整部门树"`
}
type DeptAddReq struct {
g.Meta `path:"/dept/add" method:"post" tags:"系统-部门管理" summary:"新增部门" x-check-permission:"cpm:system:dept:add"`
model.SysDeptAddModel
}
type DeptAddRes struct {
DeptId int64 `json:"deptId" dc:"部门id"`
}
type DeptEditReq struct {
g.Meta `path:"/dept/edit" method:"post" tags:"系统-部门管理" summary:"编辑部门" x-check-permission:"cpm:system:dept:edit"`
model.SysDeptEditModel
}
type DeptEditRes struct {
DeptId int64 `json:"deptId" dc:"部门id"`
}
type DeptDeleteReq struct {
g.Meta `path:"/dept/delete" method:"post" tags:"系统-部门管理" summary:"删除部门" x-check-permission:"cpm:system:dept:remove"`
model.SysDeptDeleteModel
}
type DeptDeleteRes struct {
DeptId int64 `json:"deptId" dc:"部门id"`
}
type DeptViewReq struct {
g.Meta `path:"/dept/view" method:"get" tags:"系统-部门管理" summary:"获取部门详情" x-check-permission:"cpm:system:dept:query"`
model.SysDeptViewModel
}
type DeptViewRes struct {
model.SysDeptViewModel
}
+108
View File
@@ -0,0 +1,108 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysDictTypeListReq struct {
g.Meta `path:"/dict/list" method:"get" tags:"系统-字典管理" summary:"字典类型列表" x-check-permission:"cpm:system:dict:list"`
model.SysDictTypeListParam
}
type SysDictTypeListRes struct {
response.PageResult
Items []model.SysDictTypeListModel `json:"items"`
}
type SysDictTypeAddReq struct {
g.Meta `path:"/dict-type/add" method:"post" tags:"系统-字典管理" summary:"新增字典类型" x-check-permission:"cpm:system:dict:add"`
model.SysDictTypeAddParam
}
type SysDictTypeAddRes struct {
model.SysDictTypeAddModel
}
type SysDictTypeEditReq struct {
g.Meta `path:"/dict-type/edit" method:"post" tags:"系统-字典管理" summary:"编辑字典类型" x-check-permission:"cpm:system:dict:edit"`
model.SysDictTypeEditParam
}
type SysDictTypeEditRes struct {
model.SysDictTypeEditModel
}
type SysDictTypeDeleteReq struct {
g.Meta `path:"/dict-type/delete" method:"post" tags:"系统-字典管理" summary:"删除字典类型" x-check-permission:"cpm:system:dict:remove"`
model.SysDictTypeDeleteParam
}
type SysDictTypeDeleteRes struct {
model.SysDictTypeDeleteModel
}
type SysDictTypeViewReq struct {
g.Meta `path:"/dict-type/view" method:"get" tags:"系统-字典管理" summary:"字典类型详情" x-check-permission:"cpm:system:dict:query"`
model.SysDictTypeViewParam
}
type SysDictTypeViewRes struct {
model.SysDictTypeViewModel
}
type SysDictDataListReq struct {
g.Meta `path:"/dict-data/list/{id}" method:"get" tags:"系统-字典管理" summary:"字典数据列表" `
request.PageInfo
model.SysDictDataListParam
}
type SysDictDataListRes struct {
response.PageResult
Items []model.SysDictDataListModel `json:"items"`
Type *model.SysDictTypeViewModel `json:"type"`
}
type SysDictDataAddReq struct {
g.Meta `path:"/dict-data/add" method:"post" tags:"系统-字典管理" summary:"新增字典数据" x-check-permission:"cpm:system:dict:add"`
model.SysDictDataAddParam
}
type SysDictDataAddRes struct {
model.SysDictDataAddModel
}
type SysDictDataEditReq struct {
g.Meta `path:"/dict-data/edit" method:"post" tags:"系统-字典管理" summary:"编辑字典数据" x-check-permission:"cpm:system:dict:edit"`
model.SysDictDataEditParam
}
type SysDictDataEditRes struct {
model.SysDictDataEditModel
}
type SysDictDataDeleteReq struct {
g.Meta `path:"/dict-data/delete" method:"post" tags:"系统-字典管理" summary:"删除字典数据" x-check-permission:"cpm:system:dict:remove"`
model.SysDictDataDeleteParam
}
type SysDictDataDeleteRes struct {
model.SysDictDataDeleteModel
}
type SysDictDataViewReq struct {
g.Meta `path:"/dict-data/view" method:"get" tags:"系统-字典管理" summary:"字典数据详情" x-check-permission:"cpm:system:dict:query"`
model.SysDictDataViewParam
}
type SysDictDataViewRes struct {
model.SysDictDataViewModel
}
+83
View File
@@ -0,0 +1,83 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
// 获取任务列表
type SysJobListReq struct {
g.Meta `path:"/job/list" method:"get" tags:"系统-任务管理" summary:"获取任务列表" x-check-permission:"cpm:system:job:list"`
model.SysJobListParam
request.PageInfo
}
type SysJobListRes struct {
Data []*model.SysJobListModel `json:"items" dc:"任务列表"`
response.PageResult
}
// 获取任务详情
type SysJobViewReq struct {
g.Meta `path:"/job/view" method:"get" tags:"系统-任务管理" summary:"获取任务详情" x-check-permission:"cpm:system:job:view"`
JobId int64 `v:"required" json:"jobId" dc:"任务ID"`
}
type SysJobViewRes struct {
model.SysJobViewModel
}
// 添加任务
type SysJobAddReq struct {
g.Meta `path:"/job/add" method:"post" tags:"系统-任务管理" summary:"添加任务" x-check-permission:"cpm:system:job:add"`
model.SysJobAddModel
}
type SysJobAddRes struct {
model.SysJobViewModel
}
// 更新任务
type SysJobUpdateReq struct {
g.Meta `path:"/job/update" method:"post" tags:"系统-任务管理" summary:"更新任务" x-check-permission:"cpm:system:job:update"`
model.SysJobUpdateModel
}
type SysJobUpdateRes struct {
model.SysJobViewModel
}
// 更新任务
type SysJobUpdateStatusReq struct {
g.Meta `path:"/job/status" method:"post" tags:"系统" summary:"更新任务状态" x-check-permission:"cpm:system:job:status"`
model.SysJobUpdateStatusModel
}
type SysJobUpdateStatusRes = SysJobUpdateRes
// 删除任务
type SysJobDeleteReq struct {
g.Meta `path:"/job/delete" method:"post" tags:"系统-任务管理" summary:"删除任务" x-check-permission:"cpm:system:job:delete"`
JobIds []int64 `json:"jobId" dc:"任务ID"`
}
type SysJobExecReq struct {
g.Meta `path:"/job/exec" method:"post" tags:"系统" summary:"执行任务" x-check-permission:"cpm:system:job:exec"`
JobId int64 `v:"required" json:"jobId" dc:"任务ID"`
}
type SysJobDeleteRes struct {
JobIds []int64 `json:"jobId" dc:"任务ID"`
}
type SysJobExecRes struct {
JobId int64 `json:"jobId" dc:"任务ID"`
}
+32
View File
@@ -0,0 +1,32 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type ListLogininforReq struct {
g.Meta `path:"/logininfor/list" method:"get" tags:"系统-日志管理" summary:"登录信息列表" x-check-permission:"cpm:monitor:logininfor:list"`
model.SysLogininforListParam
}
type ListLogininforRes struct {
Items []*model.SysLogininforListModel `json:"items"`
response.PageResult
}
type DeleteLogininforReq struct {
g.Meta `path:"/logininfor/delete" method:"post" tags:"系统-日志管理" summary:"删除登录信息" x-check-permission:"cpm:monitor:logininfor:remove"`
model.SysLogininforDeleteParam
}
type DeleteLogininforRes struct {
model.SysLogininforDeleteModel
}
+127
View File
@@ -0,0 +1,127 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
// 路由菜单
type RouteMenu struct {
Id int64 `json:"id" dc:"路由ID"`
ParentId int64 `json:"parentId" dc:"父路由ID"`
Path string `json:"path" dc:"路由路径"`
Redirect *string `json:"redirect,omitempty" dc:"重定向路径"`
Name string `json:"name" dc:"路由名称"` // 必须唯一
Component string `json:"component" dc:"组件路径"`
Meta *RouteMeta `json:"meta,omitempty" dc:"路由元数据"`
Children []*RouteMenu `json:"children,omitempty" dc:"子路由"`
}
// 路由元数据
// 对应 vue/packages/@core/base/typings/src/vue-router.d.ts
type RouteMeta struct {
Title string `json:"title" dc:"菜单标题"`
Icon *string `json:"icon,omitempty" dc:"菜单图标"`
Order *int `json:"order,omitempty" dc:"菜单排序"`
OpenInNewWindow *bool `json:"openInNewWindow,omitempty" dc:"是否在新窗口打开"`
NoBasicLayout *bool `json:"noBasicLayout,omitempty" dc:"是否不使用基础布局"`
HideInMenu *bool `json:"hideInMenu,omitempty" dc:"是否隐藏菜单"`
HideInBreadcrumb *bool `json:"hideInBreadcrumb,omitempty" dc:"是否隐藏面包屑"`
HideChildrenInMenu *bool `json:"hideChildrenInMenu,omitempty" dc:"是否隐藏子菜单"`
HideInTab *bool `json:"hideInTab,omitempty" dc:"是否隐藏标签页"`
MenuVisibleWithForbidden *bool `json:"menuVisibleWithForbidden,omitempty" dc:"菜单可见但访问会被重定向到403"`
IgnoreAccess *bool `json:"ignoreAccess,omitempty" dc:"忽略权限,直接可以访问"`
KeepAlive *bool `json:"keepAlive,omitempty" dc:"开启KeepAlive缓存"`
Link *string `json:"link,omitempty" dc:"外链-跳转路径"`
Query map[string]string `json:"query,omitempty" dc:"路由所携带的参数"`
IframeSrc *string `json:"iframeSrc,omitempty" dc:"iframe地址"`
MaxNumOfOpenTab *int `json:"maxNumOfOpenTab,omitempty" dc:"标签页最大打开数量"`
Badge *string `json:"badge,omitempty" dc:"徽标"`
BadgeType *string `json:"badgeType,omitempty" dc:"徽标类型"`
BadgeVariants *string `json:"badgeVariants,omitempty" dc:"徽标颜色"`
Authority []string `json:"authority,omitempty" dc:"需要特定的角色标识才可以访问"`
AffixTab *bool `json:"affixTab,omitempty" dc:"是否固定标签页"`
AffixTabOrder *int `json:"affixTabOrder,omitempty" dc:"固定标签页的顺序"`
ActiveIcon *string `json:"activeIcon,omitempty" dc:"激活图标"`
ActivePath *string `json:"activePath,omitempty" dc:"当前激活的菜单"`
}
// 获取用户所有菜单
type MenuAllReq struct {
g.Meta `path:"/menu/all" method:"get" tags:"系统-菜单管理" summary:"获取用户所有菜单" x-check-permission:""`
}
// type MenuAllRes struct {
// Data []RouteMenu `json:"data" dc:"菜单列表"`
// }
type MenuAllRes = []*RouteMenu
type MenuListReq struct {
g.Meta `path:"/menu/list" method:"get" tags:"系统-菜单管理" summary:"获取菜单列表" x-check-permission:"cpm:system:menu:list"`
model.SysMenuListParam
}
type MenuListRes struct {
Data []*model.SysMenuListModel `json:"items" dc:"菜单列表"`
Total int `json:"total" dc:"总数"`
}
type MenuViewReq struct {
g.Meta `path:"/menu/view" method:"get" tags:"系统-菜单管理" summary:"获取菜单详情" x-check-permission:"cpm:system:menu:query"`
MenuId int64 `json:"menuId" dc:"菜单ID"`
}
type MenuViewRes struct {
model.SysMenuViewModel
}
type MenuAddReq struct {
g.Meta `path:"/menu/add" method:"post" tags:"系统-菜单管理" summary:"添加菜单" x-check-permission:"cpm:system:menu:add"`
model.SysMenuAddModel
}
type MenuAddRes struct {
model.SysMenuViewModel
}
type MenuUpdateReq struct {
g.Meta `path:"/menu/update" method:"post" tags:"系统-菜单管理" summary:"更新菜单" x-check-permission:"cpm:system:menu:edit"`
model.SysMenuUpdateModel
}
type MenuUpdateRes struct {
model.SysMenuViewModel
}
type MenuDeleteReq struct {
g.Meta `path:"/menu/delete" method:"post" tags:"系统-菜单管理" summary:"删除菜单" x-check-permission:"cpm:system:menu:remove"`
MenuId int64 `json:"menuId" dc:"菜单ID"`
}
type MenuDeleteRes struct {
}
// MenuTreeReq 菜单树,服务于两个场景:
// 1. 菜单管理页(需要 cpm:system:menu:list)
// 2. 角色管理页里的授权树(需要 cpm:system:role:query)
//
// 二者权限域不同,因此用逗号分隔声明为「或」关系:拥有任一权限即可调用。
// 逗号 OR 语义由中间件实现(internal/logic/middleware/middleware.go 中对
// x-check-permission 按 "," 切分后逐个匹配,任一通过即放行)。
//
// 若只要求 cpm:system:menu:list,则只有角色管理权限、没有菜单管理权限的用户
// 将无法打开授权树。此设计与 /agent/menu/tree 使用角色权限的思路一致。
type MenuTreeReq struct {
g.Meta `path:"/menu/tree" method:"get" tags:"系统-菜单管理" summary:"获取菜单树" x-check-permission:"cpm:system:menu:list,cpm:system:role:query"`
model.SysMenuListParam
}
type MenuTreeRes struct {
Data []*model.SysMenuFullTreeModel `json:"items" dc:"菜单树"`
}
+59
View File
@@ -0,0 +1,59 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysNoticeListReq struct {
g.Meta `path:"/notice/list" method:"get" tags:"系统-公告管理" summary:"公告列表" x-check-permission:"cpm:system:notice:list"`
*model.SysNoticeListParam
}
type SysNoticeListRes struct {
response.PageResult
Items []*model.SysNoticeListModel `json:"items"`
}
type SysNoticeAddReq struct {
g.Meta `path:"/notice/add" method:"post" tags:"系统-公告管理" summary:"新增公告" x-check-permission:"cpm:system:notice:add"`
*model.SysNoticeAddParam
}
type SysNoticeAddRes struct {
*model.SysNoticeAddModel
}
type SysNoticeEditReq struct {
g.Meta `path:"/notice/edit" method:"post" tags:"系统-公告管理" summary:"编辑公告" x-check-permission:"cpm:system:notice:edit"`
*model.SysNoticeEditParam
}
type SysNoticeEditRes struct {
*model.SysNoticeEditModel
}
type SysNoticeDeleteReq struct {
g.Meta `path:"/notice/delete" method:"post" tags:"系统-公告管理" summary:"删除公告" x-check-permission:"cpm:system:notice:remove"`
*model.SysNoticeDeleteParam
}
type SysNoticeDeleteRes struct {
*model.SysNoticeDeleteModel
}
type SysNoticeViewReq struct {
g.Meta `path:"/notice/view" method:"get" tags:"系统-公告管理" summary:"查看公告" x-check-permission:"cpm:system:notice:query"`
*model.SysNoticeViewParam
}
type SysNoticeViewRes struct {
*model.SysNoticeViewModel
}
+33
View File
@@ -0,0 +1,33 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysUserOnlineListReq struct {
g.Meta `path:"/user-online/list" method:"get" tags:"监控-在线用户管理" summary:"系统用户在线列表" x-check-permission:"cpm:monitor:online:list"`
request.PageInfo
model.SysUserOnlineListParam
}
type SysUserOnlineListRes struct {
Items []*model.SysUserOnlineListModel `json:"items"`
response.PageResult
}
type SysUserOnlineDeleteReq struct {
g.Meta `path:"/user-online/delete" method:"post" tags:"监控-在线用户管理" summary:"系统用户在线删除" x-check-permission:"cpm:monitor:online:remove"`
Ids []int64 `json:"ids"`
}
type SysUserOnlineDeleteRes struct {
}
+25
View File
@@ -0,0 +1,25 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type GetOperLogListReq struct {
g.Meta `path:"/oper-log/list" method:"get" tags:"系统-日志管理" summary:"操作日志列表" x-check-permission:"cpm:monitor:operlog:list"`
model.SysOperLogListParam
request.PageInfo
}
type GetOperLogListRes struct {
Items []*model.SysOperLogListModel `json:"items"`
response.PageResult
}
+43
View File
@@ -0,0 +1,43 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysOssListReq struct {
g.Meta `path:"/oss/list" method:"get" tags:"系统-存储管理" summary:"获取OSS列表" x-check-permission:"cpm:system:oss:list"`
model.SysOssListParam
request.PageInfo
}
type SysOssListRes struct {
Items []*model.SysOssListModel `json:"items"`
response.PageResult
}
type SysOssViewReq struct {
g.Meta `path:"/oss/view" method:"get" tags:"系统-存储管理" summary:"查看文件" x-check-permission:"cpm:system:oss:query"`
*model.SysOssViewParam
}
type SysOssViewRes struct {
*model.SysOssViewModel
}
type SysOssDeleteReq struct {
g.Meta `path:"/oss/delete" method:"post" tags:"系统-存储管理" summary:"删除文件" x-check-permission:"cpm:system:oss:remove"`
*model.SysOssDeleteParam
}
type SysOssDeleteRes struct {
*model.SysOssDeleteModel
}
+54
View File
@@ -0,0 +1,54 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysOssConfigListReq struct {
g.Meta `path:"/oss-config/list" method:"get" tags:"系统-存储管理" summary:"获取存储配置列表" x-check-permission:"cpm:system:ossConfig:list"`
*model.SysOssConfigListParam
}
type SysOssConfigListRes struct {
response.PageResult
Items []*model.SysOssConfigListModel `json:"items"`
}
type SysOssConfigViewReq struct {
g.Meta `path:"/oss-config/view" method:"get" tags:"系统-存储管理" summary:"获取存储配置详情" x-check-permission:"cpm:system:ossConfig:list"`
*model.SysOssConfigViewParam
}
type SysOssConfigViewRes struct {
*model.SysOssConfigViewModel
}
type SysOssConfigAddReq struct {
g.Meta `path:"/oss-config/add" method:"post" tags:"系统-存储管理" summary:"新增存储配置" x-check-permission:"cpm:system:ossConfig:add"`
*model.SysOssConfigAddParam
}
type SysOssConfigAddRes struct {
*model.SysOssConfigAddModel
}
type SysOssConfigEditReq struct {
g.Meta `path:"/oss-config/edit" method:"post" tags:"系统-存储管理" summary:"编辑存储配置" x-check-permission:"cpm:system:ossConfig:edit"`
*model.SysOssConfigEditParam
}
type SysOssConfigEditRes struct {
*model.SysOssConfigEditModel
}
type SysOssConfigDeleteReq struct {
g.Meta `path:"/oss-config/delete" method:"post" tags:"系统-存储管理" summary:"删除存储配置" x-check-permission:"cpm:system:ossConfig:remove"`
*model.SysOssConfigDeleteParam
}
type SysOssConfigDeleteRes struct {
*model.SysOssConfigDeleteModel
}
+68
View File
@@ -0,0 +1,68 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type PostListReq struct {
g.Meta `path:"/post/list" method:"get" tags:"系统-岗位管理" summary:"获取岗位列表" x-check-permission:"cpm:system:post:list"`
*model.SysPostListParam
}
type PostListRes struct {
response.PageResult
Data []*model.SysPostListModel `json:"items" dc:"岗位列表"`
}
type PostAddReq struct {
g.Meta `path:"/post/add" method:"post" tags:"系统-岗位管理" summary:"新增岗位" x-check-permission:"cpm:system:post:add"`
*model.SysPostAddParam
}
type PostAddRes struct {
*model.SysPostAddModel
}
type PostEditReq struct {
g.Meta `path:"/post/edit" method:"post" tags:"系统-岗位管理" summary:"编辑岗位" x-check-permission:"cpm:system:post:edit"`
*model.SysPostEditParam
}
type PostEditRes struct {
*model.SysPostEditModel
}
type PostDeleteReq struct {
g.Meta `path:"/post/delete" method:"post" tags:"系统-岗位管理" summary:"删除岗位"`
*model.SysPostDeleteParam
}
type PostDeleteRes struct {
*model.SysPostDeleteModel
}
type PostViewReq struct {
g.Meta `path:"/post/view" method:"get" tags:"系统-岗位管理" summary:"获取岗位详情" x-check-permission:"cpm:system:post:list"`
*model.SysPostViewParam
}
type PostViewRes struct {
*model.SysPostViewModel
}
type PostExportReq struct {
g.Meta `path:"/post/export" method:"post" tags:"系统-岗位管理" summary:"导出岗位" x-check-permission:"cpm:system:post:export"`
*model.SysPostExportParam
}
type PostExportRes struct {
*model.SysPostExportModel
}
+83
View File
@@ -0,0 +1,83 @@
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"github.com/gogf/gf/v2/frame/g"
)
// 获取登录二维码
type QrcodeLoginReq struct {
g.Meta `path:"/qrcode/login" method:"get" tags:"系统-二维码" summary:"获取登录二维码"`
}
type QrcodeLoginRes struct {
model.QrcodeLoginModel
}
// 获取登录二维码扫码结果
type QrcodeLoginStatusReq struct {
g.Meta `path:"/qrcode/login/status" method:"get" tags:"系统-二维码" summary:"获取登录二维码扫码状态"`
TempUserId string `json:"tempUserId" dc:"临时用户ID" v:"required#临时用户ID不能为空"`
}
type QrcodeLoginStatusRes struct {
model.QrcodeLoginModel
}
// 获取绑定二维码
type QrcodeBindReq struct {
g.Meta `path:"/qrcode/bind" method:"get" tags:"系统-二维码" summary:"获取绑定二维码"`
}
type QrcodeBindRes struct {
model.QrcodeCacheModel
}
// 获取绑定二维码扫码结果
type QrcodeBindStatusReq struct {
g.Meta `path:"/qrcode/bind/status" method:"get" tags:"系统-二维码" summary:"获取绑定二维码扫码状态"`
}
type QrcodeBindStatusRes struct {
model.QrcodeBindStatusModel
}
// 扫码成功回调
type QrcodeScanCallbackReq struct {
g.Meta `path:"/qrcode/scan/callback" method:"post" tags:"系统-二维码" summary:"扫码成功回调"`
model.QrcodeScanCallbackParam
}
type QrcodeScanCallbackRes struct {
}
// 注册并关联OpenId
type QrcodeRegisterAndBindOpenIdReq struct {
g.Meta `path:"/qrcode/registerAndBindOpenId" method:"post" tags:"系统-二维码" summary:"注册并关联OpenId"`
model.QrcodeRegisterAndBindOpenIdParam
}
type QrcodeRegisterAndBindOpenIdRes struct {
model.QrcodeLoginAndBindOpenIdModel
}
// 登录并关联OpenId
type QrcodeLoginAndBindOpenIdReq struct {
g.Meta `path:"/qrcode/loginAndBindOpenId" method:"post" tags:"系统-二维码" summary:"登录并关联OpenId"`
model.QrcodeLoginAndBindOpenIdParam
}
type QrcodeLoginAndBindOpenIdRes struct {
model.QrcodeLoginAndBindOpenIdModel
}
// 扫码后选择用户登录
type QrcodeLoginSelectUserReq struct {
g.Meta `path:"/qrcode/loginSelectUser" method:"post" tags:"系统-二维码" summary:"扫码后选择用户登录"`
model.QrcodeLoginSelectUserIdParam
}
type QrcodeLoginSelectUserRes struct {
model.QrcodeLoginAndBindOpenIdModel
}
+69
View File
@@ -0,0 +1,69 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type RoleListReq struct {
g.Meta `path:"/role/list" method:"get" tags:"系统-角色管理" summary:"获取角色列表" x-check-permission:"cpm:system:role:list"`
request.PageInfo
model.SysRoleListParam
}
type RoleListRes struct {
response.PageResult
Data []*model.SysRoleListModel `json:"items" dc:"角色列表"`
}
type RoleAddReq struct {
g.Meta `path:"/role/add" method:"post" tags:"系统-角色管理" summary:"新增角色" x-check-permission:"cpm:system:role:add"`
model.SysRoleAddParam
}
type RoleAddRes struct {
model.SysRoleAddModel
}
type RoleEditReq struct {
g.Meta `path:"/role/edit" method:"post" tags:"系统-角色管理" summary:"编辑角色" x-check-permission:"cpm:system:role:edit"`
model.SysRoleEditParam
}
type RoleEditRes struct {
model.SysRoleEditModel
}
type RoleDeleteReq struct {
g.Meta `path:"/role/delete" method:"post" tags:"系统-角色管理" summary:"删除角色" x-check-permission:"cpm:system:role:remove"`
model.SysRoleDeleteParam
}
type RoleDeleteRes struct {
model.SysRoleDeleteModel
}
type RoleViewReq struct {
g.Meta `path:"/role/view" method:"get" tags:"系统-角色管理" summary:"获取角色详情" x-check-permission:"cpm:system:role:query"`
model.SysRoleViewParam
}
type RoleViewRes struct {
model.SysRoleViewModel
}
type RoleDataScopeEditReq struct {
g.Meta `path:"/role/dataScope" method:"post" tags:"系统-角色管理" summary:"编辑角色数据权限" x-check-permission:"cpm:system:role:edit"`
model.SysRoleDataScopeEditParam
}
type RoleDataScopeEditRes struct {
}
+34
View File
@@ -0,0 +1,34 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysSocialListReq struct {
g.Meta `path:"/social/list" method:"get" tags:"系统-第三方授权管理" summary:"社交列表" x-check-permission:"cpc:current:user"`
model.SysSocialListParam
request.PageInfo
}
type SysSocialListRes struct {
Items []*model.SysSocialListModel `json:"items"`
response.PageResult
}
// 删除绑定关系
type SysSocialDeleteReq struct {
g.Meta `path:"/social/delete" method:"post" tags:"系统-第三方授权管理" summary:"删除社交" x-check-permission:"cpc:current:user"`
Id int64 `json:"id" dc:"主键"`
}
type SysSocialDeleteRes struct {
}
+75
View File
@@ -0,0 +1,75 @@
// Package sysnoticeuser
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package v1 //sysnoticeuser
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
// ListReq 查询用户通知公告表列表
type SysNoticeUserListReq struct {
g.Meta `path:"/sysNoticeUser/list" method:"get" tags:"系统-用户通知公告表" summary:"获取用户通知公告表列表" x-check-permission:"cpm:system:sysNoticeUser:list,cpc:current:user"`
model.SysNoticeUserListParam
}
type SysNoticeUserListRes struct {
response.PageResult
Items []*model.SysNoticeUserListModel `json:"items" dc:"数据列表"`
}
// ExportReq 导出用户通知公告表列表
type SysNoticeUserExportReq struct {
g.Meta `path:"/sysNoticeUser/export" method:"post" tags:"系统-用户通知公告表" summary:"导出用户通知公告表列表" x-check-permission:"cpm:system:sysNoticeUser:export,cpc:current:user"`
model.SysNoticeUserListParam
}
type SysNoticeUserExportRes struct{}
// ViewReq 获取用户通知公告表指定信息
type SysNoticeUserViewReq struct {
g.Meta `path:"/sysNoticeUser/view" method:"get" tags:"系统-用户通知公告表" summary:"获取用户通知公告表指定信息" x-check-permission:"cpm:system:sysNoticeUser:view,cpc:current:user"`
model.SysNoticeUserViewParam
}
type SysNoticeUserViewRes struct {
*model.SysNoticeUserViewModel
}
// EditReq 修改/新增用户通知公告表
type SysNoticeUserEditReq struct {
g.Meta `path:"/sysNoticeUser/edit" method:"post" tags:"系统-用户通知公告表" summary:"修改/新增用户通知公告表" x-check-permission:"cpm:system:sysNoticeUser:edit,cpc:current:user"`
model.SysNoticeUserEditParam
}
type SysNoticeUserEditRes struct{}
// DeleteReq 删除用户通知公告表
type SysNoticeUserDeleteReq struct {
g.Meta `path:"/sysNoticeUser/delete" method:"post" tags:"系统-用户通知公告表" summary:"删除用户通知公告表" x-check-permission:"cpm:system:sysNoticeUser:delete,cpc:current:user"`
model.SysNoticeUserDeleteParam
}
type SysNoticeUserDeleteRes struct{}
// StatusReq 更新用户通知公告表状态
type SysNoticeUserStatusReq struct {
g.Meta `path:"/sysNoticeUser/status" method:"post" tags:"系统-用户通知公告表" summary:"更新用户通知公告表状态" x-check-permission:"cpm:system:sysNoticeUser:status,cpc:current:user"`
model.SysNoticeUserStatusParam
}
type SysNoticeUserStatusRes struct{}
// ReadReq 已读
type SysNoticeUserReadReq struct {
g.Meta `path:"/sysNoticeUser/read" method:"post" tags:"系统-用户通知公告表" summary:"已读" x-check-permission:"cpm:system:sysNoticeUser:read,cpc:current:user"`
model.SysNoticeUserReadParam
}
type SysNoticeUserReadRes struct{}
+135
View File
@@ -0,0 +1,135 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type SysTenantListReq struct {
g.Meta `path:"/tenant/list" method:"get" tags:"系统-租户管理" summary:"租户列表" x-check-permission:"cpm:system:tenant:list"`
request.PageInfo
*model.SysTenantListParam
}
type SysTenantListRes struct {
response.PageResult
Items []*model.SysTenantListModel `json:"items"`
}
type SysTenantAddReq struct {
g.Meta `path:"/tenant/add" method:"post" tags:"系统-租户管理" summary:"租户添加" x-check-permission:"cpm:system:tenant:add"`
*model.SysTenantAddParam
}
type SysTenantAddRes struct {
*model.SysTenantAddModel
}
type SysTenantEditReq struct {
g.Meta `path:"/tenant/edit" method:"post" tags:"系统-租户管理" summary:"租户编辑" x-check-permission:"cpm:system:tenant:edit"`
*model.SysTenantEditParam
}
type SysTenantEditRes struct {
*model.SysTenantEditModel
}
type SysTenantDeleteReq struct {
g.Meta `path:"/tenant/delete" method:"post" tags:"系统-租户管理" summary:"租户删除" x-check-permission:"cpm:system:tenant:remove"`
*model.SysTenantDeleteParam
}
type SysTenantDeleteRes struct {
*model.SysTenantDeleteModel
}
type SysTenantStatusReq struct {
g.Meta `path:"/tenant/status" method:"post" tags:"系统-租户管理" summary:"租户状态" x-check-permission:"cpm:system:tenant:edit"`
*model.SysTenantStatusParam
}
type SysTenantStatusRes struct {
*model.SysTenantStatusModel
}
type SysTenantViewReq struct {
g.Meta `path:"/tenant/view" method:"get" tags:"系统-租户管理" summary:"租户详情" x-check-permission:"cpm:system:tenant:query"`
*model.SysTenantViewParam
}
type SysTenantViewRes struct {
*model.SysTenantViewModel
}
type SysTenantSyncMenuReq struct {
g.Meta `path:"/tenant/syncmenu" method:"post" tags:"系统-租户管理" summary:"同步租户菜单" x-check-permission:"cpm:system:tenant:syncmenu"`
*model.SysTenantSyncMenuParam
}
type SysTenantSyncMenuRes struct {
*model.SysTenantSyncMenuModel
}
type SysTenantPackageListReq struct {
g.Meta `path:"/tenant/package/list" method:"get" tags:"系统-租户管理" summary:"租户套餐列表" x-check-permission:"cpm:system:tenant:package:list"`
request.PageInfo
model.SysTenantPackageListParam
}
type SysTenantPackageListRes struct {
response.PageResult
Items []*model.SysTenantPackageListModel `json:"items"`
}
type SysTenantPackageViewReq struct {
g.Meta `path:"/tenant/package/view" method:"get" tags:"系统-租户管理" summary:"租户套餐详情" x-check-permission:"cpm:system:tenantPackage:query"`
*model.SysTenantPackageViewParam
}
type SysTenantPackageViewRes struct {
*model.SysTenantPackageViewModel
}
type SysTenantPackageStatusReq struct {
g.Meta `path:"/tenant/package/status" method:"post" tags:"系统-租户管理" summary:"租户套餐状态" x-check-permission:"cpm:system:tenantPackage:edit"`
*model.SysTenantPackageStatusParam
}
type SysTenantPackageStatusRes struct {
*model.SysTenantPackageStatusModel
}
type SysTenantPackageAddReq struct {
g.Meta `path:"/tenant/package/add" method:"post" tags:"系统-租户管理" summary:"租户套餐添加" x-check-permission:"cpm:system:tenantPackage:add"`
*model.SysTenantPackageAddParam
}
type SysTenantPackageAddRes struct {
*model.SysTenantPackageAddModel
}
type SysTenantPackageEditReq struct {
g.Meta `path:"/tenant/package/edit" method:"post" tags:"系统-租户管理" summary:"租户套餐编辑" x-check-permission:"cpm:system:tenantPackage:edit"`
*model.SysTenantPackageEditParam
}
type SysTenantPackageEditRes struct {
*model.SysTenantPackageEditModel
}
type SysTenantPackageDeleteReq struct {
g.Meta `path:"/tenant/package/delete" method:"post" tags:"系统-租户管理" summary:"租户套餐删除" x-check-permission:"cpm:system:tenantPackage:remove"`
*model.SysTenantPackageDeleteParam
}
type SysTenantPackageDeleteRes struct {
*model.SysTenantPackageDeleteModel
}
+77
View File
@@ -0,0 +1,77 @@
// Package ttplatformsetting
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2026 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
// @AutoGenerate Version
package v1 //ttplatformsetting
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
// ListReq 查询二级域名站点个性化配置表列表
type TTplatformSettingListReq struct {
g.Meta `path:"/tTplatformSetting/list" method:"get" tags:"二级表" summary:"表" summary:"获取二级域名站点个性化配置表列表" x-check-permission:"cpm:system:tTplatformSetting:list"`
model.TTplatformSettingListParam
}
type TTplatformSettingListRes struct {
response.PageResult
Items []*model.TTplatformSettingListModel `json:"items" dc:"数据列表"`
}
// ExportReq 导出二级域名站点个性化配置表列表
type TTplatformSettingExportReq struct {
g.Meta `path:"/tTplatformSetting/export" method:"post" tags:"二级表" summary:"导出二级域名站点个性化配置表列表" x-check-permission:"cpm:system:tTplatformSetting:export"`
model.TTplatformSettingListParam
}
type TTplatformSettingExportRes struct{}
// ViewReq 获取二级域名站点个性化配置表指定信息
type TTplatformSettingViewReq struct {
g.Meta `path:"/tTplatformSetting/view" method:"get" tags:"二级表" summary:"获取二级域名站点个性化配置表指定信息" x-check-permission:"cpm:system:tTplatformSetting:view"`
model.TTplatformSettingViewParam
}
type TTplatformSettingViewRes struct {
*model.TTplatformSettingViewModel
}
// EditReq 修改/新增二级域名站点个性化配置表
type TTplatformSettingEditReq struct {
g.Meta `path:"/tTplatformSetting/edit" method:"post" tags:"二级表" summary:"修改/新增二级域名站点个性化配置表" x-check-permission:"cpm:system:tTplatformSetting:edit"`
model.TTplatformSettingEditParam
}
type TTplatformSettingEditRes struct{}
// DeleteReq 删除二级域名站点个性化配置表
type TTplatformSettingDeleteReq struct {
g.Meta `path:"/tTplatformSetting/delete" method:"post" tags:"二级表" summary:"删除二级域名站点个性化配置表" x-check-permission:"cpm:system:tTplatformSetting:delete"`
model.TTplatformSettingDeleteParam
}
type TTplatformSettingDeleteRes struct{}
// MaxSortReq 获取二级域名站点个性化配置表最大排序
type TTplatformSettingMaxSortReq struct {
g.Meta `path:"/tTplatformSetting/maxSort" method:"get" tags:"二级域名站点个性化配置表" summary:"获取二级域名站点个性化配置表最大排序" x-check-permission:"cpm:system:tTplatformSetting:maxSort"`
model.TTplatformSettingMaxSortParam
}
type TTplatformSettingMaxSortRes struct {
*model.TTplatformSettingMaxSortModel
}
// StatusReq 更新二级域名站点个性化配置表状态
type TTplatformSettingStatusReq struct {
g.Meta `path:"/tTplatformSetting/status" method:"post" tags:"二级域名站点个性化配置表" summary:"更新二级域名站点个性化配置表状态" x-check-permission:"cpm:system:tTplatformSetting:status"`
model.TTplatformSettingStatusParam
}
type TTplatformSettingStatusRes struct{}
+202
View File
@@ -0,0 +1,202 @@
// Package v1
// @Link https://github.com/xiujiecn/xiu-admin
// @Copyright Copyright (c) 2025 LiXiujie
// @Author Lxj <li@xiujie.cn>
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
package v1
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
"github.com/gogf/gf/v2/frame/g"
)
type UserInfo struct {
Id int64 `json:"id" dc:"用户ID"`
Username string `json:"userName" dc:"用户名"`
Nickname string `json:"realName" dc:"昵称"`
Avatar string `json:"avatar" dc:"头像"`
Email string `json:"email" dc:"邮箱"`
HomePath string `json:"homePath" dc:"首页路径"`
// Phonenumber 当前用户手机号,为空时前端提示绑定手机号。
Phonenumber string `json:"phonenumber" dc:"手机号"`
// IsInitPassword 当前密码是否未由用户本人设置(初始或管理员临时密码),为 true 时前端引导首次登录修改密码。
IsInitPassword bool `json:"isInitPassword" dc:"密码是否未由用户本人设置"`
}
type UserInfoReq struct {
g.Meta `path:"/user/info" method:"get" tags:"系统-用户管理" summary:"获取当前用户信息" x-check-permission:"cpc:current:user"`
}
type UserInfoRes struct {
UserInfo
}
type UserListReq struct {
g.Meta `path:"/user/list" method:"get" tags:"系统-用户管理" summary:"获取用户列表" x-check-permission:"cpm:system:user:list"`
request.PageInfo
model.UserListParam
}
type UserListRes struct {
response.PageResult
Data []*model.SysUserListModel `json:"items" dc:"用户列表"`
}
type AddUserReq struct {
g.Meta `path:"/user/add" method:"post" tags:"系统-用户管理" summary:"新增用户" x-check-permission:"cpm:system:user:add"`
model.SysUserAddModel
}
type AddUserRes struct {
Data *model.SysUserViewModel `json:"data" dc:"用户信息"`
}
type UserProfileReq struct {
g.Meta `path:"/user/profile" method:"get" tags:"系统-用户管理" summary:"获取当前用户信息" x-check-permission:"cpc:current:user"`
}
type UserProfileRes struct {
User *model.UserProfileModel `json:"user" dc:"用户信息"`
}
type UpdateCurrentUserReq struct {
g.Meta `path:"/user/profile/update" method:"post" tags:"系统-用户管理" summary:"更新当前用户信息" x-check-permission:"cpc:current:user"`
model.UpdateCurrentUserModel
}
type UpdateCurrentUserRes struct {
UserInfo
}
type UpdateCurrentUserPasswordReq struct {
g.Meta `path:"/user/profile/password" method:"post" tags:"系统-用户管理" summary:"更新当前用户密码" x-check-permission:"cpc:current:user"`
model.UpdateCurrentUserPasswordModel
}
type UpdateCurrentUserPasswordRes struct {
}
type SendCurrentUserEmailCodeReq struct {
g.Meta `path:"/user/profile/email/code" method:"post" tags:"系统-用户管理" summary:"发送修改邮箱验证码" x-check-permission:"cpc:current:user"`
model.SendCurrentUserEmailCodeModel
}
type SendCurrentUserEmailCodeRes struct{}
type UpdateCurrentUserEmailReq struct {
g.Meta `path:"/user/profile/email" method:"post" tags:"系统-用户管理" summary:"修改当前用户邮箱" x-check-permission:"cpc:current:user"`
model.UpdateCurrentUserEmailModel
}
type UpdateCurrentUserEmailRes struct{}
type SendCurrentUserPhoneCodeReq struct {
g.Meta `path:"/user/profile/phone/code" method:"post" tags:"系统-用户管理" summary:"发送修改电话验证码" x-check-permission:"cpc:current:user"`
model.SendCurrentUserPhoneCodeModel
}
type SendCurrentUserPhoneCodeRes struct{}
type UpdateCurrentUserPhoneReq struct {
g.Meta `path:"/user/profile/phone" method:"post" tags:"系统-用户管理" summary:"修改当前用户电话" x-check-permission:"cpc:current:user"`
model.UpdateCurrentUserPhoneModel
}
type UpdateCurrentUserPhoneRes struct{}
type UpdateUserReq struct {
g.Meta `path:"/user/update" method:"post" tags:"系统-用户管理" summary:"更新用户信息" x-check-permission:"cpm:system:user:edit"`
model.SysUserUpdateModel
}
type UpdateUserRes struct {
model.SysUserViewModel
}
type DeleteUserReq struct {
g.Meta `path:"/user/delete" method:"post" tags:"系统-用户管理" summary:"删除用户" x-check-permission:"cpm:system:user:remove"`
UserId int64 `json:"userId" dc:"用户ID"`
UserIds []int64 `json:"userIds" dc:"用户ID列表"`
}
type DeleteUserRes struct {
}
type GetUserReq struct {
g.Meta `path:"/user/view" method:"get" tags:"系统-用户管理" summary:"获取用户信息" x-check-permission:"cpm:system:user:query"`
UserId int64 `json:"userId" dc:"用户ID"`
}
type GetUserRes struct {
model.SysUserViewModel
}
type ResetPasswordReq struct {
g.Meta `path:"/user/resetPassword" method:"post" tags:"系统-用户管理" summary:"重置用户密码" x-check-permission:"cpm:system:user:resetPwd"`
UserId int64 `json:"userId" dc:"用户ID"`
Password string `json:"password" dc:"新密码"`
}
type ResetPasswordRes struct {
}
type GetUserListByDeptIdReq struct {
g.Meta `path:"/user/listByDeptId" method:"get" tags:"系统-用户管理" summary:"获取部门用户列表" x-check-permission:"cpm:system:user:list"`
DeptId int64 `json:"deptId" dc:"部门ID"`
request.PageInfo
}
type GetUserListByDeptIdRes struct {
response.PageResult
Items []*model.SysUserMiniModel `json:"items" dc:"用户列表"`
}
// 用户注册
type UserRegisterReq struct {
g.Meta `path:"/user/register" method:"post" tags:"系统-用户管理" summary:"用户注册" x-check-permission:"cpm:system:user:register"`
model.SysUserRegisterModel
}
type UserRegisterRes struct {
}
// StatusReq 更新用户状态
type UserStatusReq struct {
g.Meta `path:"/user/status" method:"post" tags:"系统-用户管理" summary:"更新用户状态" x-check-permission:"cpm:system:user:edit"`
model.SysUserStatusParam
}
type UserStatusRes struct {
}
// IsMfaEnabledReq 登录时查看是否开启mfa验证
type IsMfaEnabledReq struct {
g.Meta `path:"/user/isMfaEnabled" method:"get" tags:"系统-用户管理" summary:"登录时查看是否开启mfa验证"`
UserId int64 `json:"userId" v:"required#用户ID不能为空" dc:"用户ID"`
}
type IsMfaEnabledRes struct {
model.SysUserMfaEnabledModel
}
// SetMfaEnabledReq 是否开启mfa验证
type SetMfaEnabledReq struct {
g.Meta `path:"/user/setMfaEnabled" method:"post" tags:"系统-用户管理" summary:"是否开启mfa验证"`
model.SysUserIsMfaEnabledModel
}
type SetMfaEnabledRes struct {
Uuid string `json:"uuid" dc:"mfa验证码uuid"`
}
// MfaVerifyReq mfa验证
type MfaVerifyReq struct {
g.Meta `path:"/user/mfaVerify" method:"post" tags:"系统-用户管理" summary:"mfa验证" `
model.SysUserIsMfaEnabledModel
}
type MfaVerifyRes struct {
}