结构调整添加cmd

This commit is contained in:
zhangwenjian
2020-04-18 10:06:44 +08:00
parent f2829bfd98
commit a2f4c00246
72 changed files with 838 additions and 597 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ package models
import (
"fmt"
orm "go-admin/database"
"go-admin/pkg/utils"
"go-admin/tools"
)
type RoleMenu struct {
@@ -134,7 +134,7 @@ func (rm *RoleMenu) Insert(roleId int, menuId []int) (bool, error) {
}
func (rm *RoleMenu) Delete(RoleId string, MenuID string) (bool, error) {
rm.RoleId, _ = utils.StringToInt(RoleId)
rm.RoleId, _ = tools.StringToInt(RoleId)
table := orm.Eloquent.Table("sys_role_menu").Where("role_id = ?", RoleId)
if MenuID != "" {
table = table.Where("menu_id = ?", MenuID)