magic-boot/data/magic-api/api/后台/用户管理/删除.ms

32 lines
888 B
Plaintext
Raw Normal View History

2021-10-24 20:09:53 +08:00
{
"properties" : { },
"id" : "c86e4f8fd4bc4d63bfaec8a53ea333cf",
"script" : null,
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
"name" : "删除",
"createTime" : null,
2022-02-06 12:34:56 +08:00
"updateTime" : 1644121688496,
2021-10-24 20:09:53 +08:00
"lock" : "0",
"method" : "POST",
"path" : "/delete",
"parameters" : [ ],
2022-02-06 12:34:56 +08:00
"option" : "[{\"name\":\"permission\",\"value\":\"user:delete\",\"description\":\"允许拥有该权限的访问\"}]",
"requestBody" : "{\n\n}",
2021-10-24 20:09:53 +08:00
"headers" : [ ],
"paths" : [ ],
"responseBody" : null,
"description" : null,
"requestBodyDefinition" : null,
"responseBodyDefinition" : null,
2022-02-06 12:34:56 +08:00
"optionMap" : {
"permission" : "user:delete"
}
2021-10-24 20:09:53 +08:00
}
================================
2022-01-04 14:56:52 +08:00
import org.ssssssss.magicapi.cache.SqlCache
2021-10-24 20:09:53 +08:00
for(userId in id.split(',')){
2022-01-04 14:56:52 +08:00
SqlCache.delete(`permissions:${userId}`)
2021-10-24 20:09:53 +08:00
db.table("sys_user").logic().where().eq("id",userId).delete();
}
return true