feat(weibo): 区分充值资金来源并完善协作单记录

This commit is contained in:
yml
2026-11-13 21:07:50 +08:00
parent f0abca3d58
commit 76b344eb83
11 changed files with 740 additions and 10 deletions
+9
View File
@@ -59,6 +59,8 @@ from ..services.weibo_service import (
generate_weibo_bind_qrcode,
generate_weibo_bind_schemes,
import_weibo_cookies,
persist_weibo_payment_status,
persist_weibo_recharge_order,
query_weibo_exchange_records,
query_weibo_mall,
query_weibo_payment_status,
@@ -1600,6 +1602,12 @@ def create_recharge_order(
)
except (WeiboError, ValueError) as exc:
raise _manual_http_error(exc) from exc
persist_weibo_recharge_order(
db,
account,
order,
created_by=current.id,
)
_record_audit_safely(
db,
current,
@@ -1643,6 +1651,7 @@ def get_recharge_status(
status = query_weibo_payment_status(db, account, pay_id=req.pay_id)
except (WeiboError, ValueError) as exc:
raise _manual_http_error(exc) from exc
persist_weibo_payment_status(db, account, status)
return WeiboPaymentStatusOut(
pay_id=status.pay_id,
out_pay_id=status.out_pay_id,