fix: 简化提现收款对账,避免永远卡在收款处理中

- 同一审核单只保留最新一条进行中打款,多次点击不再堆叠阻塞
- 有 package 时查单失败也直接调起微信确认
- 无 package 超过20秒即作废允许重试;转账/网络失败返回明确错误而非 code12

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-10 21:59:28 +08:00
parent 921941a36d
commit 8bc0afb7f4
3 changed files with 73 additions and 72 deletions

View File

@@ -394,12 +394,17 @@ def process_audit_collect(request):
except requests.RequestException as e:
logger.error(
'微信打款网络异常(保持待查单): bill=%s err=%s',
'微信打款网络异常: bill=%s err=%s',
tixian_id, e, exc_info=True,
)
_mark_auto_record_failed(tixian_id, '网络异常')
if quota_reserved:
release_collect_quota_for_record(
TixianAutoRecord.query.get(tixian_id=tixian_id),
)
return Response({
'code': 12,
'msg': '收款请求已提交,请稍后再试',
'code': 99,
'msg': '网络异常,请稍后再次点击收款',
})
finally: