Merge branch 'dev' of github.com:go-admin-team/go-admin into dev
This commit is contained in:
commit
0810383afc
15 files changed
+174
-3328
No files matched your search
@@ -1,71 +0,0 @@
|
|||||||
package sysfile
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/gin-gonic/gin/binding"
|
|
||||||
|
|
||||||
"go-admin/app/admin/models"
|
|
||||||
"go-admin/tools"
|
|
||||||
"go-admin/tools/app"
|
|
||||||
"go-admin/tools/app/msg"
|
|
||||||
)
|
|
||||||
|
|
||||||
func GetSysFileDirList(c *gin.Context) {
|
|
||||||
var SysFileDir models.SysFileDirOld
|
|
||||||
SysFileDir.Label = c.Request.FormValue("label")
|
|
||||||
SysFileDir.PId, _ = tools.StringToInt(c.Request.FormValue("pid"))
|
|
||||||
SysFileDir.Id, _ = tools.StringToInt(c.Request.FormValue("id"))
|
|
||||||
SysFileDir.DataScope = tools.GetUserIdStr(c)
|
|
||||||
result, err := SysFileDir.SetSysFileDirOld()
|
|
||||||
tools.HasError(err, "抱歉未找到相关信息", -1)
|
|
||||||
app.OK(c, result, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetSysFileDir(c *gin.Context) {
|
|
||||||
var data models.SysFileDirOld
|
|
||||||
data.Id, _ = tools.StringToInt(c.Param("id"))
|
|
||||||
result, err := data.Get()
|
|
||||||
tools.HasError(err, "抱歉未找到相关信息", -1)
|
|
||||||
|
|
||||||
app.OK(c, result, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Summary 添加SysFileDir
|
|
||||||
// @Description 获取JSON
|
|
||||||
// @Tags SysFileDir
|
|
||||||
// @Accept application/json
|
|
||||||
// @Product application/json
|
|
||||||
// @Param data body models.SysFileDir true "data"
|
|
||||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
|
||||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
|
||||||
// @Router /api/v1/sysfiledir [post]
|
|
||||||
func InsertSysFileDir(c *gin.Context) {
|
|
||||||
var data models.SysFileDirOld
|
|
||||||
err := c.ShouldBindJSON(&data)
|
|
||||||
data.CreateBy = tools.GetUserIdStr(c)
|
|
||||||
tools.HasError(err, "", 500)
|
|
||||||
result, err := data.Create()
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
app.OK(c, result, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
func UpdateSysFileDir(c *gin.Context) {
|
|
||||||
var data models.SysFileDirOld
|
|
||||||
err := c.BindWith(&data, binding.JSON)
|
|
||||||
tools.HasError(err, "数据解析失败", -1)
|
|
||||||
data.UpdateBy = tools.GetUserIdStr(c)
|
|
||||||
result, err := data.Update(data.Id)
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
|
|
||||||
app.OK(c, result, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeleteSysFileDir(c *gin.Context) {
|
|
||||||
var data models.SysFileDirOld
|
|
||||||
data.UpdateBy = tools.GetUserIdStr(c)
|
|
||||||
|
|
||||||
IDS := tools.IdsStrToIdsIntGroup("id", c)
|
|
||||||
_, err := data.BatchDelete(IDS)
|
|
||||||
tools.HasError(err, msg.DeletedFail, 500)
|
|
||||||
app.OK(c, nil, msg.DeletedSuccess)
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
package sysfile
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/gin-gonic/gin/binding"
|
|
||||||
|
|
||||||
"go-admin/app/admin/models"
|
|
||||||
"go-admin/tools"
|
|
||||||
"go-admin/tools/app"
|
|
||||||
"go-admin/tools/app/msg"
|
|
||||||
)
|
|
||||||
|
|
||||||
func GetSysFileInfoOldList(c *gin.Context) {
|
|
||||||
var data models.SysFileInfoOld
|
|
||||||
var err error
|
|
||||||
var pageSize = 10
|
|
||||||
var pageIndex = 1
|
|
||||||
|
|
||||||
if size := c.Request.FormValue("pageSize"); size != "" {
|
|
||||||
pageSize, err = tools.StringToInt(size)
|
|
||||||
}
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
if index := c.Request.FormValue("pageIndex"); index != "" {
|
|
||||||
pageIndex, err = tools.StringToInt(index)
|
|
||||||
}
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
if pid := c.Request.FormValue("pId"); pid != "" {
|
|
||||||
data.PId, err = tools.StringToInt(pid)
|
|
||||||
}
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
|
|
||||||
data.DataScope = tools.GetUserIdStr(c)
|
|
||||||
result, count, err := data.GetPage(pageSize, pageIndex)
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
|
|
||||||
app.PageOK(c, result, count, pageIndex, pageSize, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetSysFileInfoOld(c *gin.Context) {
|
|
||||||
var data models.SysFileInfoOld
|
|
||||||
data.Id, _ = tools.StringToInt(c.Param("id"))
|
|
||||||
result, err := data.Get()
|
|
||||||
tools.HasError(err, "抱歉未找到相关信息", -1)
|
|
||||||
|
|
||||||
app.OK(c, result, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
func InsertSysFileInfoOld(c *gin.Context) {
|
|
||||||
var data models.SysFileInfoOld
|
|
||||||
err := c.ShouldBindJSON(&data)
|
|
||||||
data.CreateBy = tools.GetUserIdStr(c)
|
|
||||||
tools.HasError(err, "", 500)
|
|
||||||
result, err := data.Create()
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
app.OK(c, result, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
func UpdateSysFileInfoOld(c *gin.Context) {
|
|
||||||
var data models.SysFileInfoOld
|
|
||||||
err := c.BindWith(&data, binding.JSON)
|
|
||||||
tools.HasError(err, "数据解析失败", -1)
|
|
||||||
data.UpdateBy = tools.GetUserIdStr(c)
|
|
||||||
result, err := data.Update(data.Id)
|
|
||||||
tools.HasError(err, "", -1)
|
|
||||||
|
|
||||||
app.OK(c, result, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeleteSysFileInfoOld(c *gin.Context) {
|
|
||||||
var data models.SysFileInfoOld
|
|
||||||
data.UpdateBy = tools.GetUserIdStr(c)
|
|
||||||
|
|
||||||
IDS := tools.IdsStrToIdsIntGroup("id", c)
|
|
||||||
_, err := data.BatchDelete(IDS)
|
|
||||||
tools.HasError(err, msg.DeletedFail, 500)
|
|
||||||
app.OK(c, nil, msg.DeletedSuccess)
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,7 @@ import (
|
|||||||
// @Param dictType query string false "dictType"
|
// @Param dictType query string false "dictType"
|
||||||
// @Param pageSize query int false "页条数"
|
// @Param pageSize query int false "页条数"
|
||||||
// @Param pageIndex query int false "页码"
|
// @Param pageIndex query int false "页码"
|
||||||
// @Success 200 {object} app.PageResponse "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/dict/type/list [get]
|
// @Router /api/v1/dict/type/list [get]
|
||||||
// @Security Bearer
|
// @Security Bearer
|
||||||
func GetDictTypeList(c *gin.Context) {
|
func GetDictTypeList(c *gin.Context) {
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ func Digui(deptlist *[]SysDept, menu SysDept) SysDept {
|
|||||||
mi.Phone = list[j].Phone
|
mi.Phone = list[j].Phone
|
||||||
mi.Email = list[j].Email
|
mi.Email = list[j].Email
|
||||||
mi.Status = list[j].Status
|
mi.Status = list[j].Status
|
||||||
|
mi.CreatedAt = list[j].CreatedAt
|
||||||
mi.Children = []SysDept{}
|
mi.Children = []SysDept{}
|
||||||
ms := Digui(deptlist, mi)
|
ms := Digui(deptlist, mi)
|
||||||
min = append(min, ms)
|
min = append(min, ms)
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ func (e *DictData) Get() ([]DictData, error) {
|
|||||||
table = table.Where("dict_type = ?", e.DictType)
|
table = table.Where("dict_type = ?", e.DictType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table = table.Where("status = ?", 2)
|
||||||
|
|
||||||
if err := table.Order("dict_sort").Find(&doc).Error; err != nil {
|
if err := table.Order("dict_sort").Find(&doc).Error; err != nil {
|
||||||
return doc, err
|
return doc, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,163 +0,0 @@
|
|||||||
package models
|
|
||||||
|
|
||||||
import (
|
|
||||||
orm "go-admin/common/global"
|
|
||||||
"go-admin/tools"
|
|
||||||
)
|
|
||||||
|
|
||||||
type SysFileDirOld struct {
|
|
||||||
Id int `json:"id"`
|
|
||||||
Label string `json:"label" gorm:"type:varchar(255);"` // 名称
|
|
||||||
PId int `json:"pId" gorm:"type:int(11);"` // 父id
|
|
||||||
Sort int `json:"sort" gorm:""` //排序
|
|
||||||
Path string `json:"path" gorm:"size:255;"` //
|
|
||||||
CreateBy string `json:"createBy" gorm:"type:varchar(128);"` // 创建人
|
|
||||||
UpdateBy string `json:"updateBy" gorm:"type:varchar(128);"` // 编辑人
|
|
||||||
Children []SysFileDirOld `json:"children" gorm:"-"`
|
|
||||||
DataScope string `json:"dataScope" gorm:"-"`
|
|
||||||
Params string `json:"params" gorm:"-"`
|
|
||||||
BaseModel
|
|
||||||
}
|
|
||||||
|
|
||||||
func (SysFileDirOld) TableName() string {
|
|
||||||
return "sys_file_dir"
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建SysFileDirOld
|
|
||||||
func (e *SysFileDirOld) Create() (SysFileDirOld, error) {
|
|
||||||
var doc SysFileDirOld
|
|
||||||
result := orm.Eloquent.Table(e.TableName()).Create(&e)
|
|
||||||
if result.Error != nil {
|
|
||||||
err := result.Error
|
|
||||||
return doc, err
|
|
||||||
}
|
|
||||||
|
|
||||||
path := "/" + tools.IntToString(e.Id)
|
|
||||||
if int(e.PId) != 0 {
|
|
||||||
var deptP SysFileDirOld
|
|
||||||
orm.Eloquent.Table(e.TableName()).Where("id = ?", e.PId).First(&deptP)
|
|
||||||
path = deptP.Path + path
|
|
||||||
} else {
|
|
||||||
path = "/0" + path
|
|
||||||
}
|
|
||||||
var mp = map[string]string{}
|
|
||||||
mp["path"] = path
|
|
||||||
if err := orm.Eloquent.Table(e.TableName()).Where("id = ?", e.Id).Updates(mp).Error; err != nil {
|
|
||||||
err := result.Error
|
|
||||||
return doc, err
|
|
||||||
}
|
|
||||||
doc = *e
|
|
||||||
doc.Path = path
|
|
||||||
|
|
||||||
return doc, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取SysFileDirOld
|
|
||||||
func (e *SysFileDirOld) Get() (SysFileDirOld, error) {
|
|
||||||
var doc SysFileDirOld
|
|
||||||
table := orm.Eloquent.Table(e.TableName())
|
|
||||||
|
|
||||||
if e.Id != 0 {
|
|
||||||
table = table.Where("id = ?", e.Id)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := table.First(&doc).Error; err != nil {
|
|
||||||
return doc, err
|
|
||||||
}
|
|
||||||
return doc, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取SysFileDirOld带分页
|
|
||||||
func (e *SysFileDirOld) GetPage() ([]SysFileDirOld, int, error) {
|
|
||||||
var doc []SysFileDirOld
|
|
||||||
|
|
||||||
table := orm.Eloquent.Table(e.TableName())
|
|
||||||
var count int64
|
|
||||||
|
|
||||||
if err := table.Find(&doc).Error; err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
table.Where("`deleted_at` IS NULL").Count(&count)
|
|
||||||
return doc, int(count), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新SysFileDirOld
|
|
||||||
func (e *SysFileDirOld) Update(id int) (update SysFileDirOld, err error) {
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Where("id = ?", id).First(&update).Error; err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
path := "/" + tools.IntToString(e.Id)
|
|
||||||
if int(e.Id) != 0 {
|
|
||||||
var deptP SysFileDirOld
|
|
||||||
orm.Eloquent.Table(e.TableName()).Where("id = ?", e.Id).First(&deptP)
|
|
||||||
path = deptP.Path + path
|
|
||||||
} else {
|
|
||||||
path = "/0" + path
|
|
||||||
}
|
|
||||||
e.Path = path
|
|
||||||
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Model(&update).Updates(&e).Error; err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除SysFileDirOld
|
|
||||||
func (e *SysFileDirOld) Delete(id int) (success bool, err error) {
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Where("id = ?", id).Delete(&SysFileDirOld{}).Error; err != nil {
|
|
||||||
success = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
success = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//批量删除
|
|
||||||
func (e *SysFileDirOld) BatchDelete(id []int) (Result bool, err error) {
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Where("id in (?)", id).Delete(&SysFileDirOld{}).Error; err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
Result = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *SysFileDirOld) SetSysFileDirOld() ([]SysFileDirOld, error) {
|
|
||||||
list, _, err := e.GetPage()
|
|
||||||
|
|
||||||
m := make([]SysFileDirOld, 0)
|
|
||||||
for i := 0; i < len(list); i++ {
|
|
||||||
if list[i].PId != 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
info := SysFileDirOldDigui(&list, list[i])
|
|
||||||
|
|
||||||
m = append(m, info)
|
|
||||||
}
|
|
||||||
return m, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func SysFileDirOldDigui(deptlist *[]SysFileDirOld, menu SysFileDirOld) SysFileDirOld {
|
|
||||||
list := *deptlist
|
|
||||||
|
|
||||||
min := make([]SysFileDirOld, 0)
|
|
||||||
for j := 0; j < len(list); j++ {
|
|
||||||
|
|
||||||
if menu.Id != list[j].PId {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
mi := SysFileDirOld{}
|
|
||||||
mi.Id = list[j].Id
|
|
||||||
mi.PId = list[j].PId
|
|
||||||
mi.Label = list[j].Label
|
|
||||||
mi.Sort = list[j].Sort
|
|
||||||
mi.CreatedAt = list[j].CreatedAt
|
|
||||||
mi.UpdatedAt = list[j].UpdatedAt
|
|
||||||
mi.Children = []SysFileDirOld{}
|
|
||||||
ms := SysFileDirOldDigui(deptlist, mi)
|
|
||||||
min = append(min, ms)
|
|
||||||
|
|
||||||
}
|
|
||||||
menu.Children = min
|
|
||||||
return menu
|
|
||||||
}
|
|
||||||
@@ -14,7 +14,7 @@ type Login struct {
|
|||||||
|
|
||||||
func (u *Login) GetUser() (user SysUser, role SysRole, e error) {
|
func (u *Login) GetUser() (user SysUser, role SysRole, e error) {
|
||||||
|
|
||||||
e = orm.Eloquent.Table("sys_user").Where("username = ? ", u.Username).Find(&user).Error
|
e = orm.Eloquent.Table("sys_user").Where("username = ? and status = 2", u.Username).Find(&user).Error
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,111 +0,0 @@
|
|||||||
package models
|
|
||||||
|
|
||||||
import (
|
|
||||||
orm "go-admin/common/global"
|
|
||||||
)
|
|
||||||
|
|
||||||
type SysFileInfoOld struct {
|
|
||||||
Id int `json:"id"` // id
|
|
||||||
Type string `json:"type" gorm:"type:varchar(255);"` // 文件类型
|
|
||||||
Name string `json:"name" gorm:"type:varchar(255);"` // 文件名称
|
|
||||||
Size string `json:"size" gorm:"type:int(11);"` // 文件大小
|
|
||||||
PId int `json:"pId" gorm:"type:int(11);"` // 目录id
|
|
||||||
Source string `json:"source" gorm:"type:varchar(255);"` // 文件源
|
|
||||||
Url string `json:"url" gorm:"type:varchar(255);"` // 文件路径
|
|
||||||
FullUrl string `json:"fullUrl" gorm:"type:varchar(255);"` // 文件全路径
|
|
||||||
CreateBy string `json:"createBy" gorm:"type:varchar(128);"` // 创建人
|
|
||||||
UpdateBy string `json:"updateBy" gorm:"type:varchar(128);"` // 编辑人
|
|
||||||
DataScope string `json:"dataScope" gorm:"-"`
|
|
||||||
Params string `json:"params" gorm:"-"`
|
|
||||||
BaseModel
|
|
||||||
}
|
|
||||||
|
|
||||||
func (SysFileInfoOld) TableName() string {
|
|
||||||
return "sys_file_info"
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建SysFileInfoOld
|
|
||||||
func (e *SysFileInfoOld) Create() (SysFileInfoOld, error) {
|
|
||||||
var doc SysFileInfoOld
|
|
||||||
result := orm.Eloquent.Table(e.TableName()).Create(&e)
|
|
||||||
if result.Error != nil {
|
|
||||||
err := result.Error
|
|
||||||
return doc, err
|
|
||||||
}
|
|
||||||
doc = *e
|
|
||||||
return doc, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取SysFileInfoOld
|
|
||||||
func (e *SysFileInfoOld) Get() (SysFileInfoOld, error) {
|
|
||||||
var doc SysFileInfoOld
|
|
||||||
table := orm.Eloquent.Table(e.TableName())
|
|
||||||
|
|
||||||
if e.Id != 0 {
|
|
||||||
table = table.Where("id = ?", e.Id)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := table.First(&doc).Error; err != nil {
|
|
||||||
return doc, err
|
|
||||||
}
|
|
||||||
return doc, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取SysFileInfoOld带分页
|
|
||||||
func (e *SysFileInfoOld) GetPage(pageSize int, pageIndex int) ([]SysFileInfoOld, int, error) {
|
|
||||||
var doc []SysFileInfoOld
|
|
||||||
|
|
||||||
table := orm.Eloquent.Table(e.TableName())
|
|
||||||
|
|
||||||
if e.PId != 0 {
|
|
||||||
table = table.Where("p_id = ?", e.PId)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 数据权限控制(如果不需要数据权限请将此处去掉)
|
|
||||||
//dataPermission := new(DataPermission)
|
|
||||||
//dataPermission.UserId, _ = tools.StringToInt(e.DataScope)
|
|
||||||
//table, err := dataPermission.GetDataScope(e.TableName(), table)
|
|
||||||
//if err != nil {
|
|
||||||
// return nil, 0, err
|
|
||||||
//}
|
|
||||||
var count int64
|
|
||||||
|
|
||||||
if err := table.Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Offset(-1).Limit(-1).Count(&count).Error; err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
//table.Where("`deleted_at` IS NULL").Count(&count)
|
|
||||||
return doc, int(count), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新SysFileInfoOld
|
|
||||||
func (e *SysFileInfoOld) Update(id int) (update SysFileInfoOld, err error) {
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Where("id = ?", id).First(&update).Error; err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//参数1:是要修改的数据
|
|
||||||
//参数2:是修改的数据
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Model(&update).Updates(&e).Error; err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除SysFileInfoOld
|
|
||||||
func (e *SysFileInfoOld) Delete(id int) (success bool, err error) {
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Where("id = ?", id).Delete(&SysFileInfoOld{}).Error; err != nil {
|
|
||||||
success = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
success = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
//批量删除
|
|
||||||
func (e *SysFileInfoOld) BatchDelete(id []int) (Result bool, err error) {
|
|
||||||
if err = orm.Eloquent.Table(e.TableName()).Where("id in (?)", id).Delete(&SysFileInfoOld{}).Error; err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
Result = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
@@ -21,10 +21,10 @@ func _1599190683670Test(db *gorm.DB, version string) error {
|
|||||||
return db.Transaction(func(tx *gorm.DB) error {
|
return db.Transaction(func(tx *gorm.DB) error {
|
||||||
|
|
||||||
list3 := []models.SysDept{
|
list3 := []models.SysDept{
|
||||||
{DeptId: 1, ParentId: 0, DeptPath: "/0/1", DeptName: "爱拓科技", Sort: 0, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "0", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DeptId: 1, ParentId: 0, DeptPath: "/0/1", DeptName: "爱拓科技", Sort: 0, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "2", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DeptId: 7, ParentId: 1, DeptPath: "/0/1/7", DeptName: "研发部", Sort: 1, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "0", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DeptId: 7, ParentId: 1, DeptPath: "/0/1/7", DeptName: "研发部", Sort: 1, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "2", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DeptId: 8, ParentId: 1, DeptPath: "/0/1/8", DeptName: "运维部", Sort: 0, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "0", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DeptId: 8, ParentId: 1, DeptPath: "/0/1/8", DeptName: "运维部", Sort: 0, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "2", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DeptId: 9, ParentId: 1, DeptPath: "/0/1/9", DeptName: "客服部", Sort: 0, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "0", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DeptId: 9, ParentId: 1, DeptPath: "/0/1/9", DeptName: "客服部", Sort: 0, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "2", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DeptId: 10, ParentId: 1, DeptPath: "/0/1/10", DeptName: "人力资源", Sort: 3, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "1", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DeptId: 10, ParentId: 1, DeptPath: "/0/1/10", DeptName: "人力资源", Sort: 3, Leader: "aituo", Phone: "13782218188", Email: "atuo@aituo.com", Status: "1", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,26 +35,26 @@ func _1599190683670Test(db *gorm.DB, version string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
list5 := []models.Post{
|
list5 := []models.Post{
|
||||||
{PostId: 1, PostName: "首席执行官", PostCode: "CEO", Sort: 0, Status: "0", Remark: "首席执行官", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{PostId: 1, PostName: "首席执行官", PostCode: "CEO", Sort: 0, Status: "2", Remark: "首席执行官", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{PostId: 2, PostName: "首席技术执行官", PostCode: "CTO", Sort: 2, Status: "0", Remark: "首席技术执行官", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{PostId: 2, PostName: "首席技术执行官", PostCode: "CTO", Sort: 2, Status: "2", Remark: "首席技术执行官", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{PostId: 3, PostName: "首席运营官", PostCode: "COO", Sort: 3, Status: "0", Remark: "测试工程师", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{PostId: 3, PostName: "首席运营官", PostCode: "COO", Sort: 3, Status: "2", Remark: "测试工程师", CreateBy: "1", UpdateBy: "1", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
}
|
}
|
||||||
|
|
||||||
list6 := []models.SysRole{
|
list6 := []models.SysRole{
|
||||||
{1, "系统管理员", "0", "admin", 1, "", "1", "", "", true, "", models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}, "", []int{}, []int{}},
|
{1, "系统管理员", "2", "admin", 1, "", "1", "", "", true, "", models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}, "", []int{}, []int{}},
|
||||||
}
|
}
|
||||||
|
|
||||||
list7 := []models.DictType{
|
list7 := []models.DictType{
|
||||||
{DictId: 1, DictName: "系统开关", DictType: "sys_normal_disable", Status: "0", CreateBy: "1", UpdateBy: "1", Remark: "系统开关列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 1, DictName: "系统开关", DictType: "sys_normal_disable", Status: "2", CreateBy: "1", UpdateBy: "1", Remark: "系统开关列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 2, DictName: "用户性别", DictType: "sys_user_sex", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "用户性别列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 2, DictName: "用户性别", DictType: "sys_user_sex", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "用户性别列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 3, DictName: "菜单状态", DictType: "sys_show_hide", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "菜单状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 3, DictName: "菜单状态", DictType: "sys_show_hide", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "菜单状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 4, DictName: "系统是否", DictType: "sys_yes_no", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "系统是否列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 4, DictName: "系统是否", DictType: "sys_yes_no", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "系统是否列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 5, DictName: "任务状态", DictType: "sys_job_status", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "任务状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 5, DictName: "任务状态", DictType: "sys_job_status", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "任务状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 6, DictName: "任务分组", DictType: "sys_job_group", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "任务分组列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 6, DictName: "任务分组", DictType: "sys_job_group", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "任务分组列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 7, DictName: "通知类型", DictType: "sys_notice_type", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "通知类型列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 7, DictName: "通知类型", DictType: "sys_notice_type", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "通知类型列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 8, DictName: "系统状态", DictType: "sys_common_status", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "登录状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 8, DictName: "系统状态", DictType: "sys_common_status", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "登录状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 9, DictName: "操作类型", DictType: "sys_oper_type", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "操作类型列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 9, DictName: "操作类型", DictType: "sys_oper_type", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "操作类型列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictId: 10, DictName: "通知状态", DictType: "sys_notice_status", Status: "0", CreateBy: "1", UpdateBy: "", Remark: "通知状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictId: 10, DictName: "通知状态", DictType: "sys_notice_status", Status: "2", CreateBy: "1", UpdateBy: "", Remark: "通知状态列表", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
}
|
}
|
||||||
|
|
||||||
list8 := []models.SysUser{
|
list8 := []models.SysUser{
|
||||||
@@ -62,37 +62,37 @@ func _1599190683670Test(db *gorm.DB, version string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
list9 := []models.DictData{
|
list9 := []models.DictData{
|
||||||
{DictCode: 1, DictSort: 0, DictLabel: "正常", DictValue: "0", DictType: "sys_normal_disable", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统正常", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 1, DictSort: 0, DictLabel: "正常", DictValue: "2", DictType: "sys_normal_disable", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统正常", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 2, DictSort: 0, DictLabel: "停用", DictValue: "1", DictType: "sys_normal_disable", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统停用", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 2, DictSort: 0, DictLabel: "停用", DictValue: "1", DictType: "sys_normal_disable", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统停用", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 3, DictSort: 0, DictLabel: "男", DictValue: "0", DictType: "sys_user_sex", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "性别男", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 3, DictSort: 0, DictLabel: "男", DictValue: "0", DictType: "sys_user_sex", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "性别男", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 4, DictSort: 0, DictLabel: "女", DictValue: "1", DictType: "sys_user_sex", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "性别女", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 4, DictSort: 0, DictLabel: "女", DictValue: "1", DictType: "sys_user_sex", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "性别女", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 5, DictSort: 0, DictLabel: "未知", DictValue: "2", DictType: "sys_user_sex", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "性别未知", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 5, DictSort: 0, DictLabel: "未知", DictValue: "2", DictType: "sys_user_sex", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "性别未知", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 6, DictSort: 0, DictLabel: "显示", DictValue: "0", DictType: "sys_show_hide", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "显示菜单", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 6, DictSort: 0, DictLabel: "显示", DictValue: "0", DictType: "sys_show_hide", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "显示菜单", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 7, DictSort: 0, DictLabel: "隐藏", DictValue: "1", DictType: "sys_show_hide", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "隐藏菜单", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 7, DictSort: 0, DictLabel: "隐藏", DictValue: "1", DictType: "sys_show_hide", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "隐藏菜单", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 8, DictSort: 0, DictLabel: "是", DictValue: "Y", DictType: "sys_yes_no", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统默认是", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 8, DictSort: 0, DictLabel: "是", DictValue: "Y", DictType: "sys_yes_no", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统默认是", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 9, DictSort: 0, DictLabel: "否", DictValue: "N", DictType: "sys_yes_no", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统默认否", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 9, DictSort: 0, DictLabel: "否", DictValue: "N", DictType: "sys_yes_no", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统默认否", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 10, DictSort: 0, DictLabel: "正常", DictValue: "2", DictType: "sys_job_status", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "正常状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 10, DictSort: 0, DictLabel: "正常", DictValue: "2", DictType: "sys_job_status", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "正常状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 11, DictSort: 0, DictLabel: "停用", DictValue: "1", DictType: "sys_job_status", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "停用状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 11, DictSort: 0, DictLabel: "停用", DictValue: "1", DictType: "sys_job_status", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "停用状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 12, DictSort: 0, DictLabel: "默认", DictValue: "DEFAULT", DictType: "sys_job_group", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "默认分组", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 12, DictSort: 0, DictLabel: "默认", DictValue: "DEFAULT", DictType: "sys_job_group", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "默认分组", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 13, DictSort: 0, DictLabel: "系统", DictValue: "SYSTEM", DictType: "sys_job_group", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统分组", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 13, DictSort: 0, DictLabel: "系统", DictValue: "SYSTEM", DictType: "sys_job_group", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "系统分组", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 14, DictSort: 0, DictLabel: "通知", DictValue: "1", DictType: "sys_notice_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "通知", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 14, DictSort: 0, DictLabel: "通知", DictValue: "1", DictType: "sys_notice_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "通知", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 15, DictSort: 0, DictLabel: "公告", DictValue: "2", DictType: "sys_notice_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "公告", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 15, DictSort: 0, DictLabel: "公告", DictValue: "2", DictType: "sys_notice_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "公告", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 16, DictSort: 0, DictLabel: "正常", DictValue: "0", DictType: "sys_common_status", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "正常状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 16, DictSort: 0, DictLabel: "正常", DictValue: "0", DictType: "sys_common_status", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "正常状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 17, DictSort: 0, DictLabel: "关闭", DictValue: "1", DictType: "sys_common_status", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "关闭状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 17, DictSort: 0, DictLabel: "关闭", DictValue: "1", DictType: "sys_common_status", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "关闭状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 18, DictSort: 0, DictLabel: "新增", DictValue: "1", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "新增操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 18, DictSort: 0, DictLabel: "新增", DictValue: "1", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "新增操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 19, DictSort: 0, DictLabel: "修改", DictValue: "2", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "修改操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 19, DictSort: 0, DictLabel: "修改", DictValue: "2", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "修改操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 20, DictSort: 0, DictLabel: "删除", DictValue: "3", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "删除操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 20, DictSort: 0, DictLabel: "删除", DictValue: "3", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "删除操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 21, DictSort: 0, DictLabel: "授权", DictValue: "4", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "授权操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 21, DictSort: 0, DictLabel: "授权", DictValue: "4", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "授权操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 22, DictSort: 0, DictLabel: "导出", DictValue: "5", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "导出操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 22, DictSort: 0, DictLabel: "导出", DictValue: "5", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "导出操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 23, DictSort: 0, DictLabel: "导入", DictValue: "6", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "导入操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 23, DictSort: 0, DictLabel: "导入", DictValue: "6", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "导入操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 24, DictSort: 0, DictLabel: "强退", DictValue: "7", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "强退操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 24, DictSort: 0, DictLabel: "强退", DictValue: "7", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "强退操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 25, DictSort: 0, DictLabel: "生成代码", DictValue: "8", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "生成操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 25, DictSort: 0, DictLabel: "生成代码", DictValue: "8", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "生成操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 26, DictSort: 0, DictLabel: "清空数据", DictValue: "9", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "清空操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 26, DictSort: 0, DictLabel: "清空数据", DictValue: "9", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "清空操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 27, DictSort: 0, DictLabel: "成功", DictValue: "0", DictType: "sys_notice_status", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "成功状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 27, DictSort: 0, DictLabel: "成功", DictValue: "0", DictType: "sys_notice_status", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "成功状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 28, DictSort: 0, DictLabel: "失败", DictValue: "1", DictType: "sys_notice_status", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "", Remark: "失败状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 28, DictSort: 0, DictLabel: "失败", DictValue: "1", DictType: "sys_notice_status", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "", Remark: "失败状态", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 29, DictSort: 0, DictLabel: "登录", DictValue: "10", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "1", Remark: "登录操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 29, DictSort: 0, DictLabel: "登录", DictValue: "10", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "1", Remark: "登录操作", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 30, DictSort: 0, DictLabel: "退出", DictValue: "11", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "1", Remark: "", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 30, DictSort: 0, DictLabel: "退出", DictValue: "11", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "1", Remark: "", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
{DictCode: 31, DictSort: 0, DictLabel: "获取验证码", DictValue: "12", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "0", Default: "", CreateBy: "1", UpdateBy: "1", Remark: "获取验证码", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
{DictCode: 31, DictSort: 0, DictLabel: "获取验证码", DictValue: "12", DictType: "sys_oper_type", CssClass: "", ListClass: "", IsDefault: "", Status: "2", Default: "", CreateBy: "1", UpdateBy: "1", Remark: "获取验证码", BaseModel: models.BaseModel{CreatedAt: time.Now(), UpdatedAt: time.Now()}},
|
||||||
}
|
}
|
||||||
|
|
||||||
list10 := []models.SysSetting{
|
list10 := []models.SysSetting{
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package version
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go-admin/app/admin/models"
|
||||||
|
//"go-admin/app/admin/models"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
|
"go-admin/cmd/migrate/migration"
|
||||||
|
common "go-admin/common/models"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
_, fileName, _, _ := runtime.Caller(0)
|
||||||
|
migration.Migrate.SetVersion(migration.GetFilename(fileName), _1606579402398Test)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _1606579402398Test(db *gorm.DB, version string) error {
|
||||||
|
return db.Transaction(func(tx *gorm.DB) error {
|
||||||
|
|
||||||
|
dicData := models.DictData{}
|
||||||
|
err := tx.Model(&dicData).Where("dict_code = ?", 1).Update("dict_value", 2).Error
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
dicType := models.DictType{}
|
||||||
|
err = tx.Model(&dicType).Where("status = ?", 0).Update("status", 2).Error
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
user := models.SysUser{}
|
||||||
|
err = tx.Model(&user).Where("user_id = ?", 1).Update("status", 2).Error
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return tx.Create(&common.Migration{
|
||||||
|
Version: version,
|
||||||
|
}).Error
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package version
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go-admin/app/admin/models"
|
||||||
|
//"go-admin/app/admin/models"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
|
"go-admin/cmd/migrate/migration"
|
||||||
|
common "go-admin/common/models"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
_, fileName, _, _ := runtime.Caller(0)
|
||||||
|
migration.Migrate.SetVersion(migration.GetFilename(fileName), _1606582844753Test)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _1606582844753Test(db *gorm.DB, version string) error {
|
||||||
|
return db.Transaction(func(tx *gorm.DB) error {
|
||||||
|
|
||||||
|
|
||||||
|
dept := models.SysDept{}
|
||||||
|
err := tx.Model(&dept).Where("status = ?", 0).Update("status", 2).Error
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
dictData := models.DictData{}
|
||||||
|
err = tx.Model(&dictData).Where("status = ?", 0).Update("status", 2).Error
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return tx.Create(&common.Migration{
|
||||||
|
Version: version,
|
||||||
|
}).Error
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// go-admin Version Info
|
// go-admin Version Info
|
||||||
Version = "1.2.2"
|
Version = "1.2.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Cfg config.Conf = config.DefaultConfig()
|
var Cfg config.Conf = config.DefaultConfig()
|
||||||
|
|||||||
+15
-1071
File diff suppressed because it is too large.
Load diff
+13
-1068
File diff suppressed because it is too large.
Load diff
+10
-715
@@ -1,29 +1,4 @@
|
|||||||
definitions:
|
definitions:
|
||||||
app.Page:
|
|
||||||
properties:
|
|
||||||
count:
|
|
||||||
type: integer
|
|
||||||
list:
|
|
||||||
type: object
|
|
||||||
pageIndex:
|
|
||||||
type: integer
|
|
||||||
pageSize:
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
app.PageResponse:
|
|
||||||
properties:
|
|
||||||
code:
|
|
||||||
description: 代码
|
|
||||||
example: 200
|
|
||||||
type: integer
|
|
||||||
data:
|
|
||||||
$ref: '#/definitions/app.Page'
|
|
||||||
description: 数据集
|
|
||||||
type: object
|
|
||||||
msg:
|
|
||||||
description: 消息
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
app.Response:
|
app.Response:
|
||||||
properties:
|
properties:
|
||||||
code:
|
code:
|
||||||
@@ -36,6 +11,8 @@ definitions:
|
|||||||
msg:
|
msg:
|
||||||
description: 消息
|
description: 消息
|
||||||
type: string
|
type: string
|
||||||
|
requestId:
|
||||||
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.DictType:
|
models.DictType:
|
||||||
properties:
|
properties:
|
||||||
@@ -86,58 +63,6 @@ definitions:
|
|||||||
- username
|
- username
|
||||||
- uuid
|
- uuid
|
||||||
type: object
|
type: object
|
||||||
models.LoginLog:
|
|
||||||
properties:
|
|
||||||
browser:
|
|
||||||
description: 浏览器
|
|
||||||
type: string
|
|
||||||
createBy:
|
|
||||||
description: 创建人
|
|
||||||
type: string
|
|
||||||
createdAt:
|
|
||||||
type: string
|
|
||||||
dataScope:
|
|
||||||
description: 数据
|
|
||||||
type: string
|
|
||||||
deletedAt:
|
|
||||||
type: string
|
|
||||||
infoId:
|
|
||||||
description: 主键
|
|
||||||
type: integer
|
|
||||||
ipaddr:
|
|
||||||
description: ip地址
|
|
||||||
type: string
|
|
||||||
loginLocation:
|
|
||||||
description: 归属地
|
|
||||||
type: string
|
|
||||||
loginTime:
|
|
||||||
description: 登录时间
|
|
||||||
type: string
|
|
||||||
msg:
|
|
||||||
type: string
|
|
||||||
os:
|
|
||||||
description: 系统
|
|
||||||
type: string
|
|
||||||
params:
|
|
||||||
type: string
|
|
||||||
platform:
|
|
||||||
description: 固件
|
|
||||||
type: string
|
|
||||||
remark:
|
|
||||||
description: 备注
|
|
||||||
type: string
|
|
||||||
status:
|
|
||||||
description: 状态
|
|
||||||
type: string
|
|
||||||
updateBy:
|
|
||||||
description: 更新者
|
|
||||||
type: string
|
|
||||||
updatedAt:
|
|
||||||
type: string
|
|
||||||
username:
|
|
||||||
description: 用户名
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
models.Menu:
|
models.Menu:
|
||||||
properties:
|
properties:
|
||||||
action:
|
action:
|
||||||
@@ -230,78 +155,6 @@ definitions:
|
|||||||
updatedAt:
|
updatedAt:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.SysCategory:
|
|
||||||
properties:
|
|
||||||
createBy:
|
|
||||||
description: 创建者
|
|
||||||
type: string
|
|
||||||
createdAt:
|
|
||||||
type: string
|
|
||||||
dataScope:
|
|
||||||
type: string
|
|
||||||
deletedAt:
|
|
||||||
type: string
|
|
||||||
id:
|
|
||||||
description: 分类Id
|
|
||||||
type: integer
|
|
||||||
img:
|
|
||||||
description: 图片
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
description: 名称
|
|
||||||
type: string
|
|
||||||
params:
|
|
||||||
type: string
|
|
||||||
remark:
|
|
||||||
description: 备注
|
|
||||||
type: string
|
|
||||||
sort:
|
|
||||||
description: 排序
|
|
||||||
type: string
|
|
||||||
status:
|
|
||||||
description: 状态
|
|
||||||
type: string
|
|
||||||
updateBy:
|
|
||||||
description: 更新者
|
|
||||||
type: string
|
|
||||||
updatedAt:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
models.SysConfig:
|
|
||||||
properties:
|
|
||||||
configId:
|
|
||||||
description: 编码
|
|
||||||
type: integer
|
|
||||||
configKey:
|
|
||||||
description: 参数键名
|
|
||||||
type: string
|
|
||||||
configName:
|
|
||||||
description: 参数名称
|
|
||||||
type: string
|
|
||||||
configType:
|
|
||||||
description: 是否系统内置
|
|
||||||
type: string
|
|
||||||
configValue:
|
|
||||||
description: 参数键值
|
|
||||||
type: string
|
|
||||||
createBy:
|
|
||||||
type: string
|
|
||||||
createdAt:
|
|
||||||
type: string
|
|
||||||
dataScope:
|
|
||||||
type: string
|
|
||||||
deletedAt:
|
|
||||||
type: string
|
|
||||||
params:
|
|
||||||
type: string
|
|
||||||
remark:
|
|
||||||
description: 备注
|
|
||||||
type: string
|
|
||||||
updateBy:
|
|
||||||
type: string
|
|
||||||
updatedAt:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
models.SysContent:
|
models.SysContent:
|
||||||
properties:
|
properties:
|
||||||
cateId:
|
cateId:
|
||||||
@@ -392,119 +245,6 @@ definitions:
|
|||||||
updatedAt:
|
updatedAt:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.SysFileDir:
|
|
||||||
properties:
|
|
||||||
children:
|
|
||||||
items:
|
|
||||||
$ref: '#/definitions/models.SysFileDir'
|
|
||||||
type: array
|
|
||||||
createBy:
|
|
||||||
description: 创建人
|
|
||||||
type: string
|
|
||||||
createdAt:
|
|
||||||
type: string
|
|
||||||
dataScope:
|
|
||||||
type: string
|
|
||||||
deletedAt:
|
|
||||||
type: string
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
label:
|
|
||||||
description: 名称
|
|
||||||
type: string
|
|
||||||
pId:
|
|
||||||
description: 父id
|
|
||||||
type: integer
|
|
||||||
params:
|
|
||||||
type: string
|
|
||||||
path:
|
|
||||||
type: string
|
|
||||||
sort:
|
|
||||||
description: 排序
|
|
||||||
type: integer
|
|
||||||
updateBy:
|
|
||||||
description: 编辑人
|
|
||||||
type: string
|
|
||||||
updatedAt:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
models.SysOperLog:
|
|
||||||
properties:
|
|
||||||
businessType:
|
|
||||||
description: 操作类型
|
|
||||||
type: string
|
|
||||||
businessTypes:
|
|
||||||
type: string
|
|
||||||
createBy:
|
|
||||||
description: 创建人
|
|
||||||
type: string
|
|
||||||
createdAt:
|
|
||||||
type: string
|
|
||||||
dataScope:
|
|
||||||
description: 数据
|
|
||||||
type: string
|
|
||||||
deletedAt:
|
|
||||||
type: string
|
|
||||||
deptName:
|
|
||||||
description: 部门名称
|
|
||||||
type: string
|
|
||||||
jsonResult:
|
|
||||||
description: 返回数据
|
|
||||||
type: string
|
|
||||||
latencyime:
|
|
||||||
description: 耗时
|
|
||||||
type: string
|
|
||||||
method:
|
|
||||||
description: 函数
|
|
||||||
type: string
|
|
||||||
operId:
|
|
||||||
description: 日志编码
|
|
||||||
type: integer
|
|
||||||
operIp:
|
|
||||||
description: 客户端ip
|
|
||||||
type: string
|
|
||||||
operLocation:
|
|
||||||
description: 访问位置
|
|
||||||
type: string
|
|
||||||
operName:
|
|
||||||
description: 操作者
|
|
||||||
type: string
|
|
||||||
operParam:
|
|
||||||
description: 请求参数
|
|
||||||
type: string
|
|
||||||
operTime:
|
|
||||||
description: 操作时间
|
|
||||||
type: string
|
|
||||||
operUrl:
|
|
||||||
description: 访问地址
|
|
||||||
type: string
|
|
||||||
operatorType:
|
|
||||||
description: 操作类型
|
|
||||||
type: string
|
|
||||||
params:
|
|
||||||
description: 参数
|
|
||||||
type: string
|
|
||||||
remark:
|
|
||||||
description: 备注
|
|
||||||
type: string
|
|
||||||
requestMethod:
|
|
||||||
description: 请求方式
|
|
||||||
type: string
|
|
||||||
status:
|
|
||||||
description: 操作状态
|
|
||||||
type: string
|
|
||||||
title:
|
|
||||||
description: 操作模块
|
|
||||||
type: string
|
|
||||||
updateBy:
|
|
||||||
description: 更新者
|
|
||||||
type: string
|
|
||||||
updatedAt:
|
|
||||||
type: string
|
|
||||||
userAgent:
|
|
||||||
description: ua
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
models.SysRole:
|
models.SysRole:
|
||||||
properties:
|
properties:
|
||||||
admin:
|
admin:
|
||||||
@@ -729,6 +469,12 @@ definitions:
|
|||||||
functionName:
|
functionName:
|
||||||
description: 功能名称
|
description: 功能名称
|
||||||
type: string
|
type: string
|
||||||
|
isActions:
|
||||||
|
type: integer
|
||||||
|
isAuth:
|
||||||
|
type: integer
|
||||||
|
isDataScope:
|
||||||
|
type: integer
|
||||||
isLogicalDelete:
|
isLogicalDelete:
|
||||||
type: string
|
type: string
|
||||||
logicalDelete:
|
logicalDelete:
|
||||||
@@ -745,7 +491,6 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
params:
|
params:
|
||||||
$ref: '#/definitions/tools.Params'
|
$ref: '#/definitions/tools.Params'
|
||||||
type: object
|
|
||||||
pkColumn:
|
pkColumn:
|
||||||
type: string
|
type: string
|
||||||
pkGoField:
|
pkGoField:
|
||||||
@@ -785,121 +530,10 @@ info:
|
|||||||
添加qq群: 74520518 进入技术交流群 请备注,谢谢!
|
添加qq群: 74520518 进入技术交流群 请备注,谢谢!
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: https://github.com/wenjianzhang/go-admin/blob/master/LICENSE.md
|
url: https://github.com/go-admin-team/go-admin/blob/master/LICENSE.md
|
||||||
title: go-admin API
|
title: go-admin API
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
paths:
|
paths:
|
||||||
/api/v1/config:
|
|
||||||
put:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: body
|
|
||||||
in: body
|
|
||||||
name: data
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.SysConfig'
|
|
||||||
type: object
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 修改配置
|
|
||||||
tags:
|
|
||||||
- 配置
|
|
||||||
/api/v1/config/{configId}:
|
|
||||||
delete:
|
|
||||||
description: 删除数据
|
|
||||||
parameters:
|
|
||||||
- description: configId
|
|
||||||
in: path
|
|
||||||
name: configId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "删除失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 删除配置
|
|
||||||
tags:
|
|
||||||
- 配置
|
|
||||||
get:
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: 配置编码
|
|
||||||
in: path
|
|
||||||
name: configId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/app.Response'
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 获取配置
|
|
||||||
tags:
|
|
||||||
- 配置
|
|
||||||
/api/v1/configKey/{configKey}:
|
|
||||||
get:
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: configKey
|
|
||||||
in: path
|
|
||||||
name: configKey
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/app.Response'
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 获取配置
|
|
||||||
tags:
|
|
||||||
- 配置
|
|
||||||
/api/v1/configList:
|
|
||||||
get:
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: configKey
|
|
||||||
in: query
|
|
||||||
name: configKey
|
|
||||||
type: string
|
|
||||||
- description: configName
|
|
||||||
in: query
|
|
||||||
name: configName
|
|
||||||
type: string
|
|
||||||
- description: configType
|
|
||||||
in: query
|
|
||||||
name: configType
|
|
||||||
type: string
|
|
||||||
- description: 页条数
|
|
||||||
in: query
|
|
||||||
name: pageSize
|
|
||||||
type: integer
|
|
||||||
- description: 页码
|
|
||||||
in: query
|
|
||||||
name: pageIndex
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/app.Response'
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 配置列表数据
|
|
||||||
tags:
|
|
||||||
- 配置
|
|
||||||
/api/v1/db/columns/page:
|
/api/v1/db/columns/page:
|
||||||
get:
|
get:
|
||||||
description: 数据库表列分页列表 / database table column page list
|
description: 数据库表列分页列表 / database table column page list
|
||||||
@@ -960,7 +594,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysDept'
|
$ref: '#/definitions/models.SysDept'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -987,7 +620,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysDept'
|
$ref: '#/definitions/models.SysDept'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1075,7 +707,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.DictType'
|
$ref: '#/definitions/models.DictType'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1097,7 +728,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.DictType'
|
$ref: '#/definitions/models.DictType'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1208,7 +838,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.DictType'
|
$ref: '#/definitions/models.DictType'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1230,7 +859,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.DictType'
|
$ref: '#/definitions/models.DictType'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1304,126 +932,12 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/app.PageResponse'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: 字典类型列表数据
|
summary: 字典类型列表数据
|
||||||
tags:
|
tags:
|
||||||
- 字典类型
|
- 字典类型
|
||||||
/api/v1/loginlog:
|
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: data
|
|
||||||
in: body
|
|
||||||
name: data
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.LoginLog'
|
|
||||||
type: object
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 添加登录日志
|
|
||||||
tags:
|
|
||||||
- 登录日志
|
|
||||||
put:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: body
|
|
||||||
in: body
|
|
||||||
name: data
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.LoginLog'
|
|
||||||
type: object
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 修改登录日志
|
|
||||||
tags:
|
|
||||||
- 登录日志
|
|
||||||
/api/v1/loginlog/{infoId}:
|
|
||||||
delete:
|
|
||||||
description: 删除数据
|
|
||||||
parameters:
|
|
||||||
- description: 以逗号(,)分割的infoId
|
|
||||||
in: path
|
|
||||||
name: infoId
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "删除失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 批量删除登录日志
|
|
||||||
tags:
|
|
||||||
- 登录日志
|
|
||||||
get:
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: infoId
|
|
||||||
in: path
|
|
||||||
name: infoId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/app.Response'
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 通过编码获取登录日志
|
|
||||||
tags:
|
|
||||||
- 登录日志
|
|
||||||
/api/v1/loginloglist:
|
|
||||||
get:
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: status
|
|
||||||
in: query
|
|
||||||
name: status
|
|
||||||
type: string
|
|
||||||
- description: dictCode
|
|
||||||
in: query
|
|
||||||
name: dictCode
|
|
||||||
type: string
|
|
||||||
- description: dictType
|
|
||||||
in: query
|
|
||||||
name: dictType
|
|
||||||
type: string
|
|
||||||
- description: 页条数
|
|
||||||
in: query
|
|
||||||
name: pageSize
|
|
||||||
type: integer
|
|
||||||
- description: 页码
|
|
||||||
in: query
|
|
||||||
name: pageIndex
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/app.Response'
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 登录日志列表
|
|
||||||
tags:
|
|
||||||
- 登录日志
|
|
||||||
/api/v1/menu:
|
/api/v1/menu:
|
||||||
get:
|
get:
|
||||||
description: 获取JSON
|
description: 获取JSON
|
||||||
@@ -1519,7 +1033,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Menu'
|
$ref: '#/definitions/models.Menu'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "修改失败"}'
|
description: '{"code": -1, "message": "修改失败"}'
|
||||||
@@ -1601,99 +1114,6 @@ paths:
|
|||||||
summary: 根据角色名称获取菜单列表数据(左菜单使用)
|
summary: 根据角色名称获取菜单列表数据(左菜单使用)
|
||||||
tags:
|
tags:
|
||||||
- 菜单
|
- 菜单
|
||||||
/api/v1/operlog:
|
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: data
|
|
||||||
in: body
|
|
||||||
name: data
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.SysOperLog'
|
|
||||||
type: object
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 添加操作日志
|
|
||||||
tags:
|
|
||||||
- 操作日志
|
|
||||||
/api/v1/operlog/{infoId}:
|
|
||||||
get:
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: infoId
|
|
||||||
in: path
|
|
||||||
name: infoId
|
|
||||||
required: true
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/app.Response'
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 通过编码获取登录日志
|
|
||||||
tags:
|
|
||||||
- 登录日志
|
|
||||||
/api/v1/operlog/{operId}:
|
|
||||||
delete:
|
|
||||||
description: 删除数据
|
|
||||||
parameters:
|
|
||||||
- description: 以逗号(,)分割的operId
|
|
||||||
in: path
|
|
||||||
name: operId
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "删除失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 批量删除操作日志
|
|
||||||
tags:
|
|
||||||
- 操作日志
|
|
||||||
/api/v1/operloglist:
|
|
||||||
get:
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: status
|
|
||||||
in: query
|
|
||||||
name: status
|
|
||||||
type: string
|
|
||||||
- description: dictCode
|
|
||||||
in: query
|
|
||||||
name: dictCode
|
|
||||||
type: string
|
|
||||||
- description: dictType
|
|
||||||
in: query
|
|
||||||
name: dictType
|
|
||||||
type: string
|
|
||||||
- description: 页条数
|
|
||||||
in: query
|
|
||||||
name: pageSize
|
|
||||||
type: integer
|
|
||||||
- description: 页码
|
|
||||||
in: query
|
|
||||||
name: pageIndex
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/app.Response'
|
|
||||||
security:
|
|
||||||
- Bearer: []
|
|
||||||
summary: 登录日志列表
|
|
||||||
tags:
|
|
||||||
- 登录日志
|
|
||||||
/api/v1/post:
|
/api/v1/post:
|
||||||
get:
|
get:
|
||||||
description: 获取JSON
|
description: 获取JSON
|
||||||
@@ -1735,7 +1155,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Post'
|
$ref: '#/definitions/models.Post'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1758,7 +1177,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Post'
|
$ref: '#/definitions/models.Post'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1861,7 +1279,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysRole'
|
$ref: '#/definitions/models.SysRole'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -1881,7 +1298,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysRole'
|
$ref: '#/definitions/models.SysRole'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "修改失败"}'
|
description: '{"code": -1, "message": "修改失败"}'
|
||||||
@@ -2033,7 +1449,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/tools.SysTables'
|
$ref: '#/definitions/tools.SysTables'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -2127,7 +1542,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysUser'
|
$ref: '#/definitions/models.SysUser'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -2173,27 +1587,6 @@ paths:
|
|||||||
summary: 列表用户信息数据
|
summary: 列表用户信息数据
|
||||||
tags:
|
tags:
|
||||||
- 用户
|
- 用户
|
||||||
/api/v1/syscategory:
|
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: data
|
|
||||||
in: body
|
|
||||||
name: data
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.SysCategory'
|
|
||||||
type: object
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 添加分类
|
|
||||||
tags:
|
|
||||||
- 分类
|
|
||||||
/api/v1/syscontent:
|
/api/v1/syscontent:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -2206,7 +1599,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysContent'
|
$ref: '#/definitions/models.SysContent'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -2215,27 +1607,6 @@ paths:
|
|||||||
summary: 添加内容管理
|
summary: 添加内容管理
|
||||||
tags:
|
tags:
|
||||||
- 内容管理
|
- 内容管理
|
||||||
/api/v1/sysfiledir:
|
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: data
|
|
||||||
in: body
|
|
||||||
name: data
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.SysFileDir'
|
|
||||||
type: object
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 添加SysFileDir
|
|
||||||
tags:
|
|
||||||
- SysFileDir
|
|
||||||
/api/v1/system/setting:
|
/api/v1/system/setting:
|
||||||
post:
|
post:
|
||||||
description: 获取JSON
|
description: 获取JSON
|
||||||
@@ -2246,7 +1617,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysUser'
|
$ref: '#/definitions/models.SysUser'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
@@ -2283,7 +1653,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.SysUser'
|
$ref: '#/definitions/models.SysUser'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": -1, "message": "修改失败"}'
|
description: '{"code": -1, "message": "修改失败"}'
|
||||||
@@ -2342,7 +1711,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Login'
|
$ref: '#/definitions/models.Login'
|
||||||
type: object
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "expire": "2019-08-07T12:45:48+08:00", "token":
|
description: '{"code": 200, "expire": "2019-08-07T12:45:48+08:00", "token":
|
||||||
@@ -2364,79 +1732,6 @@ paths:
|
|||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: 退出登录
|
summary: 退出登录
|
||||||
/sd/cpu:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- text/html
|
|
||||||
description: CPU 使用量 DiskCheck checks the disk usage.
|
|
||||||
produces:
|
|
||||||
- text/html
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: CPU 使用量
|
|
||||||
/sd/disk:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- text/html
|
|
||||||
description: 服务器硬盘使用量 DiskCheck checks the disk usage.
|
|
||||||
produces:
|
|
||||||
- text/html
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: 'OK - Free space: 16321MB (15GB) / 51200MB (50GB) | Used: 31%'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"429":
|
|
||||||
description: WARNING
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"500":
|
|
||||||
description: CRITICAL
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 服务器硬盘使用量
|
|
||||||
/sd/health:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- text/html
|
|
||||||
description: 健康状况
|
|
||||||
produces:
|
|
||||||
- text/html
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 健康状况 HealthCheck shows OK as the ping-pong result.
|
|
||||||
/sd/os:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- text/html
|
|
||||||
description: Os
|
|
||||||
produces:
|
|
||||||
- text/html
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: OS
|
|
||||||
/sd/ram:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- text/html
|
|
||||||
description: 内存使用量 RAMCheck checks the disk usage.
|
|
||||||
produces:
|
|
||||||
- text/html
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: OK
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 内存使用量
|
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
Bearer:
|
Bearer:
|
||||||
in: header
|
in: header
|
||||||
|
|||||||
Reference in new issue
Block a user