fix: 罚单申请时锁定分红利率与应得金额,缴纳按锁定值入账
This commit is contained in:
@@ -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': '罚款已生成'})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user