fix: 罚单/积分处罚归属申请人俱乐部;申请锁定分红缴纳按锁定值入账

This commit is contained in:
XingQue
2026-06-27 18:15:42 +08:00
parent 374dd26855
commit ee7867b36f
6 changed files with 139 additions and 41 deletions

View File

@@ -10441,6 +10441,7 @@ class KefuPunishView(APIView):
return Response({'code': 400, 'msg': '该用户不是打手'}, status=status.HTTP_400_BAD_REQUEST)
# 6. 使用事务
from jituan.services.club_penalty import resolve_penalty_record_club_id
with transaction.atomic():
# 创建处罚记录积分扣除5分
jifen = 5
@@ -10451,6 +10452,12 @@ class KefuPunishView(APIView):
ApplyStatus=0, # 待处理
DeductedPoints=jifen,
OrderID=dingdan_id,
ClubID=resolve_penalty_record_club_id(
order_id=dingdan_id,
player_id=dashou_id,
request=request,
user=request.user,
),
)
# 扣除打手积分