fix: 财务接口+恢复今日收入

This commit is contained in:
XingQue
2026-06-24 21:35:55 +08:00
parent 84665e0c5d
commit b1fbc3cd8f
5 changed files with 425 additions and 26 deletions

View File

@@ -33,14 +33,14 @@ def get_order_user_id(order):
return None
def update_daily_income(amount, club_id=None):
def update_daily_income(amount, club_id=None, stat_date=None):
"""
原子更新当日收入统计金额累加笔数加1
用于微信支付成功回调。
"""
from jituan.constants import CLUB_ID_DEFAULT
cid = club_id or CLUB_ID_DEFAULT
today = date.today()
today = stat_date or date.today()
year, month, day = today.year, today.month, today.day
with transaction.atomic():