feat: 新增 Redis 缓存同步相关模块与控制器

This commit is contained in:
陈赓
2025-07-15 11:29:18 +08:00
parent cdbc277a94
commit 8e8f5eb8be
3 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# study/jikimo_sf/sf_mrs_connect/models/common.py
import time, hashlib
class Common:
@staticmethod
def get_headers(token, secret_key):
ts = str(int(time.time()))
sign = hashlib.sha256(f"{token}{secret_key}{ts}".encode()).hexdigest()
return {
"token": token,
"sign": sign,
"timestamp": ts,
"Content-Type": "application/json",
}