取消表格导出功能,修复回滚(删表)功能的painc (#1310)
* [feature]:取消表格导出功能 * 修复回滚(删表)painc的问题 * [feature]:修改初始化
This commit is contained in:
@@ -45,10 +45,7 @@ func (i *initMenuAuthority) InitializeData(ctx context.Context) (next context.Co
|
||||
}
|
||||
next = ctx
|
||||
// 888
|
||||
if err = db.Model(&authorities[0]).Association("SysBaseMenus").Replace(menus[:20]); err != nil {
|
||||
return next, err
|
||||
}
|
||||
if err = db.Model(&authorities[0]).Association("SysBaseMenus").Append(menus[21:]); err != nil {
|
||||
if err = db.Model(&authorities[0]).Association("SysBaseMenus").Replace(menus); err != nil {
|
||||
return next, err
|
||||
}
|
||||
|
||||
@@ -60,10 +57,10 @@ func (i *initMenuAuthority) InitializeData(ctx context.Context) (next context.Co
|
||||
}
|
||||
|
||||
// 9528
|
||||
if err = db.Model(&authorities[2]).Association("SysBaseMenus").Replace(menus[:12]); err != nil {
|
||||
if err = db.Model(&authorities[2]).Association("SysBaseMenus").Replace(menus[:11]); err != nil {
|
||||
return next, err
|
||||
}
|
||||
if err = db.Model(&authorities[2]).Association("SysBaseMenus").Append(menus[13:17]); err != nil {
|
||||
if err = db.Model(&authorities[2]).Association("SysBaseMenus").Append(menus[12:17]); err != nil {
|
||||
return next, err
|
||||
}
|
||||
return next, nil
|
||||
|
||||
Reference in New Issue
Block a user