优化文档

This commit is contained in:
xh
2025-11-27 02:45:58 +08:00
parent 6f3a2fcf5b
commit 0f5bdf9fc6
66 changed files with 420 additions and 1893 deletions

View File

@@ -28,26 +28,26 @@ type MonitorClientHandler struct {
// @Summary 监控-客户端信息列表
// @Tags monitor_client-监控-客户端信息
// @Produce json
// @Param Token header string true "token"
// @Param PageNo query int true "页码"
// @Param PageSize query int true "每页数量"
// @Param ProjectKey query string false "项目key"
// @Param ClientId query string false "sdk生成的客户端id"
// @Param UserId query string false "用户id"
// @Param Os query string false "系统"
// @Param Browser query string false "浏览器"
// @Param Country query string false "国家"
// @Param Province query string false "省份"
// @Param City query string false "城市"
// @Param Operator query string false "电信运营商"
// @Param Ip query string false "ip"
// @Param Width query number false "屏幕"
// @Param Height query number false "屏幕高度"
// @Param Ua query string false "ua记录"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
// @Param Token header string true "token"
// @Param PageNo query int true "页码"
// @Param PageSize query int true "每页数量"
// @Param ProjectKey query string false "项目key"
// @Param ClientId query string false "sdk生成的客户端id"
// @Param UserId query string false "用户id"
// @Param Os query string false "系统"
// @Param Browser query string false "浏览器"
// @Param Country query string false "国家"
// @Param Province query string false "省份"
// @Param City query string false "城市"
// @Param Operator query string false "电信运营商"
// @Param Ip query string false "ip"
// @Param Width query number false "屏幕"
// @Param Height query number false "屏幕高度"
// @Param Ua query string false "ua记录"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
//
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]MonitorClientResp}} "成功"
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]monitorSchema.MonitorClientResp}} "成功"
// @Router /api/admin/monitor_client/list [get]
func (hd *MonitorClientHandler) List(c *gin.Context) {
var page request.PageReq
@@ -65,22 +65,22 @@ func (hd *MonitorClientHandler) List(c *gin.Context) {
// @Summary 监控-客户端信息列表-所有
// @Tags monitor_client-监控-客户端信息
// @Produce json
// @Param ProjectKey query string false "项目key"
// @Param ClientId query string false "sdk生成的客户端id"
// @Param UserId query string false "用户id"
// @Param Os query string false "系统"
// @Param Browser query string false "浏览器"
// @Param Country query string false "国家"
// @Param Province query string false "省份"
// @Param City query string false "城市"
// @Param Operator query string false "电信运营商"
// @Param Ip query string false "ip"
// @Param Width query number false "屏幕"
// @Param Height query number false "屏幕高度"
// @Param Ua query string false "ua记录"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
// @Success 200 {object} response.Response{ data=[]MonitorClientResp} "成功"
// @Param ProjectKey query string false "项目key"
// @Param ClientId query string false "sdk生成的客户端id"
// @Param UserId query string false "用户id"
// @Param Os query string false "系统"
// @Param Browser query string false "浏览器"
// @Param Country query string false "国家"
// @Param Province query string false "省份"
// @Param City query string false "城市"
// @Param Operator query string false "电信运营商"
// @Param Ip query string false "ip"
// @Param Width query number false "屏幕"
// @Param Height query number false "屏幕高度"
// @Param Ua query string false "ua记录"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
// @Success 200 {object} response.Response{ data=[]monitorSchema.MonitorClientResp} "成功"
// @Router /api/admin/monitor_client/listAll [get]
func (hd *MonitorClientHandler) ListAll(c *gin.Context) {
var listReq monitorSchema.MonitorClientListReq
@@ -103,9 +103,9 @@ func (hd *MonitorClientHandler) ErrorUsers(c *gin.Context) {
// @Summary 监控-客户端信息详情
// @Tags monitor_client-监控-客户端信息
// @Produce json
// @Param Token header string true "token"
// @Param Id query number false "uuid"
// @Success 200 {object} response.Response{ data=MonitorClientResp} "成功"
// @Param Token header string true "token"
// @Param Id query number false "uuid"
// @Success 200 {object} response.Response{ data=monitorSchema.MonitorClientResp} "成功"
// @Router /api/admin/monitor_client/detail [get]
func (hd *MonitorClientHandler) Detail(c *gin.Context) {
var detailReq monitorSchema.MonitorClientDetailReq

View File

@@ -24,18 +24,18 @@ type UserProtocolHandler struct {
// @Summary 用户协议列表
// @Tags user_protocol-用户协议
// @Produce json
// @Param Token header string true "token"
// @Param PageNo query int true "页码"
// @Param PageSize query int true "每页数量"
// @Param Title query string false "标题"
// @Param Content query string false "协议内容"
// @Param Sort query number false "排序"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
// @Param UpdateTimeStart query string false "更新时间"
// @Param UpdateTimeEnd query string false "更新时间"
// @Param Token header string true "token"
// @Param PageNo query int true "页码"
// @Param PageSize query int true "每页数量"
// @Param Title query string false "标题"
// @Param Content query string false "协议内容"
// @Param Sort query number false "排序"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
// @Param UpdateTimeStart query string false "更新时间"
// @Param UpdateTimeEnd query string false "更新时间"
//
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]UserProtocolResp}} "成功"
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]schema.UserProtocolResp}} "成功"
// @Router /api/admin/user_protocol/list [get]
func (hd *UserProtocolHandler) List(c *gin.Context) {
var page request.PageReq
@@ -54,14 +54,14 @@ func (hd *UserProtocolHandler) List(c *gin.Context) {
// @Summary 用户协议列表-所有
// @Tags user_protocol-用户协议
// @Produce json
// @Param Title query string false "标题"
// @Param Content query string false "协议内容"
// @Param Sort query number false "排序"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
// @Param UpdateTimeStart query string false "更新时间"
// @Param UpdateTimeEnd query string false "更新时间"
// @Success 200 {object} response.Response{ data=[]UserProtocolResp} "成功"
// @Param Title query string false "标题"
// @Param Content query string false "协议内容"
// @Param Sort query number false "排序"
// @Param CreateTimeStart query string false "创建时间"
// @Param CreateTimeEnd query string false "创建时间"
// @Param UpdateTimeStart query string false "更新时间"
// @Param UpdateTimeEnd query string false "更新时间"
// @Success 200 {object} response.Response{ data=[]schema.UserProtocolResp} "成功"
// @Router /api/admin/user_protocol/listAll [get]
func (hd *UserProtocolHandler) ListAll(c *gin.Context) {
var listReq schema.UserProtocolListReq
@@ -75,9 +75,9 @@ func (hd *UserProtocolHandler) ListAll(c *gin.Context) {
// @Summary 用户协议详情
// @Tags user_protocol-用户协议
// @Produce json
// @Param Token header string true "token"
// @Param Id query number false "Id"
// @Success 200 {object} response.Response{ data=UserProtocolResp} "成功"
// @Param Token header string true "token"
// @Param Id query number false "Id"
// @Success 200 {object} response.Response{ data=schema.UserProtocolResp} "成功"
// @Router /api/admin/user_protocol/detail [get]
func (hd *UserProtocolHandler) Detail(c *gin.Context) {
var detailReq schema.UserProtocolPrimarykey

View File

@@ -6,7 +6,7 @@ type CommonUploadImageReq struct {
Cid uint `form:"cid" binding:"gte=0"` // 主键
}
//CommonAlbumListReq 相册文件列表参数
// CommonAlbumListReq 相册文件列表参数
type CommonAlbumListReq struct {
Cid int `form:"cid,default=-1"` // 类目ID
// Type int `form:"type" binding:"omitempty,oneof=10 20 30"` // 文件类型: [10=图片, 20=视频]
@@ -15,19 +15,19 @@ type CommonAlbumListReq struct {
}
//CommonAlbumRenameReq 相册文件重命名参数
// CommonAlbumRenameReq 相册文件重命名参数
type CommonAlbumRenameReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
Name string `form:"name" binding:"required,min=1,max=30"` // 文件名称
}
//CommonAlbumMoveReq 相册文件移动参数
// CommonAlbumMoveReq 相册文件移动参数
type CommonAlbumMoveReq struct {
Ids []uint `form:"ids" binding:"required"` // 主键
Cid int `form:"cid,default=-1"` // 类目ID
}
//CommonAlbumAddReq 相册文件新增参数
// CommonAlbumAddReq 相册文件新增参数
type CommonAlbumAddReq struct {
Cid uint `form:"cid" binding:"gte=0"` // 类目ID
AdminId uint `form:"admin_id" binding:"gte=0"` // 管理ID
@@ -40,36 +40,36 @@ type CommonAlbumAddReq struct {
Hash string `form:"hash"`
}
//CommonAlbumDelReq 相册文件删除参数
// CommonAlbumDelReq 相册文件删除参数
type CommonAlbumDelReq struct {
Ids []uint `form:"ids" binding:"required"` // 主键
}
//CommonCateListReq 相册分类列表参数
// CommonCateListReq 相册分类列表参数
type CommonCateListReq struct {
// Type int `form:"type" binding:"omitempty,oneof=10 20 30"` // 分类类型: [10=图片,20=视频,30文件]
Name string `form:"name"` // 分类名称
}
//CommonCateAddReq 相册分类新增参数
// CommonCateAddReq 相册分类新增参数
type CommonCateAddReq struct {
Pid uint `form:"pid" binding:"gte=0"` // 父级ID
// Type int `form:"type" binding:"required,oneof=10 20 30"` // 分类类型: [10=图片,20=视频,30文件]
Name string `form:"name" binding:"required,min=1,max=30"` // 分类名称
}
//CommonCateRenameReq 相册分类重命名参数
// CommonCateRenameReq 相册分类重命名参数
type CommonCateRenameReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
Name string `form:"name" binding:"required,min=1,max=30"` // 分类名称
}
//CommonCateDelReq 相册分类删除参数
// CommonCateDelReq 相册分类删除参数
type CommonCateDelReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//CommonUploadFileResp 上传图片返回信息
// CommonUploadFileResp 上传图片返回信息
type CommonUploadFileResp struct {
ID uint `json:"id" structs:"id"` // 主键
Cid uint `json:"cid" structs:"cid"` // 类目ID
@@ -83,7 +83,7 @@ type CommonUploadFileResp struct {
Size int64 `json:"size" structs:"size"` // 文件大小
}
//CommonAlbumListResp 相册文件列表返回信息
// CommonAlbumListResp 相册文件列表返回信息
type CommonAlbumListResp struct {
ID uint `json:"id" structs:"id"` // 主键
Cid uint `json:"cid" structs:"cid"` // 所属类目
@@ -96,7 +96,7 @@ type CommonAlbumListResp struct {
UpdateTime core.NullTime `json:"updateTime" structs:"updateTime"` // 更新时间
}
//CommonCateListResp 相册分类列表返回信息
// CommonCateListResp 相册分类列表返回信息
type CommonCateListResp struct {
ID uint `json:"id" structs:"id"` // 主键
Pid uint `json:"pid" structs:"pid"` // 父级ID

View File

@@ -2,7 +2,7 @@ package flowSchema
import "x_admin/core"
//FlowApplyListReq 申请流程列表参数
// FlowApplyListReq 申请流程列表参数
type FlowApplyListReq struct {
TemplateId int `form:"templateId"` // 模板
ApplyUserId int `form:"applyUserId"` // 申请人id
@@ -17,12 +17,12 @@ type FlowApplyListReq struct {
Status int `form:"status"` // 状态1待提交2审批中3审批完成4审批失败
}
//FlowApplyDetailReq 申请流程详情参数
// FlowApplyDetailReq 申请流程详情参数
type FlowApplyDetailReq struct {
Id int `form:"id"` //
}
//FlowApplyAddReq 申请流程新增参数
// FlowApplyAddReq 申请流程新增参数
type FlowApplyAddReq struct {
TemplateId int `form:"templateId"` // 模板
ApplyUserId int `form:"applyUserId"` // 申请人id
@@ -37,7 +37,7 @@ type FlowApplyAddReq struct {
Status int `form:"status"` // 状态1待提交2审批中3审批完成4审批失败
}
//FlowApplyEditReq 申请流程新增参数
// FlowApplyEditReq 申请流程新增参数
type FlowApplyEditReq struct {
Id int `form:"id"` //
// TemplateId int `form:"templateId"` // 模板
@@ -53,12 +53,12 @@ type FlowApplyEditReq struct {
Status int `form:"status"` // 状态1待提交2审批中3审批完成4审批失败
}
//FlowApplyDelReq 申请流程新增参数
// FlowApplyDelReq 申请流程新增参数
type FlowApplyDelReq struct {
Id int `form:"id"` //
}
//FlowApplyResp 申请流程返回信息
// FlowApplyResp 申请流程返回信息
type FlowApplyResp struct {
Id int `json:"id" structs:"id"` //
TemplateId int `json:"templateId" structs:"templateId"` // 模板

View File

@@ -2,7 +2,7 @@ package flowSchema
import "x_admin/core"
//FlowHistoryListReq 流程历史列表参数
// FlowHistoryListReq 流程历史列表参数
type FlowHistoryListReq struct {
ApplyId int `form:"applyId"` // 申请id
TemplateId int `form:"templateId"` // 模板id
@@ -18,12 +18,12 @@ type FlowHistoryListReq struct {
PassRemark string `form:"passRemark"` // 通过备注
}
//FlowHistoryDetailReq 流程历史详情参数
// FlowHistoryDetailReq 流程历史详情参数
type FlowHistoryDetailReq struct {
Id int `form:"id"` // 历史id
}
//FlowHistoryAddReq 流程历史新增参数
// FlowHistoryAddReq 流程历史新增参数
type FlowHistoryAddReq struct {
ApplyId int `form:"applyId"` // 申请id
TemplateId int `form:"templateId"` // 模板id
@@ -39,7 +39,7 @@ type FlowHistoryAddReq struct {
PassRemark string `form:"passRemark"` // 通过备注
}
//FlowHistoryEditReq 流程历史新增参数
// FlowHistoryEditReq 流程历史新增参数
type FlowHistoryEditReq struct {
Id int `form:"id"` // 历史id
ApplyId int `form:"applyId"` // 申请id
@@ -56,12 +56,12 @@ type FlowHistoryEditReq struct {
PassRemark string `form:"passRemark"` // 通过备注
}
//FlowHistoryDelReq 流程历史新增参数
// FlowHistoryDelReq 流程历史新增参数
type FlowHistoryDelReq struct {
Id int `form:"id"` // 历史id
}
//FlowHistoryResp 流程历史返回信息
// FlowHistoryResp 流程历史返回信息
type FlowHistoryResp struct {
Id int `json:"id" structs:"id"` // 历史id
ApplyId int `json:"applyId" structs:"applyId"` // 申请id

View File

@@ -1,6 +1,6 @@
package flowSchema
//FlowTemplateListReq 流程模板列表参数
// FlowTemplateListReq 流程模板列表参数
type FlowTemplateListReq struct {
FlowName string `form:"flowName"` // 流程名称
FlowGroup int `form:"flowGroup"` // 流程分类
@@ -10,12 +10,12 @@ type FlowTemplateListReq struct {
FlowProcessDataList string `form:"flowProcessDataList"` // 流程配置list数据
}
//FlowTemplateDetailReq 流程模板详情参数
// FlowTemplateDetailReq 流程模板详情参数
type FlowTemplateDetailReq struct {
Id int `form:"id"` //
}
//FlowTemplateAddReq 流程模板新增参数
// FlowTemplateAddReq 流程模板新增参数
type FlowTemplateAddReq struct {
FlowName string `form:"flowName"` // 流程名称
FlowGroup int `form:"flowGroup"` // 流程分类
@@ -26,7 +26,7 @@ type FlowTemplateAddReq struct {
}
//FlowTemplateEditReq 流程模板新增参数
// FlowTemplateEditReq 流程模板新增参数
type FlowTemplateEditReq struct {
Id int `form:"id"` //
FlowName string `form:"flowName"` // 流程名称
@@ -38,12 +38,12 @@ type FlowTemplateEditReq struct {
}
//FlowTemplateDelReq 流程模板新增参数
// FlowTemplateDelReq 流程模板新增参数
type FlowTemplateDelReq struct {
Id int `form:"id"` //
}
//FlowTemplateResp 流程模板返回信息
// FlowTemplateResp 流程模板返回信息
type FlowTemplateResp struct {
Id int `json:"id" structs:"id"` //
FlowName string `json:"flowName" structs:"flowName"` // 流程名称

View File

@@ -1,6 +1,6 @@
package settingSchema
//SettingCopyrightItemReq 保存备案信息参数
// SettingCopyrightItemReq 保存备案信息参数
type SettingCopyrightItemReq struct {
Name string `form:"name" json:"name"` // 名称
Link string `form:"link" json:"link"` // 链接

View File

@@ -2,19 +2,19 @@ package settingSchema
import "x_admin/core"
//SettingDictTypeListReq 字典类型新增参数
// SettingDictTypeListReq 字典类型新增参数
type SettingDictTypeListReq struct {
DictName string `form:"dictName" binding:"max=200"` // 字典名称
DictType string `form:"dictType" binding:"max=200"` // 字典类型
DictStatus int8 `form:"dictStatus,default=-1" binding:"oneof=-1 0 1"` // 字典状态: 0/1
}
//SettingDictTypeDetailReq 字典类型详情参数
// SettingDictTypeDetailReq 字典类型详情参数
type SettingDictTypeDetailReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SettingDictTypeAddReq 字典类型新增参数
// SettingDictTypeAddReq 字典类型新增参数
type SettingDictTypeAddReq struct {
DictName string `form:"dictName" binding:"required,max=200"` // 字典名称
DictType string `form:"dictType" binding:"required,max=200"` // 字典类型
@@ -22,7 +22,7 @@ type SettingDictTypeAddReq struct {
DictStatus int8 `form:"dictStatus" binding:"required,oneof=0 1"` // 字典状态: 0/1
}
//SettingDictTypeEditReq 字典类型编辑参数
// SettingDictTypeEditReq 字典类型编辑参数
type SettingDictTypeEditReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
DictName string `form:"dictName" binding:"required,max=200"` // 字典名称
@@ -31,12 +31,12 @@ type SettingDictTypeEditReq struct {
DictStatus int8 `form:"dictStatus" binding:"required,oneof=0 1"` // 字典状态: 0/1
}
//SettingDictTypeDelReq 字典类型删除参数
// SettingDictTypeDelReq 字典类型删除参数
type SettingDictTypeDelReq struct {
Ids []uint `form:"ids" binding:"required"` // 主键列表
}
//SettingDictTypeResp 字典类型返回信息
// SettingDictTypeResp 字典类型返回信息
type SettingDictTypeResp struct {
ID uint `json:"id" structs:"id"` // 主键
DictName string `json:"dictName" structs:"dictName"` // 字典名称

View File

@@ -2,7 +2,7 @@ package settingSchema
import "x_admin/core"
//SettingDictDataResp 字典数据返回信息
// SettingDictDataResp 字典数据返回信息
type SettingDictDataResp struct {
ID uint `json:"id" structs:"id"` // 主键
TypeId uint `json:"typeId" structs:"typeId"` // 类型
@@ -16,7 +16,7 @@ type SettingDictDataResp struct {
UpdateTime core.NullTime `json:"updateTime" structs:"updateTime"` // 更新时间
}
//SettingDictDataListReq 字典数据列表参数
// SettingDictDataListReq 字典数据列表参数
type SettingDictDataListReq struct {
DictType string `form:"dictType" binding:"max=200"` // 字典类型
Name string `form:"name" binding:"max=100"` // 键
@@ -24,12 +24,12 @@ type SettingDictDataListReq struct {
Status int8 `form:"status,default=-1" binding:"oneof=-1 0 1"` // 状态: 0=停用,1=启用
}
//SettingDictDataDetailReq 字典数据详情参数
// SettingDictDataDetailReq 字典数据详情参数
type SettingDictDataDetailReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SettingDictDataAddReq 字典数据新增参数
// SettingDictDataAddReq 字典数据新增参数
type SettingDictDataAddReq struct {
TypeId uint `form:"typeId" binding:"required,gt=0"` // 类型
Name string `form:"name" binding:"required,max=100"` // 键
@@ -40,7 +40,7 @@ type SettingDictDataAddReq struct {
Status int8 `form:"status,default=-1" binding:"oneof=-1 0 1"` // 状态: 0=停用,1=启用
}
//SettingDictDataEditReq 字典数据编辑参数
// SettingDictDataEditReq 字典数据编辑参数
type SettingDictDataEditReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
TypeId uint `form:"typeId" binding:"required,gte=0"` // 类型
@@ -52,7 +52,7 @@ type SettingDictDataEditReq struct {
Status int8 `form:"status,default=-1" binding:"oneof=-1 0 1"` // 状态: 0=停用,1=启用
}
//SettingDictDataDelReq 字典数据删除参数
// SettingDictDataDelReq 字典数据删除参数
type SettingDictDataDelReq struct {
Ids []uint `form:"ids" binding:"required"` // 主键列表
}

View File

@@ -1,6 +1,6 @@
package settingSchema
//SettingStorageEditReq 存储编辑参数
// SettingStorageEditReq 存储编辑参数
type SettingStorage struct {
Alias string `form:"alias" binding:"required,oneof=local qiniu qcloud aliyun"` // 别名: [local,qiniu,qcloud,aliyun]
Status int `form:"status" binding:"oneof=0 1"` // 状态: 0/1

View File

@@ -1,6 +1,6 @@
package settingSchema
//SettingWebsiteReq 保存网站信息参数
// SettingWebsiteReq 保存网站信息参数
type SettingWebsiteReq struct {
Name string `form:"name"` // 网站名称
Logo string `form:"logo"` // 网站图标

View File

@@ -2,19 +2,19 @@ package systemSchema
import "x_admin/core"
//SystemAuthAdminListReq 管理员列表参数
// SystemAuthAdminListReq 管理员列表参数
type SystemAuthAdminListReq struct {
Username string `form:"username"` // 账号
Nickname string `form:"nickname"` // 昵称
Role int `form:"role,default=-1"` // 角色ID
}
//SystemAuthAdminDetailReq 管理员详情参数
// SystemAuthAdminDetailReq 管理员详情参数
type SystemAuthAdminDetailReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthAdminAddReq 管理员新增参数
// SystemAuthAdminAddReq 管理员新增参数
type SystemAuthAdminAddReq struct {
DeptId uint `form:"deptId" binding:"required,gt=0"` // 部门ID
PostId uint `form:"postId" binding:"required,gt=0"` // 岗位ID
@@ -28,7 +28,7 @@ type SystemAuthAdminAddReq struct {
}
//SystemAuthAdminEditReq 管理员编辑参数
// SystemAuthAdminEditReq 管理员编辑参数
type SystemAuthAdminEditReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
DeptId uint `form:"deptId" binding:"required,gt=0"` // 部门ID
@@ -42,7 +42,7 @@ type SystemAuthAdminEditReq struct {
IsDisable uint8 `form:"isDisable" binding:"oneof=0 1"` // 是否禁用: [0=否, 1=是]
}
//SystemAuthAdminUpdateReq 管理员更新参数
// SystemAuthAdminUpdateReq 管理员更新参数
type SystemAuthAdminUpdateReq struct {
Nickname string `form:"nickname" binding:"required,min=2,max=30"` // 昵称
Avatar string `form:"avatar"` // 头像
@@ -50,17 +50,17 @@ type SystemAuthAdminUpdateReq struct {
CurrPassword string `form:"currPassword" binding:""` // 密码
}
//SystemAuthAdminDelReq 管理员删除参数
// SystemAuthAdminDelReq 管理员删除参数
type SystemAuthAdminDelReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthAdminDisableReq 管理员状态切换参数
// SystemAuthAdminDisableReq 管理员状态切换参数
type SystemAuthAdminDisableReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthAdminResp 管理员返回信息
// SystemAuthAdminResp 管理员返回信息
type SystemAuthAdminResp struct {
ID uint `json:"id" structs:"id"` // 主键
Username string `json:"username" structs:"username" excel:"name:账号;"` // 账号
@@ -77,7 +77,7 @@ type SystemAuthAdminResp struct {
UpdateTime core.NullTime `json:"updateTime" structs:"updateTime" excel:"name:更新时间;"` // 更新时间
}
//SystemAuthAdminSelfOneResp 当前管理员返回部分信息
// SystemAuthAdminSelfOneResp 当前管理员返回部分信息
type SystemAuthAdminSelfOneResp struct {
ID uint `json:"id" structs:"id"` // 主键
Username string `json:"username" structs:"username"` // 账号
@@ -92,7 +92,7 @@ type SystemAuthAdminSelfOneResp struct {
UpdateTime core.NullTime `json:"updateTime" structs:"updateTime"` // 更新时间
}
//SystemAuthAdminSelfResp 当前系统管理员返回信息
// SystemAuthAdminSelfResp 当前系统管理员返回信息
type SystemAuthAdminSelfResp struct {
User SystemAuthAdminSelfOneResp `json:"user" structs:"user"` // 用户信息
Permissions []string `json:"permissions" structs:"permissions"` // 权限集合: [[*]=>所有权限, ['article:add']=>部分权限]

View File

@@ -2,18 +2,18 @@ package systemSchema
import "x_admin/core"
//SystemAuthDeptListReq 部门列表参数
// SystemAuthDeptListReq 部门列表参数
type SystemAuthDeptListReq struct {
Name string `form:"name"` // 部门名称
IsStop int8 `form:"isStop,default=-1" binding:"oneof=-1 0 1"` // 是否停用: [0=否, 1=是]
}
//SystemAuthDeptDetailReq 部门详情参数
// SystemAuthDeptDetailReq 部门详情参数
type SystemAuthDeptDetailReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthDeptAddReq 部门新增参数
// SystemAuthDeptAddReq 部门新增参数
type SystemAuthDeptAddReq struct {
Pid uint `form:"pid" binding:"gte=0"` // 部门父级
Name string `form:"name" binding:"required,min=1,max=100"` // 部门名称
@@ -24,7 +24,7 @@ type SystemAuthDeptAddReq struct {
Sort int `form:"sort" binding:"gte=0,lte=9999"` // 排序编号
}
//SystemAuthDeptEditReq 部门编辑参数
// SystemAuthDeptEditReq 部门编辑参数
type SystemAuthDeptEditReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
Pid uint `form:"pid" binding:"gte=0"` // 部门父级
@@ -36,12 +36,12 @@ type SystemAuthDeptEditReq struct {
Sort int `form:"sort" binding:"gte=0,lte=9999"` // 排序编号
}
//SystemAuthDeptDelReq 部门删除参数
// SystemAuthDeptDelReq 部门删除参数
type SystemAuthDeptDelReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthDeptResp 系统部门返回信息
// SystemAuthDeptResp 系统部门返回信息
type SystemAuthDeptResp struct {
ID uint `json:"id" structs:"id"` // 主键
Pid uint `json:"pid" structs:"pid"` // 部门父级

View File

@@ -2,12 +2,12 @@ package systemSchema
import "x_admin/core"
//SystemAuthMenuDetailReq 菜单详情参数
// SystemAuthMenuDetailReq 菜单详情参数
type SystemAuthMenuDetailReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthMenuAddReq 新增菜单参数
// SystemAuthMenuAddReq 新增菜单参数
type SystemAuthMenuAddReq struct {
Pid uint `form:"pid" binding:"gte=0"` // 上级菜单
MenuType string `form:"menuType" binding:"oneof=M C A"` // 权限类型: [M=目录, C=菜单, A=按钮]
@@ -24,7 +24,7 @@ type SystemAuthMenuAddReq struct {
IsDisable uint8 `form:"isDisable" binding:"oneof=0 1"` // 是否禁用: [0=否, 1=是]
}
//SystemAuthMenuEditReq 编辑菜单参数
// SystemAuthMenuEditReq 编辑菜单参数
type SystemAuthMenuEditReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
Pid uint `form:"pid" binding:"gte=0"` // 上级菜单
@@ -42,12 +42,12 @@ type SystemAuthMenuEditReq struct {
IsDisable uint8 `form:"isDisable" binding:"oneof=0 1"` // 是否禁用: [0=否, 1=是]
}
//SystemAuthMenuDelReq 删除菜单参数
// SystemAuthMenuDelReq 删除菜单参数
type SystemAuthMenuDelReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthMenuResp 系统菜单返回信息
// SystemAuthMenuResp 系统菜单返回信息
type SystemAuthMenuResp struct {
ID uint `json:"id" structs:"id"` // 主键
Pid uint `json:"pid" structs:"pid"` // 上级菜单

View File

@@ -2,19 +2,19 @@ package systemSchema
import "x_admin/core"
//SystemAuthPostListReq 岗位列表参数
// SystemAuthPostListReq 岗位列表参数
type SystemAuthPostListReq struct {
Code string `form:"code"` // 岗位编码
Name string `form:"name"` // 岗位名称
IsStop int8 `form:"isStop,default=-1" binding:"oneof=-1 0 1"` // 是否停用: [0=否, 1=是]
}
//SystemAuthPostDetailReq 岗位详情参数
// SystemAuthPostDetailReq 岗位详情参数
type SystemAuthPostDetailReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthPostAddReq 岗位新增参数
// SystemAuthPostAddReq 岗位新增参数
type SystemAuthPostAddReq struct {
Code string `form:"code" binding:"omitempty,min=1,max=30"` // 岗位编码
Name string `form:"name" binding:"required,min=1,max=30"` // 岗位名称
@@ -23,7 +23,7 @@ type SystemAuthPostAddReq struct {
Sort int `form:"sort" binding:"gte=0"` // 排序编号
}
//SystemAuthPostEditReq 岗位编辑参数
// SystemAuthPostEditReq 岗位编辑参数
type SystemAuthPostEditReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
Code string `form:"code" binding:"omitempty,min=1,max=30"` // 岗位编码
@@ -33,12 +33,12 @@ type SystemAuthPostEditReq struct {
Sort int `form:"sort" binding:"gte=0"` // 排序编号
}
//SystemAuthPostDelReq 岗位删除参数
// SystemAuthPostDelReq 岗位删除参数
type SystemAuthPostDelReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthPostResp 系统岗位返回信息
// SystemAuthPostResp 系统岗位返回信息
type SystemAuthPostResp struct {
ID uint `json:"id" structs:"id"` // 主键
Code string `json:"code" structs:"code"` // 岗位编号

View File

@@ -2,7 +2,7 @@ package systemSchema
import "x_admin/core"
//SystemAuthRoleSimpleResp 系统角色返回简单信息
// SystemAuthRoleSimpleResp 系统角色返回简单信息
type SystemAuthRoleSimpleResp struct {
ID uint `json:"id" structs:"id"` // 主键
Name string `json:"name" structs:"name"` // 角色名称
@@ -10,7 +10,7 @@ type SystemAuthRoleSimpleResp struct {
UpdateTime core.NullTime `json:"updateTime" structs:"updateTime"` // 更新时间
}
//SystemAuthRoleResp 系统角色返回信息
// SystemAuthRoleResp 系统角色返回信息
type SystemAuthRoleResp struct {
ID uint `json:"id" structs:"id"` // 主键
Name string `json:"name" structs:"name"` // 角色名称
@@ -25,12 +25,12 @@ type SystemAuthRoleResp struct {
//
//SystemAuthRoleDetailReq 角色详情参数
// SystemAuthRoleDetailReq 角色详情参数
type SystemAuthRoleDetailReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}
//SystemAuthRoleAddReq 新增角色参数
// SystemAuthRoleAddReq 新增角色参数
type SystemAuthRoleAddReq struct {
Name string `form:"name" binding:"required,min=1,max=30"` // 角色名称
Sort int `form:"sort" binding:"gte=0"` // 角色排序
@@ -39,7 +39,7 @@ type SystemAuthRoleAddReq struct {
MenuIds string `form:"menuIds"` // 关联菜单
}
//SystemAuthRoleEditReq 编辑角色参数
// SystemAuthRoleEditReq 编辑角色参数
type SystemAuthRoleEditReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
Name string `form:"name" binding:"required,min=1,max=30"` // 角色名称
@@ -49,7 +49,7 @@ type SystemAuthRoleEditReq struct {
MenuIds string `form:"menuIds"` // 关联菜单
}
//SystemAuthRoleDelReq 删除角色参数
// SystemAuthRoleDelReq 删除角色参数
type SystemAuthRoleDelReq struct {
ID uint `form:"id" binding:"required,gt=0"` // 主键
}

View File

@@ -56,11 +56,11 @@ type UserProtocolDelBatchReq struct {
// UserProtocolResp 用户协议返回信息
type UserProtocolResp struct {
UserProtocolPrimarykey
Tag core.NullString // 标识
Version core.NullInt // 版本
Title core.NullString // 标题
Content core.NullString // 协议内容
Tag core.NullString `swaggertype:"string"` // 标识
Version core.NullInt `swaggertype:"integer"` // 版本
Title core.NullString `swaggertype:"string"` // 标题
Content core.NullString `swaggertype:"string"` // 协议内容
// Sort core.NullFloat // 排序
CreateTime core.NullTime // 创建时间
UpdateTime core.NullTime // 更新时间
CreateTime core.NullTime `swaggertype:"string"` // 创建时间
UpdateTime core.NullTime `swaggertype:"string"` // 更新时间
}

View File

@@ -1,6 +1,6 @@
package tpl_utils
//GenConstants 代码生成常量
// GenConstants 代码生成常量
var GenConstants = genConstants{
UTF8: "utf-8", //编码
TplCrud: "crud", //单表 (增删改查)
@@ -10,7 +10,7 @@ var GenConstants = genConstants{
Require: 1, //需要的
}
//GoConstants Go相关常量
// GoConstants Go相关常量
var GoConstants = goConstants{
TypeString: "string", //字符串类型
TypeFloat: "float64", //浮点型
@@ -18,7 +18,7 @@ var GoConstants = goConstants{
TypeDate: "core.NullTime", //时间类型
}
//SqlConstants 数据库相关常量
// SqlConstants 数据库相关常量
var SqlConstants = sqlConstants{
//数据库字符串类型
ColumnTypeStr: []string{"char", "varchar", "nvarchar", "varchar2"},
@@ -45,7 +45,7 @@ var SqlConstants = sqlConstants{
ColumnNameNotQuery: []string{"is_delete", "delete_time"}, //"create_time", "update_time",
}
//HtmlConstants HTML相关常量
// HtmlConstants HTML相关常量
var HtmlConstants = htmlConstants{
HtmlInput: "input", //文本框
HtmlInputNumber: "number",

View File

@@ -307,7 +307,7 @@ func (gu genUtil) GoWithRespType(s string) string {
// 拼接字符串
func (gu genUtil) GetPageResp(s string) string {
return `response.Response{ data=response.PageResp{ lists=[]` + s + `Resp}}`
return `response.Response{ data=response.PageResp{ lists=[]schema.` + s + `Resp}}`
}
// NameToPath 下划线文件路径

View File

@@ -59,10 +59,10 @@ func (cu systemConfigService) GetMap(db *gorm.DB, cnfType string, name string) (
}
// Set 设置配置的值
// @Param db *gorm.DB GORM 数据库连接实例
// @Param cnfType string 配置的类型
// @Param name string 配置的名称
// @Param val string 要设置的配置值
// db *gorm.DB GORM 数据库连接实例
// cnfType string 配置的类型
// name string 配置的名称
// val string 要设置的配置值
func (cu systemConfigService) Set(db *gorm.DB, cnfType string, name string, val string) (err error) {
var config system_model.SystemConfig
err = db.Where("type = ? AND name = ?", cnfType, name).First(&config).Error

View File

@@ -2,7 +2,7 @@ package config
import "github.com/gin-gonic/gin"
//AdminConfig 后台公共配置
// AdminConfig 后台公共配置
var AdminConfig = adminConfig{
// 管理缓存键
BackstageManageKey: "backstage:manage",

View File

@@ -1,14 +1,15 @@
package core
import (
"os"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"os"
)
var Logger = initLogger()
//initLogger 初始化zap日志
// initLogger 初始化zap日志
func initLogger() *zap.SugaredLogger {
zap.NewDevelopmentConfig()
cfg := zap.NewProductionEncoderConfig()

View File

@@ -1,6 +1,6 @@
package request
//PageReq 分页请求参数
// PageReq 分页请求参数
type PageReq struct {
PageNo int `form:"pageNo,default=1" validate:"omitempty,gte=1"` // 页码
PageSize int `form:"pageSize,default=20" validate:"omitempty,gt=0,lte=60"` // 每页大小

View File

@@ -4,12 +4,12 @@ import (
"github.com/gin-gonic/gin"
)
//NoRoute 无路由的响应
// NoRoute 无路由的响应
func NoRoute(c *gin.Context) {
Fail(c, Request404Error)
}
//NoMethod 无方法的响应
// NoMethod 无方法的响应
func NoMethod(c *gin.Context) {
Fail(c, Request405Error)
}

View File

@@ -204,7 +204,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/flow_apply.FlowApplyResp"
"$ref": "#/definitions/flowSchema.FlowApplyResp"
}
}
}
@@ -430,7 +430,7 @@ const docTemplate = `{
"lists": {
"type": "array",
"items": {
"$ref": "#/definitions/flow_apply.FlowApplyResp"
"$ref": "#/definitions/flowSchema.FlowApplyResp"
}
}
}
@@ -633,7 +633,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/flow_history.FlowHistoryResp"
"$ref": "#/definitions/flowSchema.FlowHistoryResp"
}
}
}
@@ -873,7 +873,7 @@ const docTemplate = `{
"lists": {
"type": "array",
"items": {
"$ref": "#/definitions/flow_history.FlowHistoryResp"
"$ref": "#/definitions/flowSchema.FlowHistoryResp"
}
}
}
@@ -909,7 +909,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/flow_history.FlowHistoryResp"
"$ref": "#/definitions/flowSchema.FlowHistoryResp"
}
}
}
@@ -1051,7 +1051,7 @@ const docTemplate = `{
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/flow_template.FlowTemplateResp"
"$ref": "#/definitions/flowSchema.FlowTemplateResp"
}
}
}
@@ -1217,7 +1217,7 @@ const docTemplate = `{
"lists": {
"type": "array",
"items": {
"$ref": "#/definitions/flow_template.FlowTemplateResp"
"$ref": "#/definitions/flowSchema.FlowTemplateResp"
}
}
}
@@ -1594,7 +1594,7 @@ const docTemplate = `{
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_client.MonitorClientResp"
"$ref": "#/definitions/monitorSchema.MonitorClientResp"
}
}
}
@@ -1748,7 +1748,7 @@ const docTemplate = `{
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_client.MonitorClientResp"
"$ref": "#/definitions/monitorSchema.MonitorClientResp"
}
}
}
@@ -1878,7 +1878,7 @@ const docTemplate = `{
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_client.MonitorClientResp"
"$ref": "#/definitions/monitorSchema.MonitorClientResp"
}
}
}
@@ -2154,7 +2154,7 @@ const docTemplate = `{
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_error.MonitorErrorResp"
"$ref": "#/definitions/monitorSchema.MonitorErrorResp"
}
}
}
@@ -2266,7 +2266,7 @@ const docTemplate = `{
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_error.MonitorErrorResp"
"$ref": "#/definitions/monitorSchema.MonitorErrorResp"
}
}
}
@@ -2354,7 +2354,7 @@ const docTemplate = `{
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_error.MonitorErrorResp"
"$ref": "#/definitions/monitorSchema.MonitorErrorResp"
}
}
}
@@ -2614,7 +2614,7 @@ const docTemplate = `{
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_project.MonitorProjectResp"
"$ref": "#/definitions/monitorSchema.MonitorProjectResp"
}
}
}
@@ -2794,7 +2794,7 @@ const docTemplate = `{
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_project.MonitorProjectResp"
"$ref": "#/definitions/monitorSchema.MonitorProjectResp"
}
}
}
@@ -2882,484 +2882,7 @@ const docTemplate = `{
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_project.MonitorProjectResp"
}
}
}
}
]
}
}
}
}
},
"/api/admin/monitor_slow/ExportFile": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列导出",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "string",
"description": "项目key",
"name": "ProjectKey",
"in": "query"
},
{
"type": "string",
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "query"
},
{
"type": "string",
"description": "用户id",
"name": "UserId",
"in": "query"
},
{
"type": "string",
"description": "URL地址",
"name": "Path",
"in": "query"
},
{
"type": "number",
"description": "时间",
"name": "Time",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeStart",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeEnd",
"in": "query"
}
],
"responses": {}
}
},
"/api/admin/monitor_slow/ImportFile": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列导入",
"responses": {}
}
},
"/api/admin/monitor_slow/add": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列新增",
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/del": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列删除",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"description": "错误id",
"name": "Id",
"in": "body",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/delBatch": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列删除-批量",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"description": "逗号分割的id",
"name": "Ids",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/detail": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列详情",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "number",
"description": "错误id",
"name": "Id",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_slow.MonitorSlowResp"
}
}
}
]
}
}
}
}
},
"/api/admin/monitor_slow/edit": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列编辑",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"description": "错误id",
"name": "Id",
"in": "body",
"schema": {
"type": "number"
}
},
{
"description": "项目key",
"name": "ProjectKey",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "用户id",
"name": "UserId",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "URL地址",
"name": "Path",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "时间",
"name": "Time",
"in": "body",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/list": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列列表",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "页码",
"name": "PageNo",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "每页数量",
"name": "PageSize",
"in": "query",
"required": true
},
{
"type": "string",
"description": "项目key",
"name": "ProjectKey",
"in": "query"
},
{
"type": "string",
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "query"
},
{
"type": "string",
"description": "用户id",
"name": "UserId",
"in": "query"
},
{
"type": "string",
"description": "URL地址",
"name": "Path",
"in": "query"
},
{
"type": "number",
"description": "时间",
"name": "Time",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeStart",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeEnd",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
" data": {
"allOf": [
{
"$ref": "#/definitions/response.PageResp"
},
{
"type": "object",
"properties": {
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_slow.MonitorSlowResp"
}
}
}
}
]
}
}
}
]
}
}
}
}
},
"/api/admin/monitor_slow/listAll": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列列表-所有",
"parameters": [
{
"type": "string",
"description": "项目key",
"name": "ProjectKey",
"in": "query"
},
{
"type": "string",
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "query"
},
{
"type": "string",
"description": "用户id",
"name": "UserId",
"in": "query"
},
{
"type": "string",
"description": "URL地址",
"name": "Path",
"in": "query"
},
{
"type": "number",
"description": "时间",
"name": "Time",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeStart",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeEnd",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_slow.MonitorSlowResp"
"$ref": "#/definitions/monitorSchema.MonitorProjectResp"
}
}
}
@@ -3605,7 +3128,7 @@ const docTemplate = `{
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/user_protocol.UserProtocolResp"
"$ref": "#/definitions/schema.UserProtocolResp"
}
}
}
@@ -3771,7 +3294,7 @@ const docTemplate = `{
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/user_protocol.UserProtocolResp"
"$ref": "#/definitions/schema.UserProtocolResp"
}
}
}
@@ -3853,7 +3376,7 @@ const docTemplate = `{
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/user_protocol.UserProtocolResp"
"$ref": "#/definitions/schema.UserProtocolResp"
}
}
}
@@ -3864,72 +3387,6 @@ const docTemplate = `{
}
}
},
"/api/article_collect/list": {
"get": {
"produces": [
"application/json"
],
"tags": [
"article_collect文章"
],
"summary": "article_collect列表",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "页码",
"name": "PageNo",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "每页大小",
"name": "PageSize",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "用户ID",
"name": "userId",
"in": "query"
},
{
"type": "integer",
"description": "文章ID",
"name": "articleId",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.PageResp"
}
},
"400": {
"description": "请求错误",
"schema": {
"type": "string"
}
},
"500": {
"description": "内部错误",
"schema": {
"type": "string"
}
}
}
}
},
"/system/admin/ListByDeptId/{deptId}": {
"get": {
"description": "获取部门的用户",
@@ -3958,24 +3415,16 @@ const docTemplate = `{
}
},
"definitions": {
"core.NullFloat": {
"type": "object",
"properties": {
"float": {
"type": "number"
},
"valid": {
"type": "boolean"
}
}
},
"core.NullInt": {
"type": "object",
"properties": {
"int": {
"type": "integer"
"val": {
"description": "整数或者null",
"type": "integer",
"format": "int64"
},
"valid": {
"description": "是否有值",
"type": "boolean"
}
}
@@ -3983,10 +3432,7 @@ const docTemplate = `{
"core.NullTime": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"time": {
"val": {
"type": "string"
},
"valid": {
@@ -3994,7 +3440,7 @@ const docTemplate = `{
}
}
},
"flow_apply.FlowApplyResp": {
"flowSchema.FlowApplyResp": {
"type": "object",
"properties": {
"applyUserId": {
@@ -4062,7 +3508,7 @@ const docTemplate = `{
}
}
},
"flow_history.FlowHistoryResp": {
"flowSchema.FlowHistoryResp": {
"type": "object",
"properties": {
"applyId": {
@@ -4135,7 +3581,7 @@ const docTemplate = `{
}
}
},
"flow_template.FlowTemplateResp": {
"flowSchema.FlowTemplateResp": {
"type": "object",
"properties": {
"flowFormData": {
@@ -4167,7 +3613,7 @@ const docTemplate = `{
}
}
},
"monitor_client.MonitorClientResp": {
"monitorSchema.MonitorClientResp": {
"type": "object",
"properties": {
"browser": {
@@ -4244,7 +3690,7 @@ const docTemplate = `{
}
}
},
"monitor_error.MonitorErrorResp": {
"monitorSchema.MonitorErrorResp": {
"type": "object",
"properties": {
"createTime": {
@@ -4259,6 +3705,14 @@ const docTemplate = `{
"description": "事件类型",
"type": "string"
},
"height": {
"description": "屏幕高度",
"allOf": [
{
"$ref": "#/definitions/core.NullInt"
}
]
},
"id": {
"description": "错误id",
"type": "integer"
@@ -4282,10 +3736,18 @@ const docTemplate = `{
"stack": {
"description": "错误堆栈",
"type": "string"
},
"width": {
"description": "屏幕",
"allOf": [
{
"$ref": "#/definitions/core.NullInt"
}
]
}
}
},
"monitor_project.MonitorProjectResp": {
"monitorSchema.MonitorProjectResp": {
"type": "object",
"properties": {
"createTime": {
@@ -4330,47 +3792,6 @@ const docTemplate = `{
}
}
},
"monitor_slow.MonitorSlowResp": {
"type": "object",
"properties": {
"clientId": {
"description": "sdk生成的客户端id",
"type": "string"
},
"createTime": {
"description": "创建时间",
"allOf": [
{
"$ref": "#/definitions/core.NullTime"
}
]
},
"id": {
"description": "错误id",
"type": "integer"
},
"path": {
"description": "URL地址",
"type": "string"
},
"projectKey": {
"description": "项目key",
"type": "string"
},
"time": {
"description": "时间",
"allOf": [
{
"$ref": "#/definitions/core.NullFloat"
}
]
},
"userId": {
"description": "用户id",
"type": "string"
}
}
},
"response.PageResp": {
"type": "object",
"properties": {
@@ -4403,7 +3824,7 @@ const docTemplate = `{
}
}
},
"user_protocol.UserProtocolResp": {
"schema.UserProtocolResp": {
"type": "object",
"properties": {
"content": {
@@ -4411,23 +3832,15 @@ const docTemplate = `{
"type": "string"
},
"createTime": {
"description": "创建时间",
"allOf": [
{
"$ref": "#/definitions/core.NullTime"
}
]
},
"id": {
"description": "Sort core.NullFloat // 排序",
"type": "integer"
},
"sort": {
"description": "排序",
"allOf": [
{
"$ref": "#/definitions/core.NullFloat"
}
]
"id": {
"type": "string"
},
"tag": {
"description": "标识",
"type": "string"
},
"title": {
"description": "标题",
@@ -4435,11 +3848,11 @@ const docTemplate = `{
},
"updateTime": {
"description": "更新时间",
"allOf": [
{
"$ref": "#/definitions/core.NullTime"
}
]
"type": "integer"
},
"version": {
"description": "版本",
"type": "integer"
}
}
}
@@ -4458,7 +3871,7 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "0.0.1",
Host: "localhost:8001",
Host: "localhost:8080",
BasePath: "/",
Schemes: []string{},
Title: "x_admin文档",

View File

@@ -198,7 +198,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/flow_apply.FlowApplyResp"
"$ref": "#/definitions/flowSchema.FlowApplyResp"
}
}
}
@@ -424,7 +424,7 @@
"lists": {
"type": "array",
"items": {
"$ref": "#/definitions/flow_apply.FlowApplyResp"
"$ref": "#/definitions/flowSchema.FlowApplyResp"
}
}
}
@@ -627,7 +627,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/flow_history.FlowHistoryResp"
"$ref": "#/definitions/flowSchema.FlowHistoryResp"
}
}
}
@@ -867,7 +867,7 @@
"lists": {
"type": "array",
"items": {
"$ref": "#/definitions/flow_history.FlowHistoryResp"
"$ref": "#/definitions/flowSchema.FlowHistoryResp"
}
}
}
@@ -903,7 +903,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/flow_history.FlowHistoryResp"
"$ref": "#/definitions/flowSchema.FlowHistoryResp"
}
}
}
@@ -1045,7 +1045,7 @@
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/flow_template.FlowTemplateResp"
"$ref": "#/definitions/flowSchema.FlowTemplateResp"
}
}
}
@@ -1211,7 +1211,7 @@
"lists": {
"type": "array",
"items": {
"$ref": "#/definitions/flow_template.FlowTemplateResp"
"$ref": "#/definitions/flowSchema.FlowTemplateResp"
}
}
}
@@ -1588,7 +1588,7 @@
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_client.MonitorClientResp"
"$ref": "#/definitions/monitorSchema.MonitorClientResp"
}
}
}
@@ -1742,7 +1742,7 @@
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_client.MonitorClientResp"
"$ref": "#/definitions/monitorSchema.MonitorClientResp"
}
}
}
@@ -1872,7 +1872,7 @@
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_client.MonitorClientResp"
"$ref": "#/definitions/monitorSchema.MonitorClientResp"
}
}
}
@@ -2148,7 +2148,7 @@
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_error.MonitorErrorResp"
"$ref": "#/definitions/monitorSchema.MonitorErrorResp"
}
}
}
@@ -2260,7 +2260,7 @@
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_error.MonitorErrorResp"
"$ref": "#/definitions/monitorSchema.MonitorErrorResp"
}
}
}
@@ -2348,7 +2348,7 @@
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_error.MonitorErrorResp"
"$ref": "#/definitions/monitorSchema.MonitorErrorResp"
}
}
}
@@ -2608,7 +2608,7 @@
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_project.MonitorProjectResp"
"$ref": "#/definitions/monitorSchema.MonitorProjectResp"
}
}
}
@@ -2788,7 +2788,7 @@
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_project.MonitorProjectResp"
"$ref": "#/definitions/monitorSchema.MonitorProjectResp"
}
}
}
@@ -2876,484 +2876,7 @@
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_project.MonitorProjectResp"
}
}
}
}
]
}
}
}
}
},
"/api/admin/monitor_slow/ExportFile": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列导出",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "string",
"description": "项目key",
"name": "ProjectKey",
"in": "query"
},
{
"type": "string",
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "query"
},
{
"type": "string",
"description": "用户id",
"name": "UserId",
"in": "query"
},
{
"type": "string",
"description": "URL地址",
"name": "Path",
"in": "query"
},
{
"type": "number",
"description": "时间",
"name": "Time",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeStart",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeEnd",
"in": "query"
}
],
"responses": {}
}
},
"/api/admin/monitor_slow/ImportFile": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列导入",
"responses": {}
}
},
"/api/admin/monitor_slow/add": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列新增",
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/del": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列删除",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"description": "错误id",
"name": "Id",
"in": "body",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/delBatch": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列删除-批量",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"description": "逗号分割的id",
"name": "Ids",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/detail": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列详情",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "number",
"description": "错误id",
"name": "Id",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/monitor_slow.MonitorSlowResp"
}
}
}
]
}
}
}
}
},
"/api/admin/monitor_slow/edit": {
"post": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列编辑",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"description": "错误id",
"name": "Id",
"in": "body",
"schema": {
"type": "number"
}
},
{
"description": "项目key",
"name": "ProjectKey",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "用户id",
"name": "UserId",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "URL地址",
"name": "Path",
"in": "body",
"schema": {
"type": "string"
}
},
{
"description": "时间",
"name": "Time",
"in": "body",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/admin/monitor_slow/list": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列列表",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "页码",
"name": "PageNo",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "每页数量",
"name": "PageSize",
"in": "query",
"required": true
},
{
"type": "string",
"description": "项目key",
"name": "ProjectKey",
"in": "query"
},
{
"type": "string",
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "query"
},
{
"type": "string",
"description": "用户id",
"name": "UserId",
"in": "query"
},
{
"type": "string",
"description": "URL地址",
"name": "Path",
"in": "query"
},
{
"type": "number",
"description": "时间",
"name": "Time",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeStart",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeEnd",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
" data": {
"allOf": [
{
"$ref": "#/definitions/response.PageResp"
},
{
"type": "object",
"properties": {
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_slow.MonitorSlowResp"
}
}
}
}
]
}
}
}
]
}
}
}
}
},
"/api/admin/monitor_slow/listAll": {
"get": {
"produces": [
"application/json"
],
"tags": [
"monitor_slow-监控-错误列"
],
"summary": "监控-错误列列表-所有",
"parameters": [
{
"type": "string",
"description": "项目key",
"name": "ProjectKey",
"in": "query"
},
{
"type": "string",
"description": "sdk生成的客户端id",
"name": "ClientId",
"in": "query"
},
{
"type": "string",
"description": "用户id",
"name": "UserId",
"in": "query"
},
{
"type": "string",
"description": "URL地址",
"name": "Path",
"in": "query"
},
{
"type": "number",
"description": "时间",
"name": "Time",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeStart",
"in": "query"
},
{
"type": "string",
"description": "创建时间",
"name": "CreateTimeEnd",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/monitor_slow.MonitorSlowResp"
"$ref": "#/definitions/monitorSchema.MonitorProjectResp"
}
}
}
@@ -3599,7 +3122,7 @@
"type": "object",
"properties": {
" data": {
"$ref": "#/definitions/user_protocol.UserProtocolResp"
"$ref": "#/definitions/schema.UserProtocolResp"
}
}
}
@@ -3765,7 +3288,7 @@
" lists": {
"type": "array",
"items": {
"$ref": "#/definitions/user_protocol.UserProtocolResp"
"$ref": "#/definitions/schema.UserProtocolResp"
}
}
}
@@ -3847,7 +3370,7 @@
" data": {
"type": "array",
"items": {
"$ref": "#/definitions/user_protocol.UserProtocolResp"
"$ref": "#/definitions/schema.UserProtocolResp"
}
}
}
@@ -3858,72 +3381,6 @@
}
}
},
"/api/article_collect/list": {
"get": {
"produces": [
"application/json"
],
"tags": [
"article_collect文章"
],
"summary": "article_collect列表",
"parameters": [
{
"type": "string",
"description": "token",
"name": "Token",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "页码",
"name": "PageNo",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "每页大小",
"name": "PageSize",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "用户ID",
"name": "userId",
"in": "query"
},
{
"type": "integer",
"description": "文章ID",
"name": "articleId",
"in": "query"
}
],
"responses": {
"200": {
"description": "成功",
"schema": {
"$ref": "#/definitions/response.PageResp"
}
},
"400": {
"description": "请求错误",
"schema": {
"type": "string"
}
},
"500": {
"description": "内部错误",
"schema": {
"type": "string"
}
}
}
}
},
"/system/admin/ListByDeptId/{deptId}": {
"get": {
"description": "获取部门的用户",
@@ -3952,24 +3409,16 @@
}
},
"definitions": {
"core.NullFloat": {
"type": "object",
"properties": {
"float": {
"type": "number"
},
"valid": {
"type": "boolean"
}
}
},
"core.NullInt": {
"type": "object",
"properties": {
"int": {
"type": "integer"
"val": {
"description": "整数或者null",
"type": "integer",
"format": "int64"
},
"valid": {
"description": "是否有值",
"type": "boolean"
}
}
@@ -3977,10 +3426,7 @@
"core.NullTime": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"time": {
"val": {
"type": "string"
},
"valid": {
@@ -3988,7 +3434,7 @@
}
}
},
"flow_apply.FlowApplyResp": {
"flowSchema.FlowApplyResp": {
"type": "object",
"properties": {
"applyUserId": {
@@ -4056,7 +3502,7 @@
}
}
},
"flow_history.FlowHistoryResp": {
"flowSchema.FlowHistoryResp": {
"type": "object",
"properties": {
"applyId": {
@@ -4129,7 +3575,7 @@
}
}
},
"flow_template.FlowTemplateResp": {
"flowSchema.FlowTemplateResp": {
"type": "object",
"properties": {
"flowFormData": {
@@ -4161,7 +3607,7 @@
}
}
},
"monitor_client.MonitorClientResp": {
"monitorSchema.MonitorClientResp": {
"type": "object",
"properties": {
"browser": {
@@ -4238,7 +3684,7 @@
}
}
},
"monitor_error.MonitorErrorResp": {
"monitorSchema.MonitorErrorResp": {
"type": "object",
"properties": {
"createTime": {
@@ -4253,6 +3699,14 @@
"description": "事件类型",
"type": "string"
},
"height": {
"description": "屏幕高度",
"allOf": [
{
"$ref": "#/definitions/core.NullInt"
}
]
},
"id": {
"description": "错误id",
"type": "integer"
@@ -4276,10 +3730,18 @@
"stack": {
"description": "错误堆栈",
"type": "string"
},
"width": {
"description": "屏幕",
"allOf": [
{
"$ref": "#/definitions/core.NullInt"
}
]
}
}
},
"monitor_project.MonitorProjectResp": {
"monitorSchema.MonitorProjectResp": {
"type": "object",
"properties": {
"createTime": {
@@ -4324,47 +3786,6 @@
}
}
},
"monitor_slow.MonitorSlowResp": {
"type": "object",
"properties": {
"clientId": {
"description": "sdk生成的客户端id",
"type": "string"
},
"createTime": {
"description": "创建时间",
"allOf": [
{
"$ref": "#/definitions/core.NullTime"
}
]
},
"id": {
"description": "错误id",
"type": "integer"
},
"path": {
"description": "URL地址",
"type": "string"
},
"projectKey": {
"description": "项目key",
"type": "string"
},
"time": {
"description": "时间",
"allOf": [
{
"$ref": "#/definitions/core.NullFloat"
}
]
},
"userId": {
"description": "用户id",
"type": "string"
}
}
},
"response.PageResp": {
"type": "object",
"properties": {
@@ -4397,7 +3818,7 @@
}
}
},
"user_protocol.UserProtocolResp": {
"schema.UserProtocolResp": {
"type": "object",
"properties": {
"content": {
@@ -4405,23 +3826,15 @@
"type": "string"
},
"createTime": {
"description": "创建时间",
"allOf": [
{
"$ref": "#/definitions/core.NullTime"
}
]
},
"id": {
"description": "Sort core.NullFloat // 排序",
"type": "integer"
},
"sort": {
"description": "排序",
"allOf": [
{
"$ref": "#/definitions/core.NullFloat"
}
]
"id": {
"type": "string"
},
"tag": {
"description": "标识",
"type": "string"
},
"title": {
"description": "标题",
@@ -4429,11 +3842,11 @@
},
"updateTime": {
"description": "更新时间",
"allOf": [
{
"$ref": "#/definitions/core.NullTime"
}
]
"type": "integer"
},
"version": {
"description": "版本",
"type": "integer"
}
}
}

View File

@@ -1,29 +1,23 @@
basePath: /
definitions:
core.NullFloat:
properties:
float:
type: number
valid:
type: boolean
type: object
core.NullInt:
properties:
int:
val:
description: 整数或者null
format: int64
type: integer
valid:
description: 是否有值
type: boolean
type: object
core.NullTime:
properties:
format:
type: string
time:
val:
type: string
valid:
type: boolean
type: object
flow_apply.FlowApplyResp:
flowSchema.FlowApplyResp:
properties:
applyUserId:
description: 申请人id
@@ -69,7 +63,7 @@ definitions:
- $ref: '#/definitions/core.NullTime'
description: 更新时间
type: object
flow_history.FlowHistoryResp:
flowSchema.FlowHistoryResp:
properties:
applyId:
description: 申请id
@@ -119,7 +113,7 @@ definitions:
- $ref: '#/definitions/core.NullTime'
description: 更新时间
type: object
flow_template.FlowTemplateResp:
flowSchema.FlowTemplateResp:
properties:
flowFormData:
description: 表单配置
@@ -142,7 +136,7 @@ definitions:
id:
type: integer
type: object
monitor_client.MonitorClientResp:
monitorSchema.MonitorClientResp:
properties:
browser:
description: 浏览器
@@ -193,7 +187,7 @@ definitions:
- $ref: '#/definitions/core.NullInt'
description: 屏幕
type: object
monitor_error.MonitorErrorResp:
monitorSchema.MonitorErrorResp:
properties:
createTime:
allOf:
@@ -202,6 +196,10 @@ definitions:
eventType:
description: 事件类型
type: string
height:
allOf:
- $ref: '#/definitions/core.NullInt'
description: 屏幕高度
id:
description: 错误id
type: integer
@@ -220,8 +218,12 @@ definitions:
stack:
description: 错误堆栈
type: string
width:
allOf:
- $ref: '#/definitions/core.NullInt'
description: 屏幕
type: object
monitor_project.MonitorProjectResp:
monitorSchema.MonitorProjectResp:
properties:
createTime:
allOf:
@@ -248,32 +250,6 @@ definitions:
- $ref: '#/definitions/core.NullTime'
description: 更新时间
type: object
monitor_slow.MonitorSlowResp:
properties:
clientId:
description: sdk生成的客户端id
type: string
createTime:
allOf:
- $ref: '#/definitions/core.NullTime'
description: 创建时间
id:
description: 错误id
type: integer
path:
description: URL地址
type: string
projectKey:
description: 项目key
type: string
time:
allOf:
- $ref: '#/definitions/core.NullFloat'
description: 时间
userId:
description: 用户id
type: string
type: object
response.PageResp:
properties:
count:
@@ -296,28 +272,28 @@ definitions:
message:
type: string
type: object
user_protocol.UserProtocolResp:
schema.UserProtocolResp:
properties:
content:
description: 协议内容
type: string
createTime:
allOf:
- $ref: '#/definitions/core.NullTime'
description: 创建时间
id:
description: Sort core.NullFloat // 排序
type: integer
sort:
allOf:
- $ref: '#/definitions/core.NullFloat'
description: 排序
id:
type: string
tag:
description: 标识
type: string
title:
description: 标题
type: string
updateTime:
allOf:
- $ref: '#/definitions/core.NullTime'
description: 更新时间
type: integer
version:
description: 版本
type: integer
type: object
externalDocs:
description: OpenAPI
@@ -449,7 +425,7 @@ paths:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/flow_apply.FlowApplyResp'
$ref: '#/definitions/flowSchema.FlowApplyResp'
type: object
summary: 申请流程详情
tags:
@@ -591,7 +567,7 @@ paths:
- properties:
lists:
items:
$ref: '#/definitions/flow_apply.FlowApplyResp'
$ref: '#/definitions/flowSchema.FlowApplyResp'
type: array
type: object
type: object
@@ -716,7 +692,7 @@ paths:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/flow_history.FlowHistoryResp'
$ref: '#/definitions/flowSchema.FlowHistoryResp'
type: object
summary: 流程历史详情
tags:
@@ -867,7 +843,7 @@ paths:
- properties:
lists:
items:
$ref: '#/definitions/flow_history.FlowHistoryResp'
$ref: '#/definitions/flowSchema.FlowHistoryResp'
type: array
type: object
type: object
@@ -886,7 +862,7 @@ paths:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/flow_history.FlowHistoryResp'
$ref: '#/definitions/flowSchema.FlowHistoryResp'
type: object
summary: 流程历史列表-所有
tags:
@@ -975,7 +951,7 @@ paths:
"200":
description: 成功
schema:
$ref: '#/definitions/flow_template.FlowTemplateResp'
$ref: '#/definitions/flowSchema.FlowTemplateResp'
summary: 流程模板详情
tags:
- flow_template-流程模板
@@ -1080,7 +1056,7 @@ paths:
- properties:
lists:
items:
$ref: '#/definitions/flow_template.FlowTemplateResp'
$ref: '#/definitions/flowSchema.FlowTemplateResp'
type: array
type: object
type: object
@@ -1321,7 +1297,7 @@ paths:
- $ref: '#/definitions/response.Response'
- properties:
' data':
$ref: '#/definitions/monitor_client.MonitorClientResp'
$ref: '#/definitions/monitorSchema.MonitorClientResp'
type: object
summary: 监控-客户端信息详情
tags:
@@ -1419,7 +1395,7 @@ paths:
- properties:
' lists':
items:
$ref: '#/definitions/monitor_client.MonitorClientResp'
$ref: '#/definitions/monitorSchema.MonitorClientResp'
type: array
type: object
type: object
@@ -1500,7 +1476,7 @@ paths:
- properties:
' data':
items:
$ref: '#/definitions/monitor_client.MonitorClientResp'
$ref: '#/definitions/monitorSchema.MonitorClientResp'
type: array
type: object
summary: 监控-客户端信息列表-所有
@@ -1676,7 +1652,7 @@ paths:
- $ref: '#/definitions/response.Response'
- properties:
' data':
$ref: '#/definitions/monitor_error.MonitorErrorResp'
$ref: '#/definitions/monitorSchema.MonitorErrorResp'
type: object
summary: 监控-错误列详情
tags:
@@ -1746,7 +1722,7 @@ paths:
- properties:
' lists':
items:
$ref: '#/definitions/monitor_error.MonitorErrorResp'
$ref: '#/definitions/monitorSchema.MonitorErrorResp'
type: array
type: object
type: object
@@ -1799,7 +1775,7 @@ paths:
- properties:
' data':
items:
$ref: '#/definitions/monitor_error.MonitorErrorResp'
$ref: '#/definitions/monitorSchema.MonitorErrorResp'
type: array
type: object
summary: 监控-错误列列表-所有
@@ -1965,7 +1941,7 @@ paths:
- $ref: '#/definitions/response.Response'
- properties:
' data':
$ref: '#/definitions/monitor_project.MonitorProjectResp'
$ref: '#/definitions/monitorSchema.MonitorProjectResp'
type: object
summary: 监控项目详情
tags:
@@ -2078,7 +2054,7 @@ paths:
- properties:
' lists':
items:
$ref: '#/definitions/monitor_project.MonitorProjectResp'
$ref: '#/definitions/monitorSchema.MonitorProjectResp'
type: array
type: object
type: object
@@ -2131,311 +2107,12 @@ paths:
- properties:
' data':
items:
$ref: '#/definitions/monitor_project.MonitorProjectResp'
$ref: '#/definitions/monitorSchema.MonitorProjectResp'
type: array
type: object
summary: 监控项目列表-所有
tags:
- monitor_project-监控项目
/api/admin/monitor_slow/ExportFile:
get:
parameters:
- description: token
in: header
name: Token
required: true
type: string
- description: 项目key
in: query
name: ProjectKey
type: string
- description: sdk生成的客户端id
in: query
name: ClientId
type: string
- description: 用户id
in: query
name: UserId
type: string
- description: URL地址
in: query
name: Path
type: string
- description: 时间
in: query
name: Time
type: number
- description: 创建时间
in: query
name: CreateTimeStart
type: string
- description: 创建时间
in: query
name: CreateTimeEnd
type: string
produces:
- application/json
responses: {}
summary: 监控-错误列导出
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/ImportFile:
post:
produces:
- application/json
responses: {}
summary: 监控-错误列导入
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/add:
get:
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/response.Response'
summary: 监控-错误列新增
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/del:
post:
parameters:
- description: token
in: header
name: Token
required: true
type: string
- description: 错误id
in: body
name: Id
schema:
type: number
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/response.Response'
summary: 监控-错误列删除
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/delBatch:
post:
parameters:
- description: token
in: header
name: Token
required: true
type: string
- description: 逗号分割的id
in: body
name: Ids
schema:
type: string
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/response.Response'
summary: 监控-错误列删除-批量
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/detail:
get:
parameters:
- description: token
in: header
name: Token
required: true
type: string
- description: 错误id
in: query
name: Id
type: number
produces:
- application/json
responses:
"200":
description: 成功
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
' data':
$ref: '#/definitions/monitor_slow.MonitorSlowResp'
type: object
summary: 监控-错误列详情
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/edit:
post:
parameters:
- description: token
in: header
name: Token
required: true
type: string
- description: 错误id
in: body
name: Id
schema:
type: number
- description: 项目key
in: body
name: ProjectKey
schema:
type: string
- description: sdk生成的客户端id
in: body
name: ClientId
schema:
type: string
- description: 用户id
in: body
name: UserId
schema:
type: string
- description: URL地址
in: body
name: Path
schema:
type: string
- description: 时间
in: body
name: Time
schema:
type: number
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/response.Response'
summary: 监控-错误列编辑
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/list:
get:
parameters:
- description: token
in: header
name: Token
required: true
type: string
- description: 页码
in: query
name: PageNo
required: true
type: integer
- description: 每页数量
in: query
name: PageSize
required: true
type: integer
- description: 项目key
in: query
name: ProjectKey
type: string
- description: sdk生成的客户端id
in: query
name: ClientId
type: string
- description: 用户id
in: query
name: UserId
type: string
- description: URL地址
in: query
name: Path
type: string
- description: 时间
in: query
name: Time
type: number
- description: 创建时间
in: query
name: CreateTimeStart
type: string
- description: 创建时间
in: query
name: CreateTimeEnd
type: string
produces:
- application/json
responses:
"200":
description: 成功
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
' data':
allOf:
- $ref: '#/definitions/response.PageResp'
- properties:
' lists':
items:
$ref: '#/definitions/monitor_slow.MonitorSlowResp'
type: array
type: object
type: object
summary: 监控-错误列列表
tags:
- monitor_slow-监控-错误列
/api/admin/monitor_slow/listAll:
get:
parameters:
- description: 项目key
in: query
name: ProjectKey
type: string
- description: sdk生成的客户端id
in: query
name: ClientId
type: string
- description: 用户id
in: query
name: UserId
type: string
- description: URL地址
in: query
name: Path
type: string
- description: 时间
in: query
name: Time
type: number
- description: 创建时间
in: query
name: CreateTimeStart
type: string
- description: 创建时间
in: query
name: CreateTimeEnd
type: string
produces:
- application/json
responses:
"200":
description: 成功
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
' data':
items:
$ref: '#/definitions/monitor_slow.MonitorSlowResp'
type: array
type: object
summary: 监控-错误列列表-所有
tags:
- monitor_slow-监控-错误列
/api/admin/user_protocol/ExportFile:
get:
parameters:
@@ -2587,7 +2264,7 @@ paths:
- $ref: '#/definitions/response.Response'
- properties:
' data':
$ref: '#/definitions/user_protocol.UserProtocolResp'
$ref: '#/definitions/schema.UserProtocolResp'
type: object
summary: 用户协议详情
tags:
@@ -2691,7 +2368,7 @@ paths:
- properties:
' lists':
items:
$ref: '#/definitions/user_protocol.UserProtocolResp'
$ref: '#/definitions/schema.UserProtocolResp'
type: array
type: object
type: object
@@ -2740,56 +2417,12 @@ paths:
- properties:
' data':
items:
$ref: '#/definitions/user_protocol.UserProtocolResp'
$ref: '#/definitions/schema.UserProtocolResp'
type: array
type: object
summary: 用户协议列表-所有
tags:
- user_protocol-用户协议
/api/article_collect/list:
get:
parameters:
- description: token
in: header
name: Token
required: true
type: string
- description: 页码
in: query
name: PageNo
required: true
type: integer
- description: 每页大小
in: query
name: PageSize
required: true
type: integer
- description: 用户ID
in: query
name: userId
type: integer
- description: 文章ID
in: query
name: articleId
type: integer
produces:
- application/json
responses:
"200":
description: 成功
schema:
$ref: '#/definitions/response.PageResp'
"400":
description: 请求错误
schema:
type: string
"500":
description: 内部错误
schema:
type: string
summary: article_collect列表
tags:
- article_collect文章
/system/admin/ListByDeptId/{deptId}:
get:
description: 获取部门的用户

View File

@@ -1,7 +1,6 @@
package main
import (
"embed"
"fmt"
"log"
"net/http"
@@ -10,20 +9,18 @@ import (
"x_admin/config"
"x_admin/core"
"x_admin/core/response"
"x_admin/docs"
"x_admin/middleware"
"x_admin/routes"
_ "x_admin/app/corn"
_ "x_admin/docs"
swaggerfiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
// _ "x_admin/docs"
"github.com/gin-gonic/gin"
)
//go:embed public/static
var staticFs embed.FS
// // go:embed public/static
// var staticFs embed.FS
// initRouter 初始化router
func initRouter() *gin.Engine {
@@ -34,13 +31,17 @@ func initRouter() *gin.Engine {
// 设置上传文件的静态路径路由
r.Static(config.FileConfig.PublicPrefix, config.FileConfig.UploadDirectory)
staticHttpFs := http.FS(staticFs)
r.GET("/api/static/*filepath", func(c *gin.Context) {
filepath := c.Param("filepath")
fmt.Println(filepath)
// staticHttpFs := http.FS(staticFs)
// r.GET("/api/static/*filepath", func(c *gin.Context) {
// filepath := c.Param("filepath")
// fmt.Println(filepath)
// c.FileFromFS("public/static"+filepath, staticHttpFs)
// })
// 静态文件路由
r.Static("/api/static", "./public/static")
c.FileFromFS("public/static"+filepath, staticHttpFs)
})
// 设置中间件
r.Use(gin.Logger(), middleware.Cors(), middleware.ErrorRecover())
@@ -82,7 +83,7 @@ func initServer(router *gin.Engine) *http.Server {
// @license.name MIT License
// @license.url https://gitee.com/xiangheng/x_admin/blob/main/LICENSE
// @host localhost:8001
// @host localhost:8080
// @BasePath /
// @securityDefinitions.basic BasicAuth
@@ -100,11 +101,14 @@ func main() {
// 初始化router
router := initRouter()
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
// router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
router.GET("/swagger/doc.json", func(c *gin.Context) {
c.String(200, docs.SwaggerInfo.ReadDoc())
})
fmt.Println("格式化文档注释:", "swag fmt")
fmt.Println("生成文档:", "swag init")
fmt.Printf("文档: http://localhost:%v/swagger/index.html", config.AppConfig.Port)
// fmt.Printf("文档: http://localhost:%v/swagger/index.html", config.AppConfig.Port)
fmt.Printf("文档: http://localhost:%v/api/static/scalar.html", config.AppConfig.Port)
// 初始化server
s := initServer(router)

View File

@@ -1,12 +1,13 @@
package middleware
import (
"time"
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"time"
)
//Cors CORS跨域资源共享中间件
// Cors CORS跨域资源共享中间件
func Cors() gin.HandlerFunc {
return cors.New(cors.Config{
AllowOrigins: []string{"*"},

View File

@@ -2,7 +2,7 @@ package model
import "x_admin/core"
//FlowHistory 流程历史实体
// FlowHistory 流程历史实体
type FlowHistory struct {
Id int `gorm:"primarykey;comment:'历史id'"` // 历史id

View File

@@ -2,7 +2,7 @@ package gen_model
import "x_admin/core"
//GenTable 代码生成业务实体
// GenTable 代码生成业务实体
type GenTable struct {
ID uint `gorm:"primarykey;comment:'主键'"`
TableName string `gorm:"not null;default:'';comment:'表名称''"`
@@ -23,7 +23,7 @@ type GenTable struct {
UpdateTime core.NullTime `gorm:"autoUpdateTime;not null;comment:'更新时间'"`
}
//GenTableColumn 代码生成表列实体
// GenTableColumn 代码生成表列实体
type GenTableColumn struct {
ID uint `gorm:"primarykey;comment:'列主键'"`
TableID uint `gorm:"not null;default:0;comment:'表外键'"`

View File

@@ -2,7 +2,7 @@ package model
import "x_admin/core"
//MonitorWeb 错误收集error实体
// MonitorWeb 错误收集error实体
type MonitorWeb struct {
Id int `gorm:"primarykey;comment:'uuid'"` // uuid

View File

@@ -1,4 +1,7 @@
go install github.com/swaggo/swag/cmd/swag@latest
go mod tidy
swag fmt
swag init
xcopy .\public /S /Y .\bin\linux\public\
xcopy .\public /S /Y .\bin\windows\public\

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
<!doctype html>
<html>
<head>
<title>x-admin API Docs - Scalar</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<script id="api-reference" data-url="/swagger/doc.json"></script>
<script src="./api-reference.js"></script>
</body>
</html>