Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
091e6de0
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
333
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,发现更多精彩内容 >>
提交
091e6de0
编写于
12月 13, 2019
作者:
K
klausY
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
swagger 迎合版本更新修改json 为string
上级
6ec38852
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
43 addition
and
46 deletion
+43
-46
QMPlusServer/controller/api/exa_fileUploadAndDownload.go
QMPlusServer/controller/api/exa_fileUploadAndDownload.go
+3
-3
QMPlusServer/controller/api/sys_api.go
QMPlusServer/controller/api/sys_api.go
+6
-6
QMPlusServer/controller/api/sys_authority.go
QMPlusServer/controller/api/sys_authority.go
+6
-8
QMPlusServer/controller/api/sys_casbin.go
QMPlusServer/controller/api/sys_casbin.go
+8
-9
QMPlusServer/controller/api/sys_menu.go
QMPlusServer/controller/api/sys_menu.go
+10
-10
QMPlusServer/controller/api/sys_user.go
QMPlusServer/controller/api/sys_user.go
+7
-7
QMPlusServer/controller/api/sys_workFlow.go
QMPlusServer/controller/api/sys_workFlow.go
+1
-1
QMPlusServer/docs/docs.go
QMPlusServer/docs/docs.go
+1
-1
QMPlusServer/static/dbconfig/config.json
QMPlusServer/static/dbconfig/config.json
+1
-1
未找到文件。
QMPlusServer/controller/api/exa_fileUploadAndDownload.go
浏览文件 @
091e6de0
...
...
@@ -15,7 +15,7 @@ import (
// @accept multipart/form-data
// @Produce application/json
// @Param file formData file true "上传文件示例"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"上传成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"上传成功"}"
// @Router /fileUploadAndDownload/upload [post]
func
UploadFile
(
c
*
gin
.
Context
)
{
_
,
header
,
err
:=
c
.
Request
.
FormFile
(
"file"
)
...
...
@@ -49,7 +49,7 @@ func UploadFile(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body dbModel.ExaFileUploadAndDownload true "传入文件里面id即可"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"返回成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"返回成功"}"
// @Router /fileUploadAndDownload/deleteFile [post]
func
DeleteFile
(
c
*
gin
.
Context
)
{
var
file
dbModel
.
ExaFileUploadAndDownload
...
...
@@ -78,7 +78,7 @@ func DeleteFile(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取文件户列表"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /fileUploadAndDownload/getFileList [post]
func
GetFileList
(
c
*
gin
.
Context
)
{
var
pageInfo
modelInterface
.
PageInfo
...
...
QMPlusServer/controller/api/sys_api.go
浏览文件 @
091e6de0
...
...
@@ -23,7 +23,7 @@ type DeleteApiParams struct {
// @accept application/json
// @Produce application/json
// @Param data body api.CreateApiParams true "创建api"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/createApi [post]
func
CreateApi
(
c
*
gin
.
Context
)
{
var
api
sysModel
.
SysApi
...
...
@@ -42,7 +42,7 @@ func CreateApi(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body sysModel.SysApi true "删除api"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/deleteApi [post]
func
DeleteApi
(
c
*
gin
.
Context
)
{
var
a
sysModel
.
SysApi
...
...
@@ -68,7 +68,7 @@ type AuthAndPathIn struct {
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取API列表"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiList [post]
func
GetApiList
(
c
*
gin
.
Context
)
{
// 此结构体仅本方法使用
...
...
@@ -98,7 +98,7 @@ func GetApiList(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取用户列表"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getApiById [post]
func
GetApiById
(
c
*
gin
.
Context
)
{
var
idInfo
GetById
...
...
@@ -120,7 +120,7 @@ func GetApiById(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body api.CreateApiParams true "创建api"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/updataApi [post]
func
UpdataApi
(
c
*
gin
.
Context
)
{
var
api
sysModel
.
SysApi
...
...
@@ -138,7 +138,7 @@ func UpdataApi(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /api/getAllApis [post]
func
GetAllApis
(
c
*
gin
.
Context
)
{
err
,
apis
:=
new
(
sysModel
.
SysApi
)
.
GetAllApis
()
...
...
QMPlusServer/controller/api/sys_authority.go
浏览文件 @
091e6de0
...
...
@@ -9,7 +9,7 @@ import (
)
type
CreateAuthorityPatams
struct
{
AuthorityId
string
`json:"authorityId"`
AuthorityId
string
`json:"authorityId"`
AuthorityName
string
`json:"authorityName"`
}
...
...
@@ -19,7 +19,7 @@ type CreateAuthorityPatams struct {
// @accept application/json
// @Produce application/json
// @Param data body api.CreateAuthorityPatams true "创建角色"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /authority/createAuthority [post]
func
CreateAuthority
(
c
*
gin
.
Context
)
{
var
auth
sysModel
.
SysAuthority
...
...
@@ -46,7 +46,7 @@ type DeleteAuthorityPatams struct {
// @accept application/json
// @Produce application/json
// @Param data body api.DeleteAuthorityPatams true "删除角色"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /authority/deleteAuthority [post]
func
DeleteAuthority
(
c
*
gin
.
Context
)
{
var
a
sysModel
.
SysAuthority
...
...
@@ -66,9 +66,9 @@ func DeleteAuthority(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取用户列表"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /authority/getAuthorityList [post]
func
GetAuthorityList
(
c
*
gin
.
Context
){
func
GetAuthorityList
(
c
*
gin
.
Context
)
{
var
pageInfo
modelInterface
.
PageInfo
_
=
c
.
BindJSON
(
&
pageInfo
)
err
,
list
,
total
:=
new
(
sysModel
.
SysAuthority
)
.
GetInfoList
(
pageInfo
)
...
...
@@ -76,7 +76,7 @@ func GetAuthorityList(c *gin.Context){
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"获取数据失败,%v"
,
err
),
gin
.
H
{})
}
else
{
servers
.
ReportFormat
(
c
,
true
,
"获取数据成功"
,
gin
.
H
{
"list"
:
list
,
"list"
:
list
,
"total"
:
total
,
"page"
:
pageInfo
.
Page
,
"pageSize"
:
pageInfo
.
PageSize
,
...
...
@@ -84,8 +84,6 @@ func GetAuthorityList(c *gin.Context){
}
}
type
GetAuthorityId
struct
{
AuthorityId
string
`json:"authorityId"`
}
QMPlusServer/controller/api/sys_casbin.go
浏览文件 @
091e6de0
...
...
@@ -7,10 +7,9 @@ import (
"main/model/sysModel"
)
type
CasbinInReceive
struct
{
AuthorityId
string
`json:"authorityId"`
Paths
[]
string
`json:paths`
AuthorityId
string
`json:"authorityId"`
Paths
[]
string
`json:paths`
}
// @Tags casbin
...
...
@@ -19,12 +18,12 @@ type CasbinInReceive struct {
// @accept application/json
// @Produce application/json
// @Param data body api.CreateAuthorityPatams true "更改角色api权限"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/casbinPUpdata [post]
func
CasbinPUpdata
(
c
*
gin
.
Context
){
func
CasbinPUpdata
(
c
*
gin
.
Context
)
{
var
cmr
CasbinInReceive
_
=
c
.
ShouldBind
(
&
cmr
)
err
:=
new
(
sysModel
.
CasbinModel
)
.
CasbinPUpdata
(
cmr
.
AuthorityId
,
cmr
.
Paths
)
err
:=
new
(
sysModel
.
CasbinModel
)
.
CasbinPUpdata
(
cmr
.
AuthorityId
,
cmr
.
Paths
)
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"添加规则失败,%v"
,
err
),
gin
.
H
{})
}
else
{
...
...
@@ -38,11 +37,11 @@ func CasbinPUpdata(c *gin.Context){
// @accept application/json
// @Produce application/json
// @Param data body api.CreateAuthorityPatams true "获取权限列表"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /casbin/getPolicyPathByAuthorityId [post]
func
GetPolicyPathByAuthorityId
(
c
*
gin
.
Context
){
func
GetPolicyPathByAuthorityId
(
c
*
gin
.
Context
)
{
var
cmr
CasbinInReceive
_
=
c
.
ShouldBind
(
&
cmr
)
paths
:=
new
(
sysModel
.
CasbinModel
)
.
GetPolicyPathByAuthorityId
(
cmr
.
AuthorityId
)
servers
.
ReportFormat
(
c
,
true
,
"获取规则成功"
,
gin
.
H
{
"paths"
:
paths
})
servers
.
ReportFormat
(
c
,
true
,
"获取规则成功"
,
gin
.
H
{
"paths"
:
paths
})
}
QMPlusServer/controller/api/sys_menu.go
浏览文件 @
091e6de0
...
...
@@ -5,8 +5,8 @@ import (
"github.com/gin-gonic/gin"
"main/controller/servers"
"main/middleware"
"main/model/sysModel"
"main/model/modelInterface"
"main/model/sysModel"
)
// @Tags authorityAndMenu
...
...
@@ -14,7 +14,7 @@ import (
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body api.RegistAndLoginStuct true "可以什么都不填"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"返回成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"返回成功"}"
// @Router /menu/getMenu [post]
func
GetMenu
(
c
*
gin
.
Context
)
{
claims
,
_
:=
c
.
Get
(
"claims"
)
...
...
@@ -33,7 +33,7 @@ func GetMenu(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取基础menu列表"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getMenuList [post]
func
GetMenuList
(
c
*
gin
.
Context
)
{
var
pageInfo
modelInterface
.
PageInfo
...
...
@@ -57,7 +57,7 @@ func GetMenuList(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body sysModel.SysBaseMenu true "新增菜单"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addBaseMenu [post]
func
AddBaseMenu
(
c
*
gin
.
Context
)
{
var
addMenu
sysModel
.
SysBaseMenu
...
...
@@ -75,7 +75,7 @@ func AddBaseMenu(c *gin.Context) {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body api.RegistAndLoginStuct true "可以什么都不填"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"返回成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"返回成功"}"
// @Router /menu/getBaseMenuTree [post]
func
GetBaseMenuTree
(
c
*
gin
.
Context
)
{
err
,
menus
:=
new
(
sysModel
.
SysBaseMenu
)
.
GetBaseMenuTree
()
...
...
@@ -97,7 +97,7 @@ type AddMenuAuthorityInfo struct {
// @accept application/json
// @Produce application/json
// @Param data body api.AddMenuAuthorityInfo true "增加menu和角色关联关系"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addMenuAuthority [post]
func
AddMenuAuthority
(
c
*
gin
.
Context
)
{
var
addMenuAuthorityInfo
AddMenuAuthorityInfo
...
...
@@ -120,7 +120,7 @@ type AuthorityIdInfo struct {
// @accept application/json
// @Produce application/json
// @Param data body api.AuthorityIdInfo true "增加menu和角色关联关系"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addMenuAuthority [post]
func
GetMenuAuthority
(
c
*
gin
.
Context
)
{
var
authorityIdInfo
AuthorityIdInfo
...
...
@@ -143,7 +143,7 @@ type IdInfo struct {
// @accept application/json
// @Produce application/json
// @Param data body api.IdInfo true "删除菜单"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/deleteBaseMenu [post]
func
DeleteBaseMenu
(
c
*
gin
.
Context
)
{
var
idInfo
IdInfo
...
...
@@ -162,7 +162,7 @@ func DeleteBaseMenu(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body sysModel.SysBaseMenu true "更新菜单"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/updataBaseMen [post]
func
UpdataBaseMenu
(
c
*
gin
.
Context
)
{
var
menu
sysModel
.
SysBaseMenu
...
...
@@ -185,7 +185,7 @@ type GetById struct {
// @accept application/json
// @Produce application/json
// @Param data body api.GetById true "根据id获取菜单"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/getBaseMenuById [post]
func
GetBaseMenuById
(
c
*
gin
.
Context
)
{
var
idInfo
GetById
...
...
QMPlusServer/controller/api/sys_user.go
浏览文件 @
091e6de0
...
...
@@ -7,8 +7,8 @@ import (
uuid
"github.com/satori/go.uuid"
"main/controller/servers"
"main/middleware"
"main/model/sysModel"
"main/model/modelInterface"
"main/model/sysModel"
"mime/multipart"
"time"
)
...
...
@@ -27,7 +27,7 @@ type RegistAndLoginStuct struct {
// @Summary 用户注册账号
// @Produce application/json
// @Param data body api.RegistAndLoginStuct true "用户注册接口"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"注册成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"注册成功"}"
// @Router /base/regist [post]
func
Regist
(
c
*
gin
.
Context
)
{
var
R
RegistAndLoginStuct
...
...
@@ -50,7 +50,7 @@ func Regist(c *gin.Context) {
// @Summary 用户登录
// @Produce application/json
// @Param data body api.RegistAndLoginStuct true "用户登录接口"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"登陆成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"登陆成功"}"
// @Router /base/login [post]
func
Login
(
c
*
gin
.
Context
)
{
var
L
RegistAndLoginStuct
...
...
@@ -98,7 +98,7 @@ type ChangePasswordStutrc struct {
// @Security ApiKeyAuth
// @Produce application/json
// @Param data body api.ChangePasswordStutrc true "用户修改密码"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"修改成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/changePassword [post]
func
ChangePassword
(
c
*
gin
.
Context
)
{
var
params
ChangePasswordStutrc
...
...
@@ -122,7 +122,7 @@ type UserHeaderImg struct {
// @Produce application/json
// @Param headerImg formData file true "用户上传头像"
// @Param username formData string true "用户上传头像"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"上传成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"上传成功"}"
// @Router /user/uploadHeaderImg [post]
func
UploadHeaderImg
(
c
*
gin
.
Context
)
{
claims
,
_
:=
c
.
Get
(
"claims"
)
...
...
@@ -157,7 +157,7 @@ func UploadHeaderImg(c *gin.Context) {
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "分页获取用户列表"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"获取成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"获取成功"}"
// @Router /user/getUserList [post]
func
GetUserList
(
c
*
gin
.
Context
)
{
var
pageInfo
modelInterface
.
PageInfo
...
...
@@ -186,7 +186,7 @@ type SetUserAuth struct {
// @accept application/json
// @Produce application/json
// @Param data body api.SetUserAuth true "设置用户权限"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"修改成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"修改成功"}"
// @Router /user/setUserAuthority [post]
func
SetUserAuthority
(
c
*
gin
.
Context
)
{
var
sua
SetUserAuth
...
...
QMPlusServer/controller/api/sys_workFlow.go
浏览文件 @
091e6de0
...
...
@@ -11,7 +11,7 @@ import (
// @Summary 注册工作流
// @Produce application/json
// @Param data body sysModel.SysWorkflow true "注册工作流接口"
// @Success 200 {string}
json
"{"success":true,"data":{},"msg":"注册成功"}"
// @Success 200 {string}
string
"{"success":true,"data":{},"msg":"注册成功"}"
// @Router /workflow/createWorkFlow [post]
func
CreateWorkFlow
(
c
*
gin
.
Context
)
{
var
wk
sysModel
.
SysWorkflow
...
...
QMPlusServer/docs/docs.go
浏览文件 @
091e6de0
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-12-13 1
1:22:41.4366202 +0800 CST m=+0.0628308
01
// 2019-12-13 1
4:26:18.8216929 +0800 CST m=+0.0807485
01
package
docs
...
...
QMPlusServer/static/dbconfig/config.json
浏览文件 @
091e6de0
...
...
@@ -3,7 +3,7 @@
"username"
:
"root"
,
"password"
:
"Aa@6447985"
,
"path"
:
"127.0.0.1:3306"
,
"dbname"
:
"
qmplus
"
,
"dbname"
:
"
yx
"
,
"config"
:
"charset=utf8&parseTime=True&loc=Local"
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录