fix: 罚单申请时锁定分红利率与应得金额,缴纳按锁定值入账

This commit is contained in:
XingQue
2026-06-27 17:46:39 +08:00
parent e2e568bcda
commit d19b6250ae
7 changed files with 228 additions and 104 deletions

View File

@@ -3096,7 +3096,7 @@ class ShopFineApplyView(APIView):
# ---------- 6. 创建罚单 ----------
with transaction.atomic():
Penalty.query.create(
penalty = Penalty.query.create(
PenalizedUserID=dashou_id,
ApplicantID=str(shop_id), # 申请人记为店铺ID
Identity=1, # 被处罚人身份1 打手
@@ -3107,6 +3107,8 @@ class ShopFineApplyView(APIView):
AffectsGrabbing=yingxiang_qiangdan,
ApplicantIdentity=4, # 申请人身份4 店铺管理员
)
from users.fadan_fenhong_utils import lock_penalty_bonus
lock_penalty_bonus(penalty)
logger.info(f"本地罚款成功: 订单 {dingdan_id}, 打手 {dashou_id}, 金额 {fakuanjine}")
return Response({'code': 200, 'msg': '罚款已生成'})