Control role_name and tole_key cannot be duplicate

This commit is contained in:
zhangwenjian
2020-05-14 21:11:55 +08:00
parent 221ee539cd
commit 6d2c267121
4 changed files with 29 additions and 26 deletions
+1
View File
@@ -101,6 +101,7 @@ func UpdateRole(c *gin.Context) {
err := c.Bind(&data)
tools.HasError(err, "数据解析失败", -1)
result, err := data.Update(data.RoleId)
tools.HasError(err, "", -1)
var t models.RoleMenu
_, err = t.DeleteRoleMenu(data.RoleId)
tools.HasError(err, "添加失败1", -1)