feat: 资金冻结 P1 打手结单收口网关 + 到期解冻定时任务骨架

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-26 18:49:44 +08:00
parent d40a27a5ca
commit 6a1895e566
9 changed files with 352 additions and 98 deletions

View File

@@ -379,13 +379,14 @@ class ShopForceCompleteView(APIView):
try:
dashou_user = User.query.select_related('DashouProfile').get(UserUID=dashou_id)
dashou_profile = dashou_user.DashouProfile
dashou_profile.chengjiaozongliang += 1
dashou_profile.yue += dashou_fencheng
dashou_profile.zonge += dashou_fencheng
dashou_profile.jinrishouyi += dashou_fencheng
dashou_profile.jinyueshouyi += dashou_fencheng
dashou_profile.zhuangtai = 1 # 空闲
dashou_profile.save()
from jituan.services.fund_freeze import credit_dashou_order_settle
credit_dashou_order_settle(
order=order,
dashou_profile=dashou_profile,
user_id=dashou_id,
amount=dashou_fencheng,
set_idle_status=True,
)
except (User.DoesNotExist, ObjectDoesNotExist):
logger.warning(f"本地订单结算:打手 {dashou_id} 不存在,跳过打手更新")