From e4432d49f9d74e69cc71ed1141ebcd30c817e998 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 17 十月 2026 20:34:24 +0800
Subject: [PATCH] feat(hrm): 新增我的考勤状态接口并开放全员打卡
---
scripts/clear_unit_permission_cache.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/scripts/clear_unit_permission_cache.py b/scripts/clear_unit_permission_cache.py
index 615405d..34b1571 100644
--- a/scripts/clear_unit_permission_cache.py
+++ b/scripts/clear_unit_permission_cache.py
@@ -1,6 +1,7 @@
import socket
import re
import json
+import sys
from pathlib import Path
source = Path('yudao-server/src/main/resources/application-local.yaml').read_text(encoding='utf-8')
@@ -44,6 +45,14 @@
keys.extend(key for key in batch if key.decode().endswith(suffixes))
if cursor == b'0':
break
+menu_suffixes = tuple(':' + str(int(value)) for value in sys.argv[1:])
+if menu_suffixes:
+ cursor = b'0'
+ while True:
+ cursor, batch = command('SCAN', cursor, 'MATCH', '*menu_role_ids*', 'COUNT', 100)
+ keys.extend(key for key in batch if key.decode().endswith(menu_suffixes))
+ if cursor == b'0':
+ break
print('Target permission cache keys:', [key.decode() for key in keys])
if keys:
print('Deleted permission cache entries:', command('DEL', *keys))
--
Gitblit v1.9.3