feat(weibo): 区分充值资金来源并完善协作单记录
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user