fix: 支付入账降级 + 财务全平台汇总
This commit is contained in:
@@ -307,11 +307,14 @@ class WechatPayNotifyView(APIView):
|
||||
# =============================================
|
||||
|
||||
|
||||
# 更新收支记录(总累计)
|
||||
from jituan.services.szjilu_accounting import record_wechat_income_once
|
||||
record_wechat_income_once(
|
||||
dingdan.Amount, getattr(dingdan, 'ClubID', None), biz_ref=f'order:{out_trade_no}',
|
||||
)
|
||||
# 更新收支记录(总累计);统计失败不得回滚订单支付
|
||||
try:
|
||||
from jituan.services.szjilu_accounting import record_wechat_income_once
|
||||
record_wechat_income_once(
|
||||
dingdan.Amount, getattr(dingdan, 'ClubID', None), biz_ref=f'order:{out_trade_no}',
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f'订单收支统计失败 {out_trade_no}: {e}', exc_info=True)
|
||||
|
||||
# 构建通知数据(你的 _get_game_type_name 方法保留在视图里直接用)
|
||||
order_info = {
|
||||
@@ -569,12 +572,15 @@ class PaymentVerifyView(APIView):
|
||||
|
||||
|
||||
# 更新收支记录
|
||||
from jituan.services.szjilu_accounting import record_wechat_income_once
|
||||
record_wechat_income_once(
|
||||
dingdan.Amount,
|
||||
getattr(dingdan, 'ClubID', None),
|
||||
biz_ref=f'order:{dingdan.OrderID}',
|
||||
)
|
||||
try:
|
||||
from jituan.services.szjilu_accounting import record_wechat_income_once
|
||||
record_wechat_income_once(
|
||||
dingdan.Amount,
|
||||
getattr(dingdan, 'ClubID', None),
|
||||
biz_ref=f'order:{dingdan.OrderID}',
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f'订单收支统计失败 {dingdan.OrderID}: {e}', exc_info=True)
|
||||
|
||||
def _query_wechat_payment(self, out_trade_no):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user