Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
nizhengjia888
gin-vue-admin
提交
08c3cec3
G
gin-vue-admin
项目概览
nizhengjia888
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
3
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
08c3cec3
编写于
10月 23, 2020
作者:
Sliver_Horn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
system add middleware, update markfile, add data
上级
70150950
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
4 deletion
+9
-4
server/Makefile
server/Makefile
+1
-1
server/cmd/datas/authority_Ids.go
server/cmd/datas/authority_Ids.go
+1
-1
server/cmd/datas/authority_menus.go
server/cmd/datas/authority_menus.go
+1
-1
server/cmd/datas/casbins.go
server/cmd/datas/casbins.go
+4
-0
server/router/sys_system.go
server/router/sys_system.go
+2
-1
未找到文件。
server/Makefile
浏览文件 @
08c3cec3
...
...
@@ -32,7 +32,7 @@ clean:
@
if
[
-f
${GVA}
]
;
then
rm
${GVA}
;
fi
help
:
@
echo
"make -
格式化 Go 代码, 并编译生成二进制文件
"
@
echo
"make -
生成gva终端工具,初始化数据后删除gva终端工具
"
@
echo
"make linux-build - 编译 Go 代码, 生成Linux系统的二进制文件"
@
echo
"make windows-build - 编译 Go 代码, 生成Windows系统的exe文件"
@
echo
"make mac-build - 编译 Go 代码, 生成Mac系统的二进制文件"
...
...
server/cmd/datas/authority_Ids.go
浏览文件 @
08c3cec3
...
...
@@ -18,7 +18,7 @@ var DataAuthorityId = []SysDataAuthorityId{
}
func
InitSysDataAuthorityId
(
db
*
gorm
.
DB
)
(
err
error
)
{
return
db
.
Transaction
(
func
(
tx
*
gorm
.
DB
)
error
{
return
db
.
T
able
(
"sys_data_authority_id"
)
.
T
ransaction
(
func
(
tx
*
gorm
.
DB
)
error
{
if
tx
.
Create
(
&
DataAuthorityId
)
.
Error
!=
nil
{
// 遇到错误时回滚事务
return
err
}
...
...
server/cmd/datas/authority_menus.go
浏览文件 @
08c3cec3
...
...
@@ -66,7 +66,7 @@ var AuthorityMenus = []SysAuthorityMenus{
}
func
InitSysAuthorityMenus
(
db
*
gorm
.
DB
)
(
err
error
)
{
return
db
.
Transaction
(
func
(
tx
*
gorm
.
DB
)
error
{
return
db
.
T
able
(
"sys_authority_menus"
)
.
T
ransaction
(
func
(
tx
*
gorm
.
DB
)
error
{
if
tx
.
Create
(
&
AuthorityMenus
)
.
Error
!=
nil
{
// 遇到错误时回滚事务
return
err
}
...
...
server/cmd/datas/casbins.go
浏览文件 @
08c3cec3
...
...
@@ -42,6 +42,7 @@ var Carbines = []gormadapter.CasbinRule{
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/jwt/jsonInBlacklist"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/system/getSystemConfig"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/system/setSystemConfig"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/system/getServerInfo"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/customer/customer"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/customer/customer"
,
V2
:
"PUT"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/customer/customer"
,
V2
:
"DELETE"
},
...
...
@@ -69,6 +70,9 @@ var Carbines = []gormadapter.CasbinRule{
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/sysOperationRecord/deleteSysOperationRecordByIds"
,
V2
:
"DELETE"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/user/setUserInfo"
,
V2
:
"PUT"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/email/emailTest"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/simpleUploader/upload"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/simpleUploader/checkFileMd5"
,
V2
:
"GET"
},
{
PType
:
"p"
,
V0
:
"888"
,
V1
:
"/simpleUploader/mergeFileMd5"
,
V2
:
"GET"
},
{
PType
:
"p"
,
V0
:
"8881"
,
V1
:
"/base/login"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"8881"
,
V1
:
"/base/register"
,
V2
:
"POST"
},
{
PType
:
"p"
,
V0
:
"8881"
,
V1
:
"/api/createApi"
,
V2
:
"POST"
},
...
...
server/router/sys_system.go
浏览文件 @
08c3cec3
...
...
@@ -2,11 +2,12 @@ package router
import
(
"gin-vue-admin/api/v1"
"gin-vue-admin/middleware"
"github.com/gin-gonic/gin"
)
func
InitSystemRouter
(
Router
*
gin
.
RouterGroup
)
{
SystemRouter
:=
Router
.
Group
(
"system"
)
SystemRouter
:=
Router
.
Group
(
"system"
)
.
Use
(
middleware
.
JWTAuth
(),
middleware
.
CasbinHandler
())
{
SystemRouter
.
POST
(
"getSystemConfig"
,
v1
.
GetSystemConfig
)
// 获取配置文件内容
SystemRouter
.
POST
(
"setSystemConfig"
,
v1
.
SetSystemConfig
)
// 设置配置文件内容
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录