虚拟退款获取 access_token 时显式导入 cache,避免未导入报错。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-22 18:58:49 +08:00
parent 057e6fcaf8
commit 442ed95acc

View File

@@ -9507,6 +9507,7 @@ class KefuPlatformRefundView(APIView):
def _get_access_token(self):
"""获取 access_token带缓存"""
from django.core.cache import cache
cache_key = "virtual_payment_access_token"
access_token = cache.get(cache_key)
if not access_token: