fix: 提现申请放行退款审核中订单,管理员拒绝退款不再500
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -69,6 +69,7 @@ ORDER_STATUS_REFUNDED = 5
|
|||||||
DASHOU_WITHDRAW_APPLY_NON_BLOCKING_ORDER_STATUSES = (
|
DASHOU_WITHDRAW_APPLY_NON_BLOCKING_ORDER_STATUSES = (
|
||||||
1, # 待抢单
|
1, # 待抢单
|
||||||
3, # 已完成
|
3, # 已完成
|
||||||
|
4, # 退款审核中
|
||||||
5, # 已退款
|
5, # 已退款
|
||||||
6, # 退款失败
|
6, # 退款失败
|
||||||
7, # 指定中
|
7, # 指定中
|
||||||
@@ -285,7 +286,7 @@ def _dashou_has_unfinished_orders(yonghuid):
|
|||||||
|
|
||||||
|
|
||||||
def _dashou_has_orders_blocking_withdraw_apply(yonghuid):
|
def _dashou_has_orders_blocking_withdraw_apply(yonghuid):
|
||||||
"""打手提现申请专用:仅拦进行中(2)、退款审核中(4)等与该用户关联的订单。"""
|
"""打手提现申请专用:仅拦进行中(2)等与该用户关联的订单。"""
|
||||||
return Order.query.filter(
|
return Order.query.filter(
|
||||||
PlayerID=yonghuid,
|
PlayerID=yonghuid,
|
||||||
).exclude(
|
).exclude(
|
||||||
|
|||||||
@@ -822,11 +822,12 @@ class KefuPlatformRefundView(APIView):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"平台退款更新退款记录异常: {str(e)}", exc_info=True)
|
logger.error(f"平台退款更新退款记录异常: {str(e)}", exc_info=True)
|
||||||
|
|
||||||
# 11. 更新客服统计数据
|
# 11. 更新客服统计数据(管理员无客服扩展表,跳过)
|
||||||
kefu.jinrichuli += 1
|
if kefu is not None:
|
||||||
kefu.jinyuechuli += 1
|
kefu.jinrichuli += 1
|
||||||
kefu.zongchuli += 1
|
kefu.jinyuechuli += 1
|
||||||
kefu.save()
|
kefu.zongchuli += 1
|
||||||
|
kefu.save()
|
||||||
|
|
||||||
# 🔥 新增:调用打手每日统计(成交)
|
# 🔥 新增:调用打手每日统计(成交)
|
||||||
try:
|
try:
|
||||||
@@ -1082,11 +1083,12 @@ class KefuRejectRefundView(APIView):
|
|||||||
logger.error(f"打手每日统计更新失败: {e}")
|
logger.error(f"打手每日统计更新失败: {e}")
|
||||||
# 不影响主流程
|
# 不影响主流程
|
||||||
|
|
||||||
# 10. 更新客服统计数据
|
# 10. 更新客服统计数据(管理员无客服扩展表,跳过)
|
||||||
kefu.jinrichuli += 1
|
if kefu is not None:
|
||||||
kefu.jinyuechuli += 1
|
kefu.jinrichuli += 1
|
||||||
kefu.zongchuli += 1
|
kefu.jinyuechuli += 1
|
||||||
kefu.save()
|
kefu.zongchuli += 1
|
||||||
|
kefu.save()
|
||||||
|
|
||||||
return Response({'code': 0, 'msg': '拒绝退款成功'})
|
return Response({'code': 0, 'msg': '拒绝退款成功'})
|
||||||
|
|
||||||
@@ -1352,10 +1354,11 @@ class KefuRejectSettlementView(APIView):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
kefu.jinrichuli += 1
|
if kefu is not None:
|
||||||
kefu.jinyuechuli += 1
|
kefu.jinrichuli += 1
|
||||||
kefu.zongchuli += 1
|
kefu.jinyuechuli += 1
|
||||||
kefu.save()
|
kefu.zongchuli += 1
|
||||||
|
kefu.save()
|
||||||
|
|
||||||
return Response({'code': 0, 'msg': '拒绝结算成功'})
|
return Response({'code': 0, 'msg': '拒绝结算成功'})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user