|
@@ -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) { |
|
|