fix: 资源中文说明、补全打手日统计写入、今日榜仅读日统计表
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -154,6 +154,22 @@ def update_dashou_daily(yonghuid, jiedan_jine=Decimal('0.00'), chengjiao_jine=De
|
||||
DashouRiTongji.objects.filter(id=stat.id).update(**update_fields)
|
||||
|
||||
|
||||
def update_dashou_daily_by_action(yonghuid, amount, action):
|
||||
"""
|
||||
根据行为类型更新打手每日统计(写入 dashou_ri_tongji 日统计表)
|
||||
action: 1=接单, 2=成交/结算, 3=退款
|
||||
"""
|
||||
amount = Decimal(str(amount)) if amount else Decimal('0.00')
|
||||
if amount <= 0:
|
||||
return
|
||||
if action == 1:
|
||||
update_dashou_daily(yonghuid, jiedan_jine=amount)
|
||||
elif action == 2:
|
||||
update_dashou_daily(yonghuid, chengjiao_jine=amount)
|
||||
elif action == 3:
|
||||
update_dashou_daily(yonghuid, tuikuan_jine=amount)
|
||||
|
||||
|
||||
|
||||
def update_shangjia_daily(yonghuid, amount, action):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user