新增删除菜单

This commit is contained in:
2023-06-27 17:00:31 +08:00
parent 195942a4f5
commit c8fd746540
7 changed files with 110 additions and 6 deletions
+8
View File
@@ -61,3 +61,11 @@ func (r *AdminMenuDao) EditAdminMenuByIdWithStruct(tx *gorm.DB, menuId int64, mo
}
return nil
}
// DeleteAdminMenuByMenuId 删除菜单
func (r *AdminMenuDao) DeleteAdminMenuByMenuId(tx *gorm.DB, menuId int64) error {
if err := tx.Delete(&model.AdminMenu{}, menuId).Error; err != nil {
return err
}
return nil
}