From 0025cc2f15f612a4c91b95fbee762f320a3f99a6 Mon Sep 17 00:00:00 2001 From: yxh Date: Wed, 19 Aug 2020 09:12:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/admin/auth.go | 8 -------- config/config.toml | 7 ++++++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/controller/admin/auth.go b/app/controller/admin/auth.go index f0ad647..d88e4b3 100644 --- a/app/controller/admin/auth.go +++ b/app/controller/admin/auth.go @@ -110,10 +110,6 @@ func (c *Auth) AddMenu(r *ghttp.Request) { if !auth_service.CheckMenuNameUnique(menu.Name, 0) { response.FailJson(true, r, "菜单规则名称已经存在") } - //判断路由是否已经存在 - if !auth_service.CheckMenuPathUnique(menu.Path, 0) { - response.FailJson(true, r, "路由地址已经存在") - } //保存到数据库 err, _ := auth_service.AddMenu(menu) if err != nil { @@ -152,10 +148,6 @@ func (c *Auth) EditMenu(r *ghttp.Request) { if !auth_service.CheckMenuNameUnique(menu.Name, id) { response.FailJson(true, r, "菜单规则名称已经存在") } - //判断路由是否已经存在 - if !auth_service.CheckMenuPathUnique(menu.Path, id) { - response.FailJson(true, r, "路由地址已经存在") - } //保存到数据库 err, _ := auth_service.EditMenu(menu, id) if err != nil { diff --git a/config/config.toml b/config/config.toml index b6c6395..e9a0564 100644 --- a/config/config.toml +++ b/config/config.toml @@ -1,6 +1,11 @@ # 数据库连接 [database] - link = "mysql:root:123456@tcp(127.0.0.1:3306)/gfast_open" + type = "mysql" + host = "192.168.0.212" + port = "3306" + user = "devuser" + pass = "123456" + name = "gfast" charset = "utf8mb4" #数据库编码 maxIdle = "10" #连接池最大闲置的连接数 maxOpen = "10" #连接池最大打开的连接数