Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
9a4461c0
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
337
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9a4461c0
编写于
1月 20, 2022
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main'
上级
27bf596e
5f60fa68
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
103 addition
and
95 deletion
+103
-95
README.md
README.md
+2
-0
server/api/v1/autocode/auto_code_example.go
server/api/v1/autocode/auto_code_example.go
+5
-5
server/api/v1/example/exa_breakpoint_continue.go
server/api/v1/example/exa_breakpoint_continue.go
+7
-6
server/api/v1/example/exa_customer.go
server/api/v1/example/exa_customer.go
+5
-5
server/api/v1/example/exa_excel.go
server/api/v1/example/exa_excel.go
+2
-2
server/api/v1/example/exa_file_upload_download.go
server/api/v1/example/exa_file_upload_download.go
+3
-3
server/api/v1/system/sys_api.go
server/api/v1/system/sys_api.go
+9
-8
server/api/v1/system/sys_authority.go
server/api/v1/system/sys_authority.go
+6
-6
server/api/v1/system/sys_auto_code.go
server/api/v1/system/sys_auto_code.go
+4
-4
server/api/v1/system/sys_auto_code_history.go
server/api/v1/system/sys_auto_code_history.go
+4
-4
server/api/v1/system/sys_captcha.go
server/api/v1/system/sys_captcha.go
+2
-1
server/api/v1/system/sys_casbin.go
server/api/v1/system/sys_casbin.go
+2
-2
server/api/v1/system/sys_dictionary.go
server/api/v1/system/sys_dictionary.go
+5
-5
server/api/v1/system/sys_dictionary_detail.go
server/api/v1/system/sys_dictionary_detail.go
+5
-5
server/api/v1/system/sys_initdb.go
server/api/v1/system/sys_initdb.go
+12
-9
server/api/v1/system/sys_jwt_blacklist.go
server/api/v1/system/sys_jwt_blacklist.go
+1
-1
server/api/v1/system/sys_menu.go
server/api/v1/system/sys_menu.go
+9
-9
server/api/v1/system/sys_operation_record.go
server/api/v1/system/sys_operation_record.go
+5
-5
server/api/v1/system/sys_system.go
server/api/v1/system/sys_system.go
+4
-4
server/api/v1/system/sys_user.go
server/api/v1/system/sys_user.go
+11
-11
未找到文件。
README.md
浏览文件 @
9a4461c0
...
...
@@ -44,6 +44,8 @@
<img
src=
"https://qmplusimg.henrongyi.top/%E6%8E%88%E6%9D%83.png"
width=
"1000"
>
5.
如果您需要服务器的话 2C4G8M 80GB 腾讯云 一年74 三年222 在这里购买:https://curl.qcloud.com/sArxMfaw
阿里云服务器 1c2g1m 38一年 在这里购买:https://www.aliyun.com/minisite/goods?userCode=xqe01uob
## 1. 基本介绍
...
...
server/api/v1/autocode/auto_code_example.go
浏览文件 @
9a4461c0
...
...
@@ -21,7 +21,7 @@ var autoCodeExampleService = service.ServiceGroupApp.AutoCodeServiceGroup.AutoCo
// @accept application/json
// @Produce application/json
// @Param data body autocode.AutoCodeExample true "AutoCodeExample模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"创建成功"}
"
// @Success 200 {
object} response.Response{msg=string} "创建AutoCodeExample
"
// @Router /autoCodeExample/createAutoCodeExample [post]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
CreateAutoCodeExample
(
c
*
gin
.
Context
)
{
var
autoCodeExample
autocode
.
AutoCodeExample
...
...
@@ -40,7 +40,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) CreateAutoCodeExample(c *gin.Conte
// @accept application/json
// @Produce application/json
// @Param data body autocode.AutoCodeExample true "AutoCodeExample模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除AutoCodeExample
"
// @Router /autoCodeExample/deleteAutoCodeExample [delete]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
DeleteAutoCodeExample
(
c
*
gin
.
Context
)
{
var
autoCodeExample
autocode
.
AutoCodeExample
...
...
@@ -59,7 +59,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) DeleteAutoCodeExample(c *gin.Conte
// @accept application/json
// @Produce application/json
// @Param data body autocode.AutoCodeExample true "更新AutoCodeExample"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"更新成功"}
"
// @Success 200 {
object} response.Response{msg=string} "更新AutoCodeExample
"
// @Router /autoCodeExample/updateAutoCodeExample [put]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
UpdateAutoCodeExample
(
c
*
gin
.
Context
)
{
var
autoCodeExample
autocode
.
AutoCodeExample
...
...
@@ -78,7 +78,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) UpdateAutoCodeExample(c *gin.Conte
// @accept application/json
// @Produce application/json
// @Param data query autocode.AutoCodeExample true "用id查询AutoCodeExample"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"查询成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "用id查询AutoCodeExample
"
// @Router /autoCodeExample/findAutoCodeExample [get]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
FindAutoCodeExample
(
c
*
gin
.
Context
)
{
var
autoCodeExample
autocode
.
AutoCodeExample
...
...
@@ -101,7 +101,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) FindAutoCodeExample(c *gin.Context
// @accept application/json
// @Produce application/json
// @Param data query autocodeReq.AutoCodeExampleSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取AutoCodeExample列表,返回包括列表,总数,页码,每页数量
"
// @Router /autoCodeExample/getAutoCodeExampleList [get]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
GetAutoCodeExampleList
(
c
*
gin
.
Context
)
{
var
pageInfo
autocodeReq
.
AutoCodeExampleSearch
...
...
server/api/v1/example/exa_breakpoint_continue.go
浏览文件 @
9a4461c0
...
...
@@ -2,11 +2,12 @@ package example
import
(
"fmt"
"github.com/flipped-aurora/gin-vue-admin/server/model/example"
"io/ioutil"
"mime/multipart"
"strconv"
"github.com/flipped-aurora/gin-vue-admin/server/model/example"
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
exampleRes
"github.com/flipped-aurora/gin-vue-admin/server/model/example/response"
...
...
@@ -21,7 +22,7 @@ import (
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "an example for breakpoint resume, 断点续传示例"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"切片创建成功"}
"
// @Success 200 {
object} response.Response{msg=string} "断点续传到服务器
"
// @Router /fileUploadAndDownload/breakpointContinue [post]
func
(
u
*
FileUploadAndDownloadApi
)
BreakpointContinue
(
c
*
gin
.
Context
)
{
fileMd5
:=
c
.
Request
.
FormValue
(
"fileMd5"
)
...
...
@@ -80,7 +81,7 @@ func (u *FileUploadAndDownloadApi) BreakpointContinue(c *gin.Context) {
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "Find the file, 查找文件"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"查找成功"}
"
// @Success 200 {
object} response.Response{data=exampleRes.FileResponse,msg=string} "查找文件,返回包括文件详情
"
// @Router /fileUploadAndDownload/findFile [post]
func
(
u
*
FileUploadAndDownloadApi
)
FindFile
(
c
*
gin
.
Context
)
{
fileMd5
:=
c
.
Query
(
"fileMd5"
)
...
...
@@ -101,7 +102,7 @@ func (u *FileUploadAndDownloadApi) FindFile(c *gin.Context) {
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "上传文件完成"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"file uploaded, 文件创建成功"}
"
// @Success 200 {
object} response.Response{data=exampleRes.FilePathResponse,msg=string} "创建文件,返回包括文件路径
"
// @Router /fileUploadAndDownload/findFile [post]
func
(
b
*
FileUploadAndDownloadApi
)
BreakpointContinueFinish
(
c
*
gin
.
Context
)
{
fileMd5
:=
c
.
Query
(
"fileMd5"
)
...
...
@@ -121,14 +122,14 @@ func (b *FileUploadAndDownloadApi) BreakpointContinueFinish(c *gin.Context) {
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "删除缓存切片"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"缓存切片删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除切片
"
// @Router /fileUploadAndDownload/removeChunk [post]
func
(
u
*
FileUploadAndDownloadApi
)
RemoveChunk
(
c
*
gin
.
Context
)
{
var
file
example
.
ExaFile
c
.
ShouldBindJSON
(
&
file
)
err
:=
utils
.
RemoveChunk
(
file
.
FileMd5
)
if
err
!=
nil
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
global
.
GVA_LOG
.
Error
(
"缓存切片删除失败!"
,
zap
.
Error
(
err
)
)
return
}
err
=
fileUploadAndDownloadService
.
DeleteFileChunk
(
file
.
FileMd5
,
file
.
FileName
,
file
.
FilePath
)
...
...
server/api/v1/example/exa_customer.go
浏览文件 @
9a4461c0
...
...
@@ -19,7 +19,7 @@ type CustomerApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body example.ExaCustomer true "客户用户名, 客户手机号码"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"创建成功"}
"
// @Success 200 {
object} response.Response{msg=string} "创建客户
"
// @Router /customer/customer [post]
func
(
e
*
CustomerApi
)
CreateExaCustomer
(
c
*
gin
.
Context
)
{
var
customer
example
.
ExaCustomer
...
...
@@ -44,7 +44,7 @@ func (e *CustomerApi) CreateExaCustomer(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body example.ExaCustomer true "客户ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除客户
"
// @Router /customer/customer [delete]
func
(
e
*
CustomerApi
)
DeleteExaCustomer
(
c
*
gin
.
Context
)
{
var
customer
example
.
ExaCustomer
...
...
@@ -67,7 +67,7 @@ func (e *CustomerApi) DeleteExaCustomer(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body example.ExaCustomer true "客户ID, 客户信息"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"更新成功"}
"
// @Success 200 {
object} response.Response{msg=string} "更新客户信息
"
// @Router /customer/customer [put]
func
(
e
*
CustomerApi
)
UpdateExaCustomer
(
c
*
gin
.
Context
)
{
var
customer
example
.
ExaCustomer
...
...
@@ -94,7 +94,7 @@ func (e *CustomerApi) UpdateExaCustomer(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query example.ExaCustomer true "客户ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=exampleRes.ExaCustomerResponse,msg=string} "获取单一客户信息,返回包括客户详情
"
// @Router /customer/customer [get]
func
(
e
*
CustomerApi
)
GetExaCustomer
(
c
*
gin
.
Context
)
{
var
customer
example
.
ExaCustomer
...
...
@@ -118,7 +118,7 @@ func (e *CustomerApi) GetExaCustomer(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "页码, 每页大小"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取权限客户列表,返回包括列表,总数,页码,每页数量
"
// @Router /customer/customerList [get]
func
(
e
*
CustomerApi
)
GetExaCustomerList
(
c
*
gin
.
Context
)
{
var
pageInfo
request
.
PageInfo
...
...
server/api/v1/example/exa_excel.go
浏览文件 @
9a4461c0
...
...
@@ -44,7 +44,7 @@ func (e *ExcelApi) ExportExcel(c *gin.Context) {
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "导入Excel文件"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"导入成功"}
"
// @Success 200 {
object} response.Response{msg=string} "导入Excel文件
"
// @Router /excel/importExcel [post]
func
(
e
*
ExcelApi
)
ImportExcel
(
c
*
gin
.
Context
)
{
_
,
header
,
err
:=
c
.
Request
.
FormFile
(
"file"
)
...
...
@@ -61,7 +61,7 @@ func (e *ExcelApi) ImportExcel(c *gin.Context) {
// @Summary 加载Excel数据
// @Security ApiKeyAuth
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"加载数据成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "加载Excel数据,返回包括列表,总数,页码,每页数量
"
// @Router /excel/loadExcel [get]
func
(
e
*
ExcelApi
)
LoadExcel
(
c
*
gin
.
Context
)
{
menus
,
err
:=
excelService
.
ParseExcel2InfoList
()
...
...
server/api/v1/example/exa_file_upload_download.go
浏览文件 @
9a4461c0
...
...
@@ -18,7 +18,7 @@ type FileUploadAndDownloadApi struct{}
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "上传文件示例"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"上传成功"}
"
// @Success 200 {
object} response.Response{data=exampleRes.ExaFileResponse,msg=string} "上传文件示例,返回包括文件详情
"
// @Router /fileUploadAndDownload/upload [post]
func
(
u
*
FileUploadAndDownloadApi
)
UploadFile
(
c
*
gin
.
Context
)
{
var
file
example
.
ExaFileUploadAndDownload
...
...
@@ -43,7 +43,7 @@ func (u *FileUploadAndDownloadApi) UploadFile(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body example.ExaFileUploadAndDownload true "传入文件里面id即可"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除文件
"
// @Router /fileUploadAndDownload/deleteFile [post]
func
(
u
*
FileUploadAndDownloadApi
)
DeleteFile
(
c
*
gin
.
Context
)
{
var
file
example
.
ExaFileUploadAndDownload
...
...
@@ -62,7 +62,7 @@ func (u *FileUploadAndDownloadApi) DeleteFile(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页文件列表,返回包括列表,总数,页码,每页数量
"
// @Router /fileUploadAndDownload/getFileList [post]
func
(
u
*
FileUploadAndDownloadApi
)
GetFileList
(
c
*
gin
.
Context
)
{
var
pageInfo
request
.
PageInfo
...
...
server/api/v1/system/sys_api.go
浏览文件 @
9a4461c0
...
...
@@ -21,7 +21,7 @@ type SystemApiApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body system.SysApi true "api路径, api中文描述, api组, 方法"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"创建成功"}
"
// @Success 200 {
object} response.Response{msg=string} "创建基础api
"
// @Router /api/createApi [post]
func
(
s
*
SystemApiApi
)
CreateApi
(
c
*
gin
.
Context
)
{
var
api
system
.
SysApi
...
...
@@ -44,7 +44,7 @@ func (s *SystemApiApi) CreateApi(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysApi true "ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除api
"
// @Router /api/deleteApi [post]
func
(
s
*
SystemApiApi
)
DeleteApi
(
c
*
gin
.
Context
)
{
var
api
system
.
SysApi
...
...
@@ -67,7 +67,7 @@ func (s *SystemApiApi) DeleteApi(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body systemReq.SearchApiParams true "分页获取API列表"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取API列表,返回包括列表,总数,页码,每页数量
"
// @Router /api/getApiList [post]
func
(
s
*
SystemApiApi
)
GetApiList
(
c
*
gin
.
Context
)
{
var
pageInfo
systemReq
.
SearchApiParams
...
...
@@ -89,13 +89,14 @@ func (s *SystemApiApi) GetApiList(c *gin.Context) {
}
}
// todo
// @Tags SysApi
// @Summary 根据id获取api
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "根据id获取api"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysAPIResponse} "根据id获取api,返回包括api详情
"
// @Router /api/getApiById [post]
func
(
s
*
SystemApiApi
)
GetApiById
(
c
*
gin
.
Context
)
{
var
idInfo
request
.
GetById
...
...
@@ -114,12 +115,12 @@ func (s *SystemApiApi) GetApiById(c *gin.Context) {
}
// @Tags SysApi
// @Summary
创建
基础api
// @Summary
修改
基础api
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body system.SysApi true "api路径, api中文描述, api组, 方法"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"修改成功"}
"
// @Success 200 {
object} response.Response{msg=string} "修改基础api
"
// @Router /api/updateApi [post]
func
(
s
*
SystemApiApi
)
UpdateApi
(
c
*
gin
.
Context
)
{
var
api
system
.
SysApi
...
...
@@ -141,7 +142,7 @@ func (s *SystemApiApi) UpdateApi(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysAPIListResponse,msg=string} "获取所有的Api 不分页,返回包括api列表
"
// @Router /api/getAllApis [post]
func
(
s
*
SystemApiApi
)
GetAllApis
(
c
*
gin
.
Context
)
{
if
err
,
apis
:=
apiService
.
GetAllApis
();
err
!=
nil
{
...
...
@@ -158,7 +159,7 @@ func (s *SystemApiApi) GetAllApis(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除选中Api
"
// @Router /api/deleteApisByIds [delete]
func
(
s
*
SystemApiApi
)
DeleteApisByIds
(
c
*
gin
.
Context
)
{
var
ids
request
.
IdsReq
...
...
server/api/v1/system/sys_authority.go
浏览文件 @
9a4461c0
...
...
@@ -21,7 +21,7 @@ type AuthorityApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body system.SysAuthority true "权限id, 权限名, 父角色id"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"创建成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysAuthorityResponse,msg=string} "创建角色,返回包括系统角色详情
"
// @Router /authority/createAuthority [post]
func
(
a
*
AuthorityApi
)
CreateAuthority
(
c
*
gin
.
Context
)
{
var
authority
system
.
SysAuthority
...
...
@@ -46,7 +46,7 @@ func (a *AuthorityApi) CreateAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body response.SysAuthorityCopyResponse true "旧角色id, 新权限id, 新权限名, 新父角色id"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"拷贝成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysAuthorityResponse,msg=string} "拷贝角色,返回包括系统角色详情
"
// @Router /authority/copyAuthority [post]
func
(
a
*
AuthorityApi
)
CopyAuthority
(
c
*
gin
.
Context
)
{
var
copyInfo
systemRes
.
SysAuthorityCopyResponse
...
...
@@ -73,7 +73,7 @@ func (a *AuthorityApi) CopyAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysAuthority true "删除角色"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除角色
"
// @Router /authority/deleteAuthority [post]
func
(
a
*
AuthorityApi
)
DeleteAuthority
(
c
*
gin
.
Context
)
{
var
authority
system
.
SysAuthority
...
...
@@ -96,7 +96,7 @@ func (a *AuthorityApi) DeleteAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysAuthority true "权限id, 权限名, 父角色id"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"更新成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysAuthorityResponse,msg=string} "更新角色信息,返回包括系统角色详情
"
// @Router /authority/updateAuthority [post]
func
(
a
*
AuthorityApi
)
UpdateAuthority
(
c
*
gin
.
Context
)
{
var
auth
system
.
SysAuthority
...
...
@@ -119,7 +119,7 @@ func (a *AuthorityApi) UpdateAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取角色列表,返回包括列表,总数,页码,每页数量
"
// @Router /authority/getAuthorityList [post]
func
(
a
*
AuthorityApi
)
GetAuthorityList
(
c
*
gin
.
Context
)
{
var
pageInfo
request
.
PageInfo
...
...
@@ -147,7 +147,7 @@ func (a *AuthorityApi) GetAuthorityList(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysAuthority true "设置角色资源权限"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"设置成功"}
"
// @Success 200 {
object} response.Response{msg=string} "设置角色资源权限
"
// @Router /authority/setDataAuthority [post]
func
(
a
*
AuthorityApi
)
SetDataAuthority
(
c
*
gin
.
Context
)
{
var
auth
system
.
SysAuthority
...
...
server/api/v1/system/sys_auto_code.go
浏览文件 @
9a4461c0
...
...
@@ -24,7 +24,7 @@ type AutoCodeApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body system.AutoCodeStruct true "预览创建代码"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"创建成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "预览创建后的代码
"
// @Router /autoCode/preview [post]
func
(
autoApi
*
AutoCodeApi
)
PreviewTemp
(
c
*
gin
.
Context
)
{
var
a
system
.
AutoCodeStruct
...
...
@@ -94,7 +94,7 @@ func (autoApi *AutoCodeApi) CreateTemp(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "获取当前所有数据库
"
// @Router /autoCode/getDatabase [get]
func
(
autoApi
*
AutoCodeApi
)
GetDB
(
c
*
gin
.
Context
)
{
dbs
,
err
:=
autoCodeService
.
Database
()
.
GetDB
()
...
...
@@ -111,7 +111,7 @@ func (autoApi *AutoCodeApi) GetDB(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "获取当前数据库所有表
"
// @Router /autoCode/getTables [get]
func
(
autoApi
*
AutoCodeApi
)
GetTables
(
c
*
gin
.
Context
)
{
dbName
:=
c
.
DefaultQuery
(
"dbName"
,
global
.
GVA_CONFIG
.
Mysql
.
Dbname
)
...
...
@@ -130,7 +130,7 @@ func (autoApi *AutoCodeApi) GetTables(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "获取当前表所有字段
"
// @Router /autoCode/getColumn [get]
func
(
autoApi
*
AutoCodeApi
)
GetColumn
(
c
*
gin
.
Context
)
{
dbName
:=
c
.
DefaultQuery
(
"dbName"
,
global
.
GVA_CONFIG
.
Mysql
.
Dbname
)
...
...
server/api/v1/system/sys_auto_code_history.go
浏览文件 @
9a4461c0
...
...
@@ -18,7 +18,7 @@ type AutoCodeHistoryApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "请求参数"
// @Success 200 {object} response.Response{
} "获取成功!
"
// @Success 200 {object} response.Response{
data=map[string]interface{},msg=string} "获取meta信息
"
// @Router /autoCode/getMeta [post]
func
(
a
*
AutoCodeHistoryApi
)
First
(
c
*
gin
.
Context
)
{
var
info
request
.
GetById
...
...
@@ -38,7 +38,7 @@ func (a *AutoCodeHistoryApi) First(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "请求参数"
// @Success 200 {object} response.Response{
} "删除成功!
"
// @Success 200 {object} response.Response{
msg=string} "删除回滚记录
"
// @Router /autoCode/delSysHistory [post]
func
(
a
*
AutoCodeHistoryApi
)
Delete
(
c
*
gin
.
Context
)
{
var
info
request
.
GetById
...
...
@@ -59,7 +59,7 @@ func (a *AutoCodeHistoryApi) Delete(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "请求参数"
// @Success 200 {object} response.Response{
} "回滚成功!
"
// @Success 200 {object} response.Response{
msg=string} "回滚自动生成代码
"
// @Router /autoCode/rollback [post]
func
(
a
*
AutoCodeHistoryApi
)
RollBack
(
c
*
gin
.
Context
)
{
var
info
request
.
GetById
...
...
@@ -78,7 +78,7 @@ func (a *AutoCodeHistoryApi) RollBack(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body systemReq.SysAutoHistory true "请求参数"
// @Success 200 {object} response.Response{
} "获取成功!
"
// @Success 200 {object} response.Response{
data=response.PageResult,msg=string} "查询回滚记录,返回包括列表,总数,页码,每页数量
"
// @Router /autoCode/getSysHistory [post]
func
(
a
*
AutoCodeHistoryApi
)
GetList
(
c
*
gin
.
Context
)
{
var
search
systemReq
.
SysAutoHistory
...
...
server/api/v1/system/sys_captcha.go
浏览文件 @
9a4461c0
...
...
@@ -15,12 +15,13 @@ var store = base64Captcha.DefaultMemStore
type
BaseApi
struct
{}
// Captcha
// @Tags Base
// @Summary 生成验证码
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"验证码获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysCaptchaResponse,msg=string} "生成验证码,返回包括随机数id,base64,验证码长度
"
// @Router /base/captcha [post]
func
(
b
*
BaseApi
)
Captcha
(
c
*
gin
.
Context
)
{
// 字符,公式,验证码配置
...
...
server/api/v1/system/sys_casbin.go
浏览文件 @
9a4461c0
...
...
@@ -18,7 +18,7 @@ type CasbinApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body request.CasbinInReceive true "权限id, 权限模型列表"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"更新成功"}
"
// @Success 200 {
object} response.Response{msg=string} "更新角色api权限
"
// @Router /casbin/UpdateCasbin [post]
func
(
cas
*
CasbinApi
)
UpdateCasbin
(
c
*
gin
.
Context
)
{
var
cmr
request
.
CasbinInReceive
...
...
@@ -41,7 +41,7 @@ func (cas *CasbinApi) UpdateCasbin(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.CasbinInReceive true "权限id, 权限模型列表"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.PolicyPathResponse,msg=string} "获取权限列表,返回包括casbin详情列表
"
// @Router /casbin/getPolicyPathByAuthorityId [post]
func
(
cas
*
CasbinApi
)
GetPolicyPathByAuthorityId
(
c
*
gin
.
Context
)
{
var
casbin
request
.
CasbinInReceive
...
...
server/api/v1/system/sys_dictionary.go
浏览文件 @
9a4461c0
...
...
@@ -18,7 +18,7 @@ type DictionaryApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body system.SysDictionary true "SysDictionary模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"创建成功"}
"
// @Success 200 {
object} response.Response{msg=string} "创建SysDictionary
"
// @Router /sysDictionary/createSysDictionary [post]
func
(
s
*
DictionaryApi
)
CreateSysDictionary
(
c
*
gin
.
Context
)
{
var
dictionary
system
.
SysDictionary
...
...
@@ -37,7 +37,7 @@ func (s *DictionaryApi) CreateSysDictionary(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysDictionary true "SysDictionary模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除SysDictionary
"
// @Router /sysDictionary/deleteSysDictionary [delete]
func
(
s
*
DictionaryApi
)
DeleteSysDictionary
(
c
*
gin
.
Context
)
{
var
dictionary
system
.
SysDictionary
...
...
@@ -56,7 +56,7 @@ func (s *DictionaryApi) DeleteSysDictionary(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysDictionary true "SysDictionary模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"更新成功"}
"
// @Success 200 {
object} response.Response{msg=string} "更新SysDictionary
"
// @Router /sysDictionary/updateSysDictionary [put]
func
(
s
*
DictionaryApi
)
UpdateSysDictionary
(
c
*
gin
.
Context
)
{
var
dictionary
system
.
SysDictionary
...
...
@@ -75,7 +75,7 @@ func (s *DictionaryApi) UpdateSysDictionary(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query system.SysDictionary true "ID或字典英名"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"查询成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "用id查询SysDictionary
"
// @Router /sysDictionary/findSysDictionary [get]
func
(
s
*
DictionaryApi
)
FindSysDictionary
(
c
*
gin
.
Context
)
{
var
dictionary
system
.
SysDictionary
...
...
@@ -94,7 +94,7 @@ func (s *DictionaryApi) FindSysDictionary(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query request.SysDictionarySearch true "页码, 每页大小, 搜索条件"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取SysDictionary列表,返回包括列表,总数,页码,每页数量
"
// @Router /sysDictionary/getSysDictionaryList [get]
func
(
s
*
DictionaryApi
)
GetSysDictionaryList
(
c
*
gin
.
Context
)
{
var
pageInfo
request
.
SysDictionarySearch
...
...
server/api/v1/system/sys_dictionary_detail.go
浏览文件 @
9a4461c0
...
...
@@ -18,7 +18,7 @@ type DictionaryDetailApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body system.SysDictionaryDetail true "SysDictionaryDetail模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"创建成功"}
"
// @Success 200 {
object} response.Response{msg=string} "创建SysDictionaryDetail
"
// @Router /sysDictionaryDetail/createSysDictionaryDetail [post]
func
(
s
*
DictionaryDetailApi
)
CreateSysDictionaryDetail
(
c
*
gin
.
Context
)
{
var
detail
system
.
SysDictionaryDetail
...
...
@@ -37,7 +37,7 @@ func (s *DictionaryDetailApi) CreateSysDictionaryDetail(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysDictionaryDetail true "SysDictionaryDetail模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除SysDictionaryDetail
"
// @Router /sysDictionaryDetail/deleteSysDictionaryDetail [delete]
func
(
s
*
DictionaryDetailApi
)
DeleteSysDictionaryDetail
(
c
*
gin
.
Context
)
{
var
detail
system
.
SysDictionaryDetail
...
...
@@ -56,7 +56,7 @@ func (s *DictionaryDetailApi) DeleteSysDictionaryDetail(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysDictionaryDetail true "更新SysDictionaryDetail"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"更新成功"}
"
// @Success 200 {
object} response.Response{msg=string} "更新SysDictionaryDetail
"
// @Router /sysDictionaryDetail/updateSysDictionaryDetail [put]
func
(
s
*
DictionaryDetailApi
)
UpdateSysDictionaryDetail
(
c
*
gin
.
Context
)
{
var
detail
system
.
SysDictionaryDetail
...
...
@@ -75,7 +75,7 @@ func (s *DictionaryDetailApi) UpdateSysDictionaryDetail(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query system.SysDictionaryDetail true "用id查询SysDictionaryDetail"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"查询成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "用id查询SysDictionaryDetail
"
// @Router /sysDictionaryDetail/findSysDictionaryDetail [get]
func
(
s
*
DictionaryDetailApi
)
FindSysDictionaryDetail
(
c
*
gin
.
Context
)
{
var
detail
system
.
SysDictionaryDetail
...
...
@@ -98,7 +98,7 @@ func (s *DictionaryDetailApi) FindSysDictionaryDetail(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query request.SysDictionaryDetailSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取SysDictionaryDetail列表,返回包括列表,总数,页码,每页数量
"
// @Router /sysDictionaryDetail/getSysDictionaryDetailList [get]
func
(
s
*
DictionaryDetailApi
)
GetSysDictionaryDetailList
(
c
*
gin
.
Context
)
{
var
pageInfo
request
.
SysDictionaryDetailSearch
...
...
server/api/v1/system/sys_initdb.go
浏览文件 @
9a4461c0
...
...
@@ -16,7 +16,7 @@ type DBApi struct{}
// @Summary 初始化用户数据库
// @Produce application/json
// @Param data body request.InitDB true "初始化数据库参数"
// @Success 200 {
string} string "{"code":0,"data":{},"msg":"自动创建数据库成功"}
"
// @Success 200 {
object} response.Response{data=string} "初始化用户数据库
"
// @Router /init/initdb [post]
func
(
i
*
DBApi
)
InitDB
(
c
*
gin
.
Context
)
{
if
global
.
GVA_DB
!=
nil
{
...
...
@@ -42,16 +42,19 @@ func (i *DBApi) InitDB(c *gin.Context) {
// @Tags CheckDB
// @Summary 初始化用户数据库
// @Produce application/json
// @Success 200 {
string} string "{"code":0,"data":{},"msg":"探测完成"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "初始化用户数据库
"
// @Router /init/checkdb [post]
func
(
i
*
DBApi
)
CheckDB
(
c
*
gin
.
Context
)
{
var
(
message
=
"前往初始化数据库"
needInit
=
true
)
if
global
.
GVA_DB
!=
nil
{
global
.
GVA_LOG
.
Info
(
"数据库无需初始化"
)
response
.
OkWithDetailed
(
gin
.
H
{
"needInit"
:
false
},
"数据库无需初始化"
,
c
)
return
}
else
{
global
.
GVA_LOG
.
Info
(
"前往初始化数据库"
)
response
.
OkWithDetailed
(
gin
.
H
{
"needInit"
:
true
},
"前往初始化数据库"
,
c
)
return
message
=
"数据库无需初始化"
needInit
=
false
}
global
.
GVA_LOG
.
Info
(
message
)
response
.
OkWithDetailed
(
gin
.
H
{
"needInit"
:
needInit
},
message
,
c
)
return
}
server/api/v1/system/sys_jwt_blacklist.go
浏览文件 @
9a4461c0
...
...
@@ -15,7 +15,7 @@ type JwtApi struct{}
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"拉黑成功"}
"
// @Success 200 {
object} response.Response{msg=string} "jwt加入黑名单
"
// @Router /jwt/jsonInBlacklist [post]
func
(
j
*
JwtApi
)
JsonInBlacklist
(
c
*
gin
.
Context
)
{
token
:=
c
.
Request
.
Header
.
Get
(
"x-token"
)
...
...
server/api/v1/system/sys_menu.go
浏览文件 @
9a4461c0
...
...
@@ -20,7 +20,7 @@ type AuthorityMenuApi struct{}
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body request.Empty true "空"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysMenusResponse,msg=string} "获取用户动态路由,返回包括系统菜单详情列表
"
// @Router /menu/getMenu [post]
func
(
a
*
AuthorityMenuApi
)
GetMenu
(
c
*
gin
.
Context
)
{
if
err
,
menus
:=
menuService
.
GetMenuTree
(
utils
.
GetUserAuthorityId
(
c
));
err
!=
nil
{
...
...
@@ -39,7 +39,7 @@ func (a *AuthorityMenuApi) GetMenu(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body request.Empty true "空"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysBaseMenusResponse,msg=string} "获取用户动态路由,返回包括系统菜单列表
"
// @Router /menu/getBaseMenuTree [post]
func
(
a
*
AuthorityMenuApi
)
GetBaseMenuTree
(
c
*
gin
.
Context
)
{
if
err
,
menus
:=
menuService
.
GetBaseMenuTree
();
err
!=
nil
{
...
...
@@ -56,7 +56,7 @@ func (a *AuthorityMenuApi) GetBaseMenuTree(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body systemReq.AddMenuAuthorityInfo true "角色ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"添加成功"}
"
// @Success 200 {
object} response.Response{msg=string} "增加menu和角色关联关系
"
// @Router /menu/addMenuAuthority [post]
func
(
a
*
AuthorityMenuApi
)
AddMenuAuthority
(
c
*
gin
.
Context
)
{
var
authorityMenu
systemReq
.
AddMenuAuthorityInfo
...
...
@@ -79,7 +79,7 @@ func (a *AuthorityMenuApi) AddMenuAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.GetAuthorityId true "角色ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "获取指定角色menu
"
// @Router /menu/getMenuAuthority [post]
func
(
a
*
AuthorityMenuApi
)
GetMenuAuthority
(
c
*
gin
.
Context
)
{
var
param
request
.
GetAuthorityId
...
...
@@ -102,7 +102,7 @@ func (a *AuthorityMenuApi) GetMenuAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysBaseMenu true "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"添加成功"}
"
// @Success 200 {
object} response.Response{msg=string} "新增菜单
"
// @Router /menu/addBaseMenu [post]
func
(
a
*
AuthorityMenuApi
)
AddBaseMenu
(
c
*
gin
.
Context
)
{
var
menu
system
.
SysBaseMenu
...
...
@@ -130,7 +130,7 @@ func (a *AuthorityMenuApi) AddBaseMenu(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "菜单id"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除菜单
"
// @Router /menu/deleteBaseMenu [post]
func
(
a
*
AuthorityMenuApi
)
DeleteBaseMenu
(
c
*
gin
.
Context
)
{
var
menu
request
.
GetById
...
...
@@ -153,7 +153,7 @@ func (a *AuthorityMenuApi) DeleteBaseMenu(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysBaseMenu true "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"更新成功"}
"
// @Success 200 {
object} response.Response{msg=string} "更新菜单
"
// @Router /menu/updateBaseMenu [post]
func
(
a
*
AuthorityMenuApi
)
UpdateBaseMenu
(
c
*
gin
.
Context
)
{
var
menu
system
.
SysBaseMenu
...
...
@@ -180,7 +180,7 @@ func (a *AuthorityMenuApi) UpdateBaseMenu(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "菜单id"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysBaseMenuResponse,msg=string} "根据id获取菜单,返回包括系统菜单列表
"
// @Router /menu/getBaseMenuById [post]
func
(
a
*
AuthorityMenuApi
)
GetBaseMenuById
(
c
*
gin
.
Context
)
{
var
idInfo
request
.
GetById
...
...
@@ -203,7 +203,7 @@ func (a *AuthorityMenuApi) GetBaseMenuById(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取基础menu列表,返回包括列表,总数,页码,每页数量
"
// @Router /menu/getMenuList [post]
func
(
a
*
AuthorityMenuApi
)
GetMenuList
(
c
*
gin
.
Context
)
{
var
pageInfo
request
.
PageInfo
...
...
server/api/v1/system/sys_operation_record.go
浏览文件 @
9a4461c0
...
...
@@ -19,7 +19,7 @@ type OperationRecordApi struct{}
// @accept application/json
// @Produce application/json
// @Param data body system.SysOperationRecord true "创建SysOperationRecord"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{msg=string} "创建SysOperationRecord
"
// @Router /sysOperationRecord/createSysOperationRecord [post]
func
(
s
*
OperationRecordApi
)
CreateSysOperationRecord
(
c
*
gin
.
Context
)
{
var
sysOperationRecord
system
.
SysOperationRecord
...
...
@@ -38,7 +38,7 @@ func (s *OperationRecordApi) CreateSysOperationRecord(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysOperationRecord true "SysOperationRecord模型"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除SysOperationRecord
"
// @Router /sysOperationRecord/deleteSysOperationRecord [delete]
func
(
s
*
OperationRecordApi
)
DeleteSysOperationRecord
(
c
*
gin
.
Context
)
{
var
sysOperationRecord
system
.
SysOperationRecord
...
...
@@ -57,7 +57,7 @@ func (s *OperationRecordApi) DeleteSysOperationRecord(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除SysOperationRecord"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"批量删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "批量删除SysOperationRecord
"
// @Router /sysOperationRecord/deleteSysOperationRecordByIds [delete]
func
(
s
*
OperationRecordApi
)
DeleteSysOperationRecordByIds
(
c
*
gin
.
Context
)
{
var
IDS
request
.
IdsReq
...
...
@@ -76,7 +76,7 @@ func (s *OperationRecordApi) DeleteSysOperationRecordByIds(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query system.SysOperationRecord true "Id"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"查询成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "用id查询SysOperationRecord
"
// @Router /sysOperationRecord/findSysOperationRecord [get]
func
(
s
*
OperationRecordApi
)
FindSysOperationRecord
(
c
*
gin
.
Context
)
{
var
sysOperationRecord
system
.
SysOperationRecord
...
...
@@ -99,7 +99,7 @@ func (s *OperationRecordApi) FindSysOperationRecord(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data query request.SysOperationRecordSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取SysOperationRecord列表,返回包括列表,总数,页码,每页数量
"
// @Router /sysOperationRecord/getSysOperationRecordList [get]
func
(
s
*
OperationRecordApi
)
GetSysOperationRecordList
(
c
*
gin
.
Context
)
{
var
pageInfo
systemReq
.
SysOperationRecordSearch
...
...
server/api/v1/system/sys_system.go
浏览文件 @
9a4461c0
...
...
@@ -17,7 +17,7 @@ type SystemApi struct{}
// @Summary 获取配置文件内容
// @Security ApiKeyAuth
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysConfigResponse,msg=string} "获取配置文件内容,返回包括系统配置
"
// @Router /system/getSystemConfig [post]
func
(
s
*
SystemApi
)
GetSystemConfig
(
c
*
gin
.
Context
)
{
if
err
,
config
:=
systemConfigService
.
GetSystemConfig
();
err
!=
nil
{
...
...
@@ -33,7 +33,7 @@ func (s *SystemApi) GetSystemConfig(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body system.System true "设置配置文件内容"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"设置成功"}
"
// @Success 200 {
object} response.Response{data=string} "设置配置文件内容
"
// @Router /system/setSystemConfig [post]
func
(
s
*
SystemApi
)
SetSystemConfig
(
c
*
gin
.
Context
)
{
var
sys
system
.
System
...
...
@@ -50,7 +50,7 @@ func (s *SystemApi) SetSystemConfig(c *gin.Context) {
// @Summary 重启系统
// @Security ApiKeyAuth
// @Produce application/json
// @Success 200 {
string} string "{"code":0,"data":{},"msg":"重启系统成功"}
"
// @Success 200 {
object} response.Response{msg=string} "重启系统
"
// @Router /system/reloadSystem [post]
func
(
s
*
SystemApi
)
ReloadSystem
(
c
*
gin
.
Context
)
{
err
:=
utils
.
Reload
()
...
...
@@ -66,7 +66,7 @@ func (s *SystemApi) ReloadSystem(c *gin.Context) {
// @Summary 获取服务器信息
// @Security ApiKeyAuth
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "获取服务器信息
"
// @Router /system/getServerInfo [post]
func
(
s
*
SystemApi
)
GetServerInfo
(
c
*
gin
.
Context
)
{
if
server
,
err
:=
systemConfigService
.
GetServerInfo
();
err
!=
nil
{
...
...
server/api/v1/system/sys_user.go
浏览文件 @
9a4461c0
...
...
@@ -20,7 +20,7 @@ import (
// @Summary 用户登录
// @Produce application/json
// @Param data body systemReq.Login true "用户名, 密码, 验证码"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"登陆成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.LoginResponse,msg=string} "返回包括用户信息,token,过期时间
"
// @Router /base/login [post]
func
(
b
*
BaseApi
)
Login
(
c
*
gin
.
Context
)
{
var
l
systemReq
.
Login
...
...
@@ -104,7 +104,7 @@ func (b *BaseApi) tokenNext(c *gin.Context, user system.SysUser) {
// @Summary 用户注册账号
// @Produce application/json
// @Param data body systemReq.Register true "用户名, 昵称, 密码, 角色ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"注册成功"}
"
// @Success 200 {
object} response.Response{data=systemRes.SysUserResponse,msg=string} "用户注册账号,返回包括用户信息
"
// @Router /user/register [post]
func
(
b
*
BaseApi
)
Register
(
c
*
gin
.
Context
)
{
var
r
systemReq
.
Register
...
...
@@ -134,7 +134,7 @@ func (b *BaseApi) Register(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body systemReq.ChangePasswordStruct true "用户名, 原密码, 新密码"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"修改成功"}
"
// @Success 200 {
object} response.Response{msg=string} "用户修改密码
"
// @Router /user/changePassword [post]
func
(
b
*
BaseApi
)
ChangePassword
(
c
*
gin
.
Context
)
{
var
user
systemReq
.
ChangePasswordStruct
...
...
@@ -158,7 +158,7 @@ func (b *BaseApi) ChangePassword(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "页码, 每页大小"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=response.PageResult,msg=string} "分页获取用户列表,返回包括列表,总数,页码,每页数量
"
// @Router /user/getUserList [post]
func
(
b
*
BaseApi
)
GetUserList
(
c
*
gin
.
Context
)
{
var
pageInfo
request
.
PageInfo
...
...
@@ -186,7 +186,7 @@ func (b *BaseApi) GetUserList(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body systemReq.SetUserAuth true "用户UUID, 角色ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"修改成功"}
"
// @Success 200 {
object} response.Response{msg=string} "设置用户权限
"
// @Router /user/setUserAuthority [post]
func
(
b
*
BaseApi
)
SetUserAuthority
(
c
*
gin
.
Context
)
{
var
sua
systemReq
.
SetUserAuth
...
...
@@ -222,7 +222,7 @@ func (b *BaseApi) SetUserAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body systemReq.SetUserAuthorities true "用户UUID, 角色ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"修改成功"}
"
// @Success 200 {
object} response.Response{msg=string} "设置用户权限
"
// @Router /user/setUserAuthorities [post]
func
(
b
*
BaseApi
)
SetUserAuthorities
(
c
*
gin
.
Context
)
{
var
sua
systemReq
.
SetUserAuthorities
...
...
@@ -241,7 +241,7 @@ func (b *BaseApi) SetUserAuthorities(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body request.GetById true "用户ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"删除成功"}
"
// @Success 200 {
object} response.Response{msg=string} "删除用户
"
// @Router /user/deleteUser [delete]
func
(
b
*
BaseApi
)
DeleteUser
(
c
*
gin
.
Context
)
{
var
reqId
request
.
GetById
...
...
@@ -269,7 +269,7 @@ func (b *BaseApi) DeleteUser(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysUser true "ID, 用户名, 昵称, 头像链接"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"设置成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "设置用户信息
"
// @Router /user/setUserInfo [put]
func
(
b
*
BaseApi
)
SetUserInfo
(
c
*
gin
.
Context
)
{
var
user
system
.
SysUser
...
...
@@ -292,7 +292,7 @@ func (b *BaseApi) SetUserInfo(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body system.SysUser true "ID, 用户名, 昵称, 头像链接"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"设置成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "设置用户信息
"
// @Router /user/SetSelfInfo [put]
func
(
b
*
BaseApi
)
SetSelfInfo
(
c
*
gin
.
Context
)
{
var
user
system
.
SysUser
...
...
@@ -311,7 +311,7 @@ func (b *BaseApi) SetSelfInfo(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"获取成功"}
"
// @Success 200 {
object} response.Response{data=map[string]interface{},msg=string} "获取用户信息
"
// @Router /user/getUserInfo [get]
func
(
b
*
BaseApi
)
GetUserInfo
(
c
*
gin
.
Context
)
{
uuid
:=
utils
.
GetUserUuid
(
c
)
...
...
@@ -328,7 +328,7 @@ func (b *BaseApi) GetUserInfo(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body system.SysUser true "ID"
// @Success 200 {
string} string "{"success":true,"data":{},"msg":"修改成功"}
"
// @Success 200 {
object} response.Response{msg=string} "用户修改密码
"
// @Router /user/resetPassword [post]
func
(
b
*
BaseApi
)
ResetPassword
(
c
*
gin
.
Context
)
{
var
user
system
.
SysUser
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录