Browse Source

更新

master
huangjiajun 2 months ago
parent
commit
5d275441f3
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      app/svc/svc_role.go

+ 9
- 1
app/svc/svc_role.go View File

@@ -9,6 +9,7 @@ import (
"code.fnuoos.com/zhimeng/model.git/src/model" "code.fnuoos.com/zhimeng/model.git/src/model"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"regexp" "regexp"
"strings" "strings"
@@ -139,7 +140,14 @@ func RoleBindPermissionGroup(c *gin.Context, req md.RoleBindPermissionGroupReq)
return return
} }


return session.Commit()
session.Commit()
var data []model.AdminRole
MasterDb(c).Where("role_id=?", role.Id).Find(&data)
for _, v := range data {
rolePermissionKey := fmt.Sprintf(md.AdminRolePermissionKey, c.GetString("mid"), utils.AnyToString(v.AdmId))
cache.Del(rolePermissionKey)
}
return nil
} }


func BindAdminRole(c *gin.Context, req md.BindAdminRoleReq) (err error) { func BindAdminRole(c *gin.Context, req md.BindAdminRoleReq) (err error) {


Loading…
Cancel
Save