|
@@ -274,12 +274,14 @@ func ClearUserPowerFunc(positionId, appId string) bool {
|
|
|
if positionId == "" {
|
|
|
return false
|
|
|
}
|
|
|
- for _, v := range []string{"PC", "APP", "WX"} {
|
|
|
- redis.Del(RedisCode, fmt.Sprintf(RedisMenuKey, appId, v, ConfigJson.MenuCacheKey, positionId))
|
|
|
+ for _, v := range strings.Split(positionId, ",") {
|
|
|
+ for _, v := range []string{"PC", "APP", "WX"} {
|
|
|
+ //用户菜单缓存
|
|
|
+ redis.Del(RedisCode, fmt.Sprintf(RedisMenuKey, appId, v, ConfigJson.MenuCacheKey, v))
|
|
|
+ }
|
|
|
+ //用户权限缓存
|
|
|
+ redis.Del(RedisCode, fmt.Sprintf(UserPowerRedisKey, appId, time.Now().Day(), v))
|
|
|
}
|
|
|
- //用户权限缓存
|
|
|
- redis.Del(RedisCode, fmt.Sprintf(UserPowerRedisKey, appId, time.Now().Day(), positionId))
|
|
|
- //用户菜单缓存
|
|
|
return true
|
|
|
}
|
|
|
|