docs📝: 修改接口文档

This commit is contained in:
zhangwenjian committed 2021-06-29 16:30:47 +08:00
1 parent 0607d462d0
commit 3fd34db3c1
16 files changed
+540 -288

No files matched your search

+1
View File
@@ -157,6 +157,7 @@ func (e SysDictType) Update(c *gin.Context) {
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}" // @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
// @Router /api/v1/dict/type [delete] // @Router /api/v1/dict/type [delete]
// @Security Bearer
func (e SysDictType) Delete(c *gin.Context) { func (e SysDictType) Delete(c *gin.Context) {
s := service.SysDictType{} s := service.SysDictType{}
req := dto.SysDictTypeById{} req := dto.SysDictTypeById{}
+3 -2
View File
@@ -51,7 +51,7 @@ func (e SysLoginLog) GetPage(c *gin.Context) {
e.PageOK(list, int(count), req.GetPageIndex(), req.GetPageSize(), "查询成功") e.PageOK(list, int(count), req.GetPageIndex(), req.GetPageSize(), "查询成功")
} }
// GetSysLoginLog 登录日志通过id获取 // Get 登录日志通过id获取
// @Summary 登录日志通过id获取 // @Summary 登录日志通过id获取
// @Description 获取JSON // @Description 获取JSON
// @Tags 登录日志 // @Tags 登录日志
@@ -81,13 +81,14 @@ func (e SysLoginLog) Get(c *gin.Context) {
e.OK(object, "查询成功") e.OK(object, "查询成功")
} }
// DeleteSysLoginLog 登录日志删除 // Delete 登录日志删除
// @Summary 登录日志删除 // @Summary 登录日志删除
// @Description 登录日志删除 // @Description 登录日志删除
// @Tags 登录日志 // @Tags 登录日志
// @Param data body dto.SysLoginLogById true "body" // @Param data body dto.SysLoginLogById true "body"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/sys-login-log [delete] // @Router /api/v1/sys-login-log [delete]
// @Security Bearer
func (e SysLoginLog) Delete(c *gin.Context) { func (e SysLoginLog) Delete(c *gin.Context) {
s := service.SysLoginLog{} s := service.SysLoginLog{}
req := dto.SysLoginLogById{} req := dto.SysLoginLogById{}
+5 -6
View File
@@ -1,13 +1,11 @@
package apis package apis
import ( import (
"github.com/gin-gonic/gin/binding"
"go-admin/app/admin/models"
"net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/go-admin-team/go-admin-core/sdk/api" "github.com/go-admin-team/go-admin-core/sdk/api"
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth/user" "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth/user"
"go-admin/app/admin/models"
"go-admin/app/admin/service" "go-admin/app/admin/service"
"go-admin/app/admin/service/dto" "go-admin/app/admin/service/dto"
@@ -153,6 +151,7 @@ func (e SysMenu) Update(c *gin.Context) {
// @Param data body dto.SysMenuById true "body" // @Param data body dto.SysMenuById true "body"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/menu [delete] // @Router /api/v1/menu [delete]
// @Security Bearer
func (e SysMenu) Delete(c *gin.Context) { func (e SysMenu) Delete(c *gin.Context) {
control := new(dto.SysMenuById) control := new(dto.SysMenuById)
s := new(service.SysMenu) s := new(service.SysMenu)
@@ -169,7 +168,7 @@ func (e SysMenu) Delete(c *gin.Context) {
err = s.Remove(control).Error err = s.Remove(control).Error
if err != nil { if err != nil {
e.Logger.Errorf("RemoveSysMenu error, %s", err) e.Logger.Errorf("RemoveSysMenu error, %s", err)
e.Error(http.StatusInternalServerError, err, "删除失败") e.Error(500, err, "删除失败")
return return
} }
e.OK(control.GetId(), "删除成功") e.OK(control.GetId(), "删除成功")
@@ -197,7 +196,7 @@ func (e SysMenu) GetMenuRole(c *gin.Context) {
result, err := s.SetMenuRole(user.GetRoleName(c)) result, err := s.SetMenuRole(user.GetRoleName(c))
if err != nil { if err != nil {
e.Error(http.StatusInternalServerError, err, "查询失败") e.Error(500, err, "查询失败")
return return
} }
+11 -5
View File
@@ -30,10 +30,10 @@ type SysUser struct {
// @Security Bearer // @Security Bearer
func (e SysUser) GetPage(c *gin.Context) { func (e SysUser) GetPage(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
req := dto.SysUserSearch{} req := dto.SysUserGetPageReq{}
err := e.MakeContext(c). err := e.MakeContext(c).
MakeOrm(). MakeOrm().
Bind(&req, binding.Form). Bind(&req).
MakeService(&s.Service). MakeService(&s.Service).
Errors Errors
if err != nil { if err != nil {
@@ -63,7 +63,7 @@ func (e SysUser) GetPage(c *gin.Context) {
// @Tags 用户 // @Tags 用户
// @Param userId path int true "用户编码" // @Param userId path int true "用户编码"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/sysUser/{userId} [get] // @Router /api/v1/sys-user/{userId} [get]
// @Security Bearer // @Security Bearer
func (e SysUser) Get(c *gin.Context) { func (e SysUser) Get(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
@@ -97,7 +97,8 @@ func (e SysUser) Get(c *gin.Context) {
// @Product application/json // @Product application/json
// @Param data body dto.SysUserControl true "用户数据" // @Param data body dto.SysUserControl true "用户数据"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/sysUser [post] // @Router /api/v1/sys-user [post]
// @Security Bearer
func (e SysUser) Insert(c *gin.Context) { func (e SysUser) Insert(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
req := dto.SysUserControl{} req := dto.SysUserControl{}
@@ -132,12 +133,13 @@ func (e SysUser) Insert(c *gin.Context) {
// @Param data body dto.SysUserControl true "body" // @Param data body dto.SysUserControl true "body"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/sys-user/{userId} [put] // @Router /api/v1/sys-user/{userId} [put]
// @Security Bearer
func (e SysUser) Update(c *gin.Context) { func (e SysUser) Update(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
req := dto.SysUserControl{} req := dto.SysUserControl{}
err := e.MakeContext(c). err := e.MakeContext(c).
MakeOrm(). MakeOrm().
Bind(&req, binding.JSON, nil). Bind(&req).
MakeService(&s.Service). MakeService(&s.Service).
Errors Errors
if err != nil { if err != nil {
@@ -166,6 +168,7 @@ func (e SysUser) Update(c *gin.Context) {
// @Param userId path int true "userId" // @Param userId path int true "userId"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/sys-user/{userId} [delete] // @Router /api/v1/sys-user/{userId} [delete]
// @Security Bearer
func (e SysUser) Delete(c *gin.Context) { func (e SysUser) Delete(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
req := dto.SysUserById{} req := dto.SysUserById{}
@@ -202,6 +205,7 @@ func (e SysUser) Delete(c *gin.Context) {
// @Param file formData file true "file" // @Param file formData file true "file"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/user/avatar [post] // @Router /api/v1/user/avatar [post]
// @Security Bearer
func (e SysUser) InsetAvatar(c *gin.Context) { func (e SysUser) InsetAvatar(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
req := dto.SysUserControl{} req := dto.SysUserControl{}
@@ -250,6 +254,7 @@ func (e SysUser) InsetAvatar(c *gin.Context) {
// @Param data body dto.UpdateSysUserStatusReq true "body" // @Param data body dto.UpdateSysUserStatusReq true "body"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/user/status [put] // @Router /api/v1/user/status [put]
// @Security Bearer
func (e SysUser) UpdateStatus(c *gin.Context) { func (e SysUser) UpdateStatus(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
req := dto.UpdateSysUserStatusReq{} req := dto.UpdateSysUserStatusReq{}
@@ -286,6 +291,7 @@ func (e SysUser) UpdateStatus(c *gin.Context) {
// @Param data body dto.ResetSysUserPwdReq true "body" // @Param data body dto.ResetSysUserPwdReq true "body"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/user/pwd/reset [put] // @Router /api/v1/user/pwd/reset [put]
// @Security Bearer
func (e SysUser) ResetPwd(c *gin.Context) { func (e SysUser) ResetPwd(c *gin.Context) {
s := service.SysUser{} s := service.SysUser{}
req := dto.ResetSysUserPwdReq{} req := dto.ResetSysUserPwdReq{}
+1
View File
@@ -40,6 +40,7 @@ type File struct {
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}" // @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}" // @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/public/uploadFile [post] // @Router /api/v1/public/uploadFile [post]
// @Security Bearer
func (e File) UploadFile(c *gin.Context) { func (e File) UploadFile(c *gin.Context) {
e.MakeContext(c) e.MakeContext(c)
tag, _ := c.GetPostForm("type") tag, _ := c.GetPostForm("type")
+1
View File
@@ -29,6 +29,7 @@ type ServerMonitor struct {
// @Tags 系统信息 // @Tags 系统信息
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/server-monitor [get] // @Router /api/v1/server-monitor [get]
// @Security Bearer
func (e ServerMonitor) ServerInfo(c *gin.Context) { func (e ServerMonitor) ServerInfo(c *gin.Context) {
e.Context = c e.Context = c
+2 -4
View File
@@ -1,8 +1,6 @@
package tools package tools
import ( import (
"net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/pkg" "github.com/go-admin-team/go-admin-core/sdk/pkg"
_ "github.com/go-admin-team/go-admin-core/sdk/pkg/response" _ "github.com/go-admin-team/go-admin-core/sdk/pkg/response"
@@ -13,7 +11,7 @@ import (
// GetDBColumnList 分页列表数据 // GetDBColumnList 分页列表数据
// @Summary 分页列表数据 / page list data // @Summary 分页列表数据 / page list data
// @Description 数据库表列分页列表 / database table column page list // @Description 数据库表列分页列表 / database table column page list
// @Tags 工具 / Tools // @Tags 工具 / 生成工具
// @Param tableName query string false "tableName / 数据表名称" // @Param tableName query string false "tableName / 数据表名称"
// @Param pageSize query int false "pageSize / 页条数" // @Param pageSize query int false "pageSize / 页条数"
// @Param pageIndex query int false "pageIndex / 页码" // @Param pageIndex query int false "pageIndex / 页码"
@@ -38,7 +36,7 @@ func (e *Gen) GetDBColumnList(c *gin.Context) {
db, err := pkg.GetOrm(c) db, err := pkg.GetOrm(c)
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
+2 -4
View File
@@ -2,8 +2,6 @@ package tools
import ( import (
"errors" "errors"
"net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/config" "github.com/go-admin-team/go-admin-core/sdk/config"
"github.com/go-admin-team/go-admin-core/sdk/pkg" "github.com/go-admin-team/go-admin-core/sdk/pkg"
@@ -15,7 +13,7 @@ import (
// GetDBTableList 分页列表数据 // GetDBTableList 分页列表数据
// @Summary 分页列表数据 / page list data // @Summary 分页列表数据 / page list data
// @Description 数据库表分页列表 / database table page list // @Description 数据库表分页列表 / database table page list
// @Tags 工具 / Tools // @Tags 工具 / 生成工具
// @Param tableName query string false "tableName / 数据表名称" // @Param tableName query string false "tableName / 数据表名称"
// @Param pageSize query int false "pageSize / 页条数" // @Param pageSize query int false "pageSize / 页条数"
// @Param pageIndex query int false "pageIndex / 页码" // @Param pageIndex query int false "pageIndex / 页码"
@@ -47,7 +45,7 @@ func (e *Gen) GetDBTableList(c *gin.Context) {
db, err := pkg.GetOrm(c) db, err := pkg.GetOrm(c)
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
+12 -13
View File
@@ -1,7 +1,6 @@
package tools package tools
import ( import (
"net/http"
"strings" "strings"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@@ -20,7 +19,7 @@ type SysTable struct {
// GetPage 分页列表数据 // GetPage 分页列表数据
// @Summary 分页列表数据 // @Summary 分页列表数据
// @Description 生成表分页列表 // @Description 生成表分页列表
// @Tags 工具 - 生成表 // @Tags 工具 / 生成工具
// @Param tableName query string false "tableName / 数据表名称" // @Param tableName query string false "tableName / 数据表名称"
// @Param pageSize query int false "pageSize / 页条数" // @Param pageSize query int false "pageSize / 页条数"
// @Param pageIndex query int false "pageIndex / 页码" // @Param pageIndex query int false "pageIndex / 页码"
@@ -45,7 +44,7 @@ func (e SysTable) GetPage(c *gin.Context) {
db, err := e.GetOrm() db, err := e.GetOrm()
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
@@ -63,7 +62,7 @@ func (e SysTable) GetPage(c *gin.Context) {
// Get // Get
// @Summary 获取配置 // @Summary 获取配置
// @Description 获取JSON // @Description 获取JSON
// @Tags 工具 - 生成表 // @Tags 工具 / 生成工具
// @Param configKey path int true "configKey" // @Param configKey path int true "configKey"
// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" // @Success 200 {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/sys/tables/info/{tableId} [get] // @Router /api/v1/sys/tables/info/{tableId} [get]
@@ -74,7 +73,7 @@ func (e SysTable) Get(c *gin.Context) {
db, err := e.GetOrm() db, err := e.GetOrm()
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
@@ -99,7 +98,7 @@ func (e SysTable) GetSysTablesInfo(c *gin.Context) {
db, err := e.GetOrm() db, err := e.GetOrm()
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
@@ -128,7 +127,7 @@ func (e SysTable) GetSysTablesTree(c *gin.Context) {
db, err := e.GetOrm() db, err := e.GetOrm()
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
@@ -146,7 +145,7 @@ func (e SysTable) GetSysTablesTree(c *gin.Context) {
// Insert // Insert
// @Summary 添加表结构 // @Summary 添加表结构
// @Description 添加表结构 // @Description 添加表结构
// @Tags 工具 - 生成表 // @Tags 工具 / 生成工具
// @Accept application/json // @Accept application/json
// @Product application/json // @Product application/json
// @Param tables query string false "tableName / 数据表名称" // @Param tables query string false "tableName / 数据表名称"
@@ -160,7 +159,7 @@ func (e SysTable) Insert(c *gin.Context) {
db, err := e.GetOrm() db, err := e.GetOrm()
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
@@ -292,7 +291,7 @@ func genTableInit(tx *gorm.DB, tablesList []string, i int, c *gin.Context) (tool
// Update // Update
// @Summary 修改表结构 // @Summary 修改表结构
// @Description 修改表结构 // @Description 修改表结构
// @Tags 工具 - 生成表 // @Tags 工具 / 生成工具
// @Accept application/json // @Accept application/json
// @Product application/json // @Product application/json
// @Param data body tools.SysTables true "body" // @Param data body tools.SysTables true "body"
@@ -310,7 +309,7 @@ func (e SysTable) Update(c *gin.Context) {
db, err := e.GetOrm() db, err := e.GetOrm()
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
@@ -327,7 +326,7 @@ func (e SysTable) Update(c *gin.Context) {
// Delete // Delete
// @Summary 删除表结构 // @Summary 删除表结构
// @Description 删除表结构 // @Description 删除表结构
// @Tags 工具 - 生成表 // @Tags 工具 / 生成工具
// @Param tableId path int true "tableId" // @Param tableId path int true "tableId"
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}" // @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
@@ -338,7 +337,7 @@ func (e SysTable) Delete(c *gin.Context) {
db, err := e.GetOrm() db, err := e.GetOrm()
if err != nil { if err != nil {
log.Errorf("get db connection error, %s", err.Error()) log.Errorf("get db connection error, %s", err.Error())
e.Error(http.StatusInternalServerError, err, "数据库连接获取失败") e.Error(500, err, "数据库连接获取失败")
return return
} }
+3 -4
View File
@@ -1,16 +1,15 @@
package common package common
import ( import (
"fmt"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"strings" "strings"
) )
func GetClientIP(c *gin.Context) string { func GetClientIP(c *gin.Context) string {
ClientIP := c.ClientIP() ClientIP := c.ClientIP()
fmt.Println("ClientIP:", ClientIP) //fmt.Println("ClientIP:", ClientIP)
RemoteIP, _ := c.RemoteIP() RemoteIP, _ := c.RemoteIP()
fmt.Println("RemoteIP:", RemoteIP) //fmt.Println("RemoteIP:", RemoteIP)
ip := c.Request.Header.Get("X-Forwarded-For") ip := c.Request.Header.Get("X-Forwarded-For")
if strings.Contains(ip, "127.0.0.1") || ip == "" { if strings.Contains(ip, "127.0.0.1") || ip == "" {
ip = c.Request.Header.Get("X-real-ip") ip = c.Request.Header.Get("X-real-ip")
@@ -24,6 +23,6 @@ func GetClientIP(c *gin.Context) string {
if ClientIP != "127.0.0.1" { if ClientIP != "127.0.0.1" {
ip = ClientIP ip = ClientIP
} }
fmt.Println("ip:", ip) //fmt.Println("ip:", ip)
return ip return ip
} }
+1
View File
@@ -52,6 +52,7 @@ settings:
addr: 127.0.0.1:6379 addr: 127.0.0.1:6379
password: xxxxxx password: xxxxxx
db: 2 db: 2
# memory: '' key存在即可
queue: queue:
memory: memory:
poolSize: 100 poolSize: 100
+191 -87
View File
@@ -30,16 +30,11 @@ var doc = `{
"paths": { "paths": {
"/api/v1/app-config": { "/api/v1/app-config": {
"get": { "get": {
"security": [ "description": "获取系统配置信息,主要注意这里不在验证权限",
{
"Bearer": []
}
],
"description": "获取系统配置信息,主要注意这里不在验证数据权限",
"tags": [ "tags": [
"配置管理" "配置管理"
], ],
"summary": "获取系统前台配置信息,主要注意这里不在验证数据权限", "summary": "获取系统前台配置信息,主要注意这里不在验证权限",
"responses": { "responses": {
"200": { "200": {
"description": "{\"code\": 200, \"data\": [...]}", "description": "{\"code\": 200, \"data\": [...]}",
@@ -67,11 +62,6 @@ var doc = `{
}, },
"/api/v1/captcha": { "/api/v1/captcha": {
"get": { "get": {
"security": [
{
"Bearer": []
}
],
"description": "获取验证码", "description": "获取验证码",
"tags": [ "tags": [
"登陆" "登陆"
@@ -109,7 +99,7 @@ var doc = `{
"get": { "get": {
"description": "数据库表列分页列表 / database table column page list", "description": "数据库表列分页列表 / database table column page list",
"tags": [ "tags": [
"工具 / Tools" "工具 / 生成工具"
], ],
"summary": "分页列表数据 / page list data", "summary": "分页列表数据 / page list data",
"parameters": [ "parameters": [
@@ -146,7 +136,7 @@ var doc = `{
"get": { "get": {
"description": "数据库表分页列表 / database table page list", "description": "数据库表分页列表 / database table page list",
"tags": [ "tags": [
"工具 / Tools" "工具 / 生成工具"
], ],
"summary": "分页列表数据 / page list data", "summary": "分页列表数据 / page list data",
"parameters": [ "parameters": [
@@ -255,6 +245,11 @@ var doc = `{
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"部门" "部门"
@@ -661,6 +656,11 @@ var doc = `{
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"字典类型" "字典类型"
@@ -915,6 +915,11 @@ var doc = `{
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"菜单" "菜单"
@@ -1136,7 +1141,7 @@ var doc = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/dto.SysPostControl" "$ref": "#/definitions/dto.SysPostInsertReq"
} }
} }
], ],
@@ -1150,6 +1155,11 @@ var doc = `{
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"岗位" "岗位"
@@ -1157,11 +1167,13 @@ var doc = `{
"summary": "删除岗位", "summary": "删除岗位",
"parameters": [ "parameters": [
{ {
"type": "integer", "description": "请求参数",
"description": "id",
"name": "id", "name": "id",
"in": "path", "in": "body",
"required": true "required": true,
"schema": {
"$ref": "#/definitions/dto.SysPostDeleteReq"
}
} }
], ],
"responses": { "responses": {
@@ -1180,7 +1192,7 @@ var doc = `{
} }
} }
}, },
"/api/v1/post/": { "/api/v1/post/{id}": {
"put": { "put": {
"security": [ "security": [
{ {
@@ -1202,7 +1214,7 @@ var doc = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/dto.SysPostControl" "$ref": "#/definitions/dto.SysPostUpdateReq"
} }
} }
], ],
@@ -1231,8 +1243,8 @@ var doc = `{
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
"description": "postId", "description": "编码",
"name": "postId", "name": "id",
"in": "path", "in": "path",
"required": true "required": true
} }
@@ -1249,6 +1261,11 @@ var doc = `{
}, },
"/api/v1/public/uploadFile": { "/api/v1/public/uploadFile": {
"post": { "post": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"multipart/form-data" "multipart/form-data"
@@ -1504,6 +1521,11 @@ var doc = `{
}, },
"/api/v1/server-monitor": { "/api/v1/server-monitor": {
"get": { "get": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"tags": [ "tags": [
"系统信息" "系统信息"
@@ -2080,6 +2102,11 @@ var doc = `{
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "登录日志删除", "description": "登录日志删除",
"tags": [ "tags": [
"登录日志" "登录日志"
@@ -2208,6 +2235,11 @@ var doc = `{
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"操作日志" "操作日志"
@@ -2292,10 +2324,78 @@ var doc = `{
} }
} }
} }
},
"post": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON",
"consumes": [
"application/json"
],
"tags": [
"用户"
],
"summary": "创建用户",
"parameters": [
{
"description": "用户数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SysUserControl"
}
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
} }
}, },
"/api/v1/sys-user/{userId}": { "/api/v1/sys-user/{userId}": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON",
"tags": [
"用户"
],
"summary": "获取用户",
"parameters": [
{
"type": "integer",
"description": "用户编码",
"name": "userId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": { "put": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"application/json" "application/json"
@@ -2325,6 +2425,11 @@ var doc = `{
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"用户" "用户"
@@ -2361,7 +2466,7 @@ var doc = `{
"application/json" "application/json"
], ],
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "修改表结构", "summary": "修改表结构",
"parameters": [ "parameters": [
@@ -2395,7 +2500,7 @@ var doc = `{
"application/json" "application/json"
], ],
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "添加表结构", "summary": "添加表结构",
"parameters": [ "parameters": [
@@ -2425,7 +2530,7 @@ var doc = `{
], ],
"description": "获取JSON", "description": "获取JSON",
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "获取配置", "summary": "获取配置",
"parameters": [ "parameters": [
@@ -2449,7 +2554,7 @@ var doc = `{
"delete": { "delete": {
"description": "删除表结构", "description": "删除表结构",
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "删除表结构", "summary": "删除表结构",
"parameters": [ "parameters": [
@@ -2475,7 +2580,7 @@ var doc = `{
"get": { "get": {
"description": "生成表分页列表", "description": "生成表分页列表",
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "分页列表数据", "summary": "分页列表数据",
"parameters": [ "parameters": [
@@ -2508,70 +2613,13 @@ var doc = `{
} }
} }
}, },
"/api/v1/sysUser": { "/api/v1/user/avatar": {
"post": { "post": {
"description": "获取JSON",
"consumes": [
"application/json"
],
"tags": [
"用户"
],
"summary": "创建用户",
"parameters": [
{
"description": "用户数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SysUserControl"
}
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/v1/sysUser/{userId}": {
"get": {
"security": [ "security": [
{ {
"Bearer": [] "Bearer": []
} }
], ],
"description": "获取JSON",
"tags": [
"用户"
],
"summary": "获取用户",
"parameters": [
{
"type": "integer",
"description": "用户编码",
"name": "userId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/v1/user/avatar": {
"post": {
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"multipart/form-data" "multipart/form-data"
@@ -2623,6 +2671,11 @@ var doc = `{
}, },
"/api/v1/user/pwd/reset": { "/api/v1/user/pwd/reset": {
"put": { "put": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"application/json" "application/json"
@@ -2690,6 +2743,11 @@ var doc = `{
}, },
"/api/v1/user/status": { "/api/v1/user/status": {
"put": { "put": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"application/json" "application/json"
@@ -3175,7 +3233,53 @@ var doc = `{
} }
} }
}, },
"dto.SysPostControl": { "dto.SysPostDeleteReq": {
"type": "object",
"properties": {
"createBy": {
"type": "integer"
},
"ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"updateBy": {
"type": "integer"
}
}
},
"dto.SysPostInsertReq": {
"type": "object",
"properties": {
"createBy": {
"type": "integer"
},
"postCode": {
"type": "string"
},
"postId": {
"type": "integer"
},
"postName": {
"type": "string"
},
"remark": {
"type": "string"
},
"sort": {
"type": "integer"
},
"status": {
"type": "integer"
},
"updateBy": {
"type": "integer"
}
}
},
"dto.SysPostUpdateReq": {
"type": "object", "type": "object",
"properties": { "properties": {
"createBy": { "createBy": {
+191 -87
View File
@@ -13,16 +13,11 @@
"paths": { "paths": {
"/api/v1/app-config": { "/api/v1/app-config": {
"get": { "get": {
"security": [ "description": "获取系统配置信息,主要注意这里不在验证权限",
{
"Bearer": []
}
],
"description": "获取系统配置信息,主要注意这里不在验证数据权限",
"tags": [ "tags": [
"配置管理" "配置管理"
], ],
"summary": "获取系统前台配置信息,主要注意这里不在验证数据权限", "summary": "获取系统前台配置信息,主要注意这里不在验证权限",
"responses": { "responses": {
"200": { "200": {
"description": "{\"code\": 200, \"data\": [...]}", "description": "{\"code\": 200, \"data\": [...]}",
@@ -50,11 +45,6 @@
}, },
"/api/v1/captcha": { "/api/v1/captcha": {
"get": { "get": {
"security": [
{
"Bearer": []
}
],
"description": "获取验证码", "description": "获取验证码",
"tags": [ "tags": [
"登陆" "登陆"
@@ -92,7 +82,7 @@
"get": { "get": {
"description": "数据库表列分页列表 / database table column page list", "description": "数据库表列分页列表 / database table column page list",
"tags": [ "tags": [
"工具 / Tools" "工具 / 生成工具"
], ],
"summary": "分页列表数据 / page list data", "summary": "分页列表数据 / page list data",
"parameters": [ "parameters": [
@@ -129,7 +119,7 @@
"get": { "get": {
"description": "数据库表分页列表 / database table page list", "description": "数据库表分页列表 / database table page list",
"tags": [ "tags": [
"工具 / Tools" "工具 / 生成工具"
], ],
"summary": "分页列表数据 / page list data", "summary": "分页列表数据 / page list data",
"parameters": [ "parameters": [
@@ -238,6 +228,11 @@
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"部门" "部门"
@@ -644,6 +639,11 @@
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"字典类型" "字典类型"
@@ -898,6 +898,11 @@
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"菜单" "菜单"
@@ -1119,7 +1124,7 @@
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/dto.SysPostControl" "$ref": "#/definitions/dto.SysPostInsertReq"
} }
} }
], ],
@@ -1133,6 +1138,11 @@
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"岗位" "岗位"
@@ -1140,11 +1150,13 @@
"summary": "删除岗位", "summary": "删除岗位",
"parameters": [ "parameters": [
{ {
"type": "integer", "description": "请求参数",
"description": "id",
"name": "id", "name": "id",
"in": "path", "in": "body",
"required": true "required": true,
"schema": {
"$ref": "#/definitions/dto.SysPostDeleteReq"
}
} }
], ],
"responses": { "responses": {
@@ -1163,7 +1175,7 @@
} }
} }
}, },
"/api/v1/post/": { "/api/v1/post/{id}": {
"put": { "put": {
"security": [ "security": [
{ {
@@ -1185,7 +1197,7 @@
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/dto.SysPostControl" "$ref": "#/definitions/dto.SysPostUpdateReq"
} }
} }
], ],
@@ -1214,8 +1226,8 @@
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
"description": "postId", "description": "编码",
"name": "postId", "name": "id",
"in": "path", "in": "path",
"required": true "required": true
} }
@@ -1232,6 +1244,11 @@
}, },
"/api/v1/public/uploadFile": { "/api/v1/public/uploadFile": {
"post": { "post": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"multipart/form-data" "multipart/form-data"
@@ -1487,6 +1504,11 @@
}, },
"/api/v1/server-monitor": { "/api/v1/server-monitor": {
"get": { "get": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"tags": [ "tags": [
"系统信息" "系统信息"
@@ -2063,6 +2085,11 @@
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "登录日志删除", "description": "登录日志删除",
"tags": [ "tags": [
"登录日志" "登录日志"
@@ -2191,6 +2218,11 @@
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"操作日志" "操作日志"
@@ -2275,10 +2307,78 @@
} }
} }
} }
},
"post": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON",
"consumes": [
"application/json"
],
"tags": [
"用户"
],
"summary": "创建用户",
"parameters": [
{
"description": "用户数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SysUserControl"
}
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
} }
}, },
"/api/v1/sys-user/{userId}": { "/api/v1/sys-user/{userId}": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON",
"tags": [
"用户"
],
"summary": "获取用户",
"parameters": [
{
"type": "integer",
"description": "用户编码",
"name": "userId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": { "put": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"application/json" "application/json"
@@ -2308,6 +2408,11 @@
} }
}, },
"delete": { "delete": {
"security": [
{
"Bearer": []
}
],
"description": "删除数据", "description": "删除数据",
"tags": [ "tags": [
"用户" "用户"
@@ -2344,7 +2449,7 @@
"application/json" "application/json"
], ],
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "修改表结构", "summary": "修改表结构",
"parameters": [ "parameters": [
@@ -2378,7 +2483,7 @@
"application/json" "application/json"
], ],
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "添加表结构", "summary": "添加表结构",
"parameters": [ "parameters": [
@@ -2408,7 +2513,7 @@
], ],
"description": "获取JSON", "description": "获取JSON",
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "获取配置", "summary": "获取配置",
"parameters": [ "parameters": [
@@ -2432,7 +2537,7 @@
"delete": { "delete": {
"description": "删除表结构", "description": "删除表结构",
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "删除表结构", "summary": "删除表结构",
"parameters": [ "parameters": [
@@ -2458,7 +2563,7 @@
"get": { "get": {
"description": "生成表分页列表", "description": "生成表分页列表",
"tags": [ "tags": [
"工具 - 生成表" "工具 / 生成工具"
], ],
"summary": "分页列表数据", "summary": "分页列表数据",
"parameters": [ "parameters": [
@@ -2491,70 +2596,13 @@
} }
} }
}, },
"/api/v1/sysUser": { "/api/v1/user/avatar": {
"post": { "post": {
"description": "获取JSON",
"consumes": [
"application/json"
],
"tags": [
"用户"
],
"summary": "创建用户",
"parameters": [
{
"description": "用户数据",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SysUserControl"
}
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/v1/sysUser/{userId}": {
"get": {
"security": [ "security": [
{ {
"Bearer": [] "Bearer": []
} }
], ],
"description": "获取JSON",
"tags": [
"用户"
],
"summary": "获取用户",
"parameters": [
{
"type": "integer",
"description": "用户编码",
"name": "userId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/api/v1/user/avatar": {
"post": {
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"multipart/form-data" "multipart/form-data"
@@ -2606,6 +2654,11 @@
}, },
"/api/v1/user/pwd/reset": { "/api/v1/user/pwd/reset": {
"put": { "put": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"application/json" "application/json"
@@ -2673,6 +2726,11 @@
}, },
"/api/v1/user/status": { "/api/v1/user/status": {
"put": { "put": {
"security": [
{
"Bearer": []
}
],
"description": "获取JSON", "description": "获取JSON",
"consumes": [ "consumes": [
"application/json" "application/json"
@@ -3158,7 +3216,53 @@
} }
} }
}, },
"dto.SysPostControl": { "dto.SysPostDeleteReq": {
"type": "object",
"properties": {
"createBy": {
"type": "integer"
},
"ids": {
"type": "array",
"items": {
"type": "integer"
}
},
"updateBy": {
"type": "integer"
}
}
},
"dto.SysPostInsertReq": {
"type": "object",
"properties": {
"createBy": {
"type": "integer"
},
"postCode": {
"type": "string"
},
"postId": {
"type": "integer"
},
"postName": {
"type": "string"
},
"remark": {
"type": "string"
},
"sort": {
"type": "integer"
},
"status": {
"type": "integer"
},
"updateBy": {
"type": "integer"
}
}
},
"dto.SysPostUpdateReq": {
"type": "object", "type": "object",
"properties": { "properties": {
"createBy": { "createBy": {
+114 -61
View File
@@ -292,7 +292,37 @@ definitions:
type: integer type: integer
type: array type: array
type: object type: object
dto.SysPostControl: dto.SysPostDeleteReq:
properties:
createBy:
type: integer
ids:
items:
type: integer
type: array
updateBy:
type: integer
type: object
dto.SysPostInsertReq:
properties:
createBy:
type: integer
postCode:
type: string
postId:
type: integer
postName:
type: string
remark:
type: string
sort:
type: integer
status:
type: integer
updateBy:
type: integer
type: object
dto.SysPostUpdateReq:
properties: properties:
createBy: createBy:
type: integer type: integer
@@ -822,7 +852,7 @@ info:
paths: paths:
/api/v1/app-config: /api/v1/app-config:
get: get:
description: 获取系统配置信息,主要注意这里不在验证数据权限 description: 获取系统配置信息,主要注意这里不在验证权限
responses: responses:
"200": "200":
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
@@ -835,9 +865,7 @@ paths:
type: string type: string
type: object type: object
type: object type: object
security: summary: 获取系统前台配置信息,主要注意这里不在验证权限
- Bearer: []
summary: 获取系统前台配置信息,主要注意这里不在验证数据权限
tags: tags:
- 配置管理 - 配置管理
/api/v1/captcha: /api/v1/captcha:
@@ -857,8 +885,6 @@ paths:
msg: msg:
type: string type: string
type: object type: object
security:
- Bearer: []
summary: 获取验证码 summary: 获取验证码
tags: tags:
- 登陆 - 登陆
@@ -885,7 +911,7 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
summary: 分页列表数据 / page list data summary: 分页列表数据 / page list data
tags: tags:
- 工具 / Tools - 工具 / 生成工具
/api/v1/db/tables/page: /api/v1/db/tables/page:
get: get:
description: 数据库表分页列表 / database table page list description: 数据库表分页列表 / database table page list
@@ -909,7 +935,7 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
summary: 分页列表数据 / page list data summary: 分页列表数据 / page list data
tags: tags:
- 工具 / Tools - 工具 / 生成工具
/api/v1/dept: /api/v1/dept:
delete: delete:
description: 删除数据 description: 删除数据
@@ -925,6 +951,8 @@ paths:
description: '{"code": -1, "message": "删除失败"}' description: '{"code": -1, "message": "删除失败"}'
schema: schema:
type: string type: string
security:
- Bearer: []
summary: 删除部门 summary: 删除部门
tags: tags:
- 部门 - 部门
@@ -1169,6 +1197,8 @@ paths:
description: '{"code": -1, "message": "删除失败"}' description: '{"code": -1, "message": "删除失败"}'
schema: schema:
type: string type: string
security:
- Bearer: []
summary: 删除字典类型 summary: 删除字典类型
tags: tags:
- 字典类型 - 字典类型
@@ -1348,6 +1378,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 删除菜单 summary: 删除菜单
tags: tags:
- 菜单 - 菜单
@@ -1475,11 +1507,12 @@ paths:
delete: delete:
description: 删除数据 description: 删除数据
parameters: parameters:
- description: id - description: 请求参数
in: path in: body
name: id name: id
required: true required: true
type: integer schema:
$ref: '#/definitions/dto.SysPostDeleteReq'
responses: responses:
"200": "200":
description: '{"code": 200, "message": "删除成功"}' description: '{"code": 200, "message": "删除成功"}'
@@ -1489,6 +1522,8 @@ paths:
description: '{"code": 500, "message": "删除失败"}' description: '{"code": 500, "message": "删除失败"}'
schema: schema:
type: string type: string
security:
- Bearer: []
summary: 删除岗位 summary: 删除岗位
tags: tags:
- 岗位 - 岗位
@@ -1531,7 +1566,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: '#/definitions/dto.SysPostControl' $ref: '#/definitions/dto.SysPostInsertReq'
responses: responses:
"200": "200":
description: '{"code": -1, "message": "添加失败"}' description: '{"code": -1, "message": "添加失败"}'
@@ -1542,7 +1577,7 @@ paths:
summary: 添加岗位 summary: 添加岗位
tags: tags:
- 岗位 - 岗位
/api/v1/post/: /api/v1/post/{id}:
put: put:
consumes: consumes:
- application/json - application/json
@@ -1553,7 +1588,7 @@ paths:
name: data name: data
required: true required: true
schema: schema:
$ref: '#/definitions/dto.SysPostControl' $ref: '#/definitions/dto.SysPostUpdateReq'
responses: responses:
"200": "200":
description: '{"code": -1, "message": "添加失败"}' description: '{"code": -1, "message": "添加失败"}'
@@ -1568,9 +1603,9 @@ paths:
get: get:
description: 获取JSON description: 获取JSON
parameters: parameters:
- description: postId - description: 编码
in: path in: path
name: postId name: id
required: true required: true
type: integer type: integer
responses: responses:
@@ -1604,6 +1639,8 @@ paths:
description: '{"code": -1, "message": "添加失败"}' description: '{"code": -1, "message": "添加失败"}'
schema: schema:
type: string type: string
security:
- Bearer: []
summary: 上传图片 summary: 上传图片
tags: tags:
- 公共接口 - 公共接口
@@ -1750,6 +1787,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 系统信息 summary: 系统信息
tags: tags:
- 系统信息 - 系统信息
@@ -2061,6 +2100,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 登录日志删除 summary: 登录日志删除
tags: tags:
- 登录日志 - 登录日志
@@ -2134,6 +2175,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 删除操作日志 summary: 删除操作日志
tags: tags:
- 操作日志 - 操作日志
@@ -2218,6 +2261,27 @@ paths:
summary: 列表用户信息数据 summary: 列表用户信息数据
tags: tags:
- 用户 - 用户
post:
consumes:
- application/json
description: 获取JSON
parameters:
- description: 用户数据
in: body
name: data
required: true
schema:
$ref: '#/definitions/dto.SysUserControl'
responses:
"200":
description: '{"code": 200, "data": [...]}'
schema:
$ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 创建用户
tags:
- 用户
/api/v1/sys-user/{userId}: /api/v1/sys-user/{userId}:
delete: delete:
description: 删除数据 description: 删除数据
@@ -2232,9 +2296,29 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 删除用户数据 summary: 删除用户数据
tags: tags:
- 用户 - 用户
get:
description: 获取JSON
parameters:
- description: 用户编码
in: path
name: userId
required: true
type: integer
responses:
"200":
description: '{"code": 200, "data": [...]}'
schema:
$ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 获取用户
tags:
- 用户
put: put:
consumes: consumes:
- application/json - application/json
@@ -2251,6 +2335,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 修改用户数据 summary: 修改用户数据
tags: tags:
- 用户 - 用户
@@ -2273,7 +2359,7 @@ paths:
- Bearer: [] - Bearer: []
summary: 添加表结构 summary: 添加表结构
tags: tags:
- 工具 - 生成表 - 工具 / 生成工具
put: put:
consumes: consumes:
- application/json - application/json
@@ -2294,7 +2380,7 @@ paths:
- Bearer: [] - Bearer: []
summary: 修改表结构 summary: 修改表结构
tags: tags:
- 工具 - 生成表 - 工具 / 生成工具
/api/v1/sys/tables/info/{tableId}: /api/v1/sys/tables/info/{tableId}:
delete: delete:
description: 删除表结构 description: 删除表结构
@@ -2311,7 +2397,7 @@ paths:
type: string type: string
summary: 删除表结构 summary: 删除表结构
tags: tags:
- 工具 - 生成表 - 工具 / 生成工具
get: get:
description: 获取JSON description: 获取JSON
parameters: parameters:
@@ -2329,7 +2415,7 @@ paths:
- Bearer: [] - Bearer: []
summary: 获取配置 summary: 获取配置
tags: tags:
- 工具 - 生成表 - 工具 / 生成工具
/api/v1/sys/tables/page: /api/v1/sys/tables/page:
get: get:
description: 生成表分页列表 description: 生成表分页列表
@@ -2353,46 +2439,7 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
summary: 分页列表数据 summary: 分页列表数据
tags: tags:
- 工具 - 生成表 - 工具 / 生成工具
/api/v1/sysUser:
post:
consumes:
- application/json
description: 获取JSON
parameters:
- description: 用户数据
in: body
name: data
required: true
schema:
$ref: '#/definitions/dto.SysUserControl'
responses:
"200":
description: '{"code": 200, "data": [...]}'
schema:
$ref: '#/definitions/response.Response'
summary: 创建用户
tags:
- 用户
/api/v1/sysUser/{userId}:
get:
description: 获取JSON
parameters:
- description: 用户编码
in: path
name: userId
required: true
type: integer
responses:
"200":
description: '{"code": 200, "data": [...]}'
schema:
$ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 获取用户
tags:
- 用户
/api/v1/user/avatar: /api/v1/user/avatar:
post: post:
consumes: consumes:
@@ -2409,6 +2456,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 修改头像 summary: 修改头像
tags: tags:
- 个人中心 - 个人中心
@@ -2442,6 +2491,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 重置用户密码 summary: 重置用户密码
tags: tags:
- 用户 - 用户
@@ -2484,6 +2535,8 @@ paths:
description: '{"code": 200, "data": [...]}' description: '{"code": 200, "data": [...]}'
schema: schema:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security:
- Bearer: []
summary: 修改用户状态 summary: 修改用户状态
tags: tags:
- 用户 - 用户
+1 -1
View File
@@ -54,7 +54,7 @@ func (s *{{.ClassName}}Control) Generate(model *models.SysConfig) {
{{$x := .Pk}} {{$x := .Pk}}
{{- if ($x) }} {{- if ($x) }}
if s.{{.GoField}} == 0 { if s.{{.GoField}} == 0 {
model.Model = common.Model{{{.GoField}}: s.{{.GoField}}} model.Model = common.Model{ {{.GoField}}: s.{{.GoField}} }
} }
{{- else if eq .GoField "CreatedAt" -}} {{- else if eq .GoField "CreatedAt" -}}
{{- else if eq .GoField "UpdatedAt" -}} {{- else if eq .GoField "UpdatedAt" -}}
+1 -14
View File
@@ -223,7 +223,6 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<FileChoose ref="fileChoose" :dialog-form-visible="fileOpen" @confirm="getImgList" @close="fileClose" />
</el-card> </el-card>
</template> </template>
</BasicLayout> </BasicLayout>
@@ -234,16 +233,12 @@
{{range .Columns}} {{range .Columns}}
{{- if ne .FkTableName "" -}} {{- if ne .FkTableName "" -}}
import {list{{.FkTableNameClass}} } from '@/api/{{ .FkTableNamePackage}}' import {list{{.FkTableNameClass}} } from '@/api/{{ .FkTableNamePackage}}'
{{ end -}} {{ end -}}
{{- end -}} {{- end -}}
import FileChoose from '@/components/FileChoose'
export default { export default {
name: '{{.ClassName}}', name: '{{.ClassName}}',
components: { components: {
FileChoose
}, },
data() { data() {
return { return {
@@ -262,8 +257,6 @@
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
isEdit: false, isEdit: false,
fileOpen: false,
fileIndex: undefined,
// 类型数据字典 // 类型数据字典
typeOptions: [], typeOptions: [],
{{.ModuleName}}List: [], {{.ModuleName}}List: [],
@@ -296,10 +289,7 @@
{{- range .Columns -}} {{- range .Columns -}}
{{- $x := .IsQuery -}} {{- $x := .IsQuery -}}
{{- if (eq $x "1") -}} {{- if (eq $x "1") -}}
{{.JsonField}}: {{.JsonField}}: [ {required: true, message: '{{.ColumnComment}}不能为空', trigger: 'blur'} ],
[
{required: true, message: '{{.ColumnComment}}不能为空', trigger: 'blur'}
],
{{ end }} {{ end }}
{{- end -}} {{- end -}}
} }
@@ -309,15 +299,12 @@
this.getList() this.getList()
{{range .Columns}} {{range .Columns}}
{{- if ne .DictType "" -}} {{- if ne .DictType "" -}}
this.getDicts('{{.DictType}}').then(response => { this.getDicts('{{.DictType}}').then(response => {
this.{{.JsonField}}Options = response.data this.{{.JsonField}}Options = response.data
}) })
{{ end -}} {{ end -}}
{{- if ne .FkTableName "" -}} {{- if ne .FkTableName "" -}}
this.get{{.FkTableNameClass}}Items() this.get{{.FkTableNameClass}}Items()
{{ end -}} {{ end -}}
{{- end -}} {{- end -}}
}, },