mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-19 12:02:50 +08:00
32 lines
875 B
Plaintext
32 lines
875 B
Plaintext
{
|
|
"properties" : { },
|
|
"id" : "96336e6177d143c1a2259685f71cd615",
|
|
"script" : null,
|
|
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
|
"name" : "根据菜单id清除缓存",
|
|
"createTime" : null,
|
|
"updateTime" : 1641218495832,
|
|
"lock" : "0",
|
|
"method" : "GET",
|
|
"path" : "/cache/delete",
|
|
"parameters" : [ ],
|
|
"option" : "[]",
|
|
"requestBody" : "",
|
|
"headers" : [ ],
|
|
"paths" : [ ],
|
|
"responseBody" : null,
|
|
"description" : null,
|
|
"requestBodyDefinition" : null,
|
|
"responseBodyDefinition" : null,
|
|
"optionMap" : { }
|
|
}
|
|
================================
|
|
import org.ssssssss.magicapi.cache.SqlCache
|
|
var userIds = db.select("""
|
|
select user_id from sys_user_role where role_id in (
|
|
select role_id from sys_role_menu where menu_id = #{menuId}
|
|
) and user_id is not null
|
|
""")
|
|
for(item in userIds){
|
|
SqlCache.delete(`permissions:${item.userId}`)
|
|
} |