system add middleware, update markfile, add data

This commit is contained in:
SliverHorn
2020-10-23 13:57:41 +08:00
parent d478246edc
commit 2baf392129
5 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ var DataAuthorityId = []SysDataAuthorityId{
}
func InitSysDataAuthorityId(db *gorm.DB) (err error) {
return db.Transaction(func(tx *gorm.DB) error {
return db.Table("sys_data_authority_id").Transaction(func(tx *gorm.DB) error {
if tx.Create(&DataAuthorityId).Error != nil { // 遇到错误时回滚事务
return err
}
+1 -1
View File
@@ -66,7 +66,7 @@ var AuthorityMenus = []SysAuthorityMenus{
}
func InitSysAuthorityMenus(db *gorm.DB) (err error) {
return db.Transaction(func(tx *gorm.DB) error {
return db.Table("sys_authority_menus").Transaction(func(tx *gorm.DB) error {
if tx.Create(&AuthorityMenus).Error != nil { // 遇到错误时回滚事务
return err
}
+4
View File
@@ -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"},