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

@@ -3095,6 +3095,7 @@ class ShopFineApplyView(APIView):
return Response({'code': 400, 'msg': '该打手已被罚款过'})
# ---------- 6. 创建罚单 ----------
from jituan.services.club_penalty import resolve_penalty_club_id
with transaction.atomic():
penalty = Penalty.query.create(
PenalizedUserID=dashou_id,
@@ -3106,6 +3107,12 @@ class ShopFineApplyView(APIView):
Status=1, # 待缴纳
AffectsGrabbing=yingxiang_qiangdan,
ApplicantIdentity=4, # 申请人身份4 店铺管理员
ClubID=resolve_penalty_club_id(
order=order,
request=request,
user=request.user,
applicant_id=str(shop_id),
),
)
from users.fadan_fenhong_utils import lock_penalty_bonus
lock_penalty_bonus(penalty)