feat: 组队招募(/zudui)+ 结单/自动结算/罚款挂钩

新增 Team 表与接口;进8强制锁、组队分账优先且失败不回退全额队长。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-27 03:12:04 +08:00
parent e9e5ee85e2
commit 7002da6093
14 changed files with 1466 additions and 63 deletions

View File

@@ -602,6 +602,12 @@ class KefuChangeDashouView(APIView):
order.AssignedCS = current_user.UserUID # 记录处理客服ID
order.save()
try:
from orders.services.team_recruit import on_order_change_player
on_order_change_player(order.OrderID, actor_uid=getattr(current_user, 'UserUID', '') or 'kefu')
except Exception as e:
logger.error(f'组队换打手作废失败: {e}')
return Response({'code': 0, 'msg': '更换打手成功'})