进行了 GVSDSDK 迁移,可能存在诸多问题

This commit is contained in:
2026-06-17 20:37:47 +08:00
parent 72770ad73b
commit d00f0d08e5
132 changed files with 161593 additions and 4827 deletions

View File

@@ -41,11 +41,11 @@ from .models import (
Tixianjilu,
UserDashou,
UserGuanshi,
UserMain,
UserShenheguan,
UserShangjia,
UserZuzhang,
)
from gvsdsdk.models import User
from orders.utils import update_daily_payout
@@ -708,8 +708,8 @@ def release_collect_quota_for_record(auto_record):
if not _quota_already_reserved_for_record(auto_record):
return
try:
user_main = UserMain.query.get(yonghuid=auto_record.yonghuid)
except UserMain.DoesNotExist:
user_main = User.query.get(yonghuid=auto_record.yonghuid)
except User.DoesNotExist:
logger.error('回滚限额预占失败:用户不存在 %s', auto_record.yonghuid)
return
release_collect_quota_reservation(
@@ -753,8 +753,8 @@ def apply_transfer_success_quota(auto_record):
shijidaozhang = auto_record.shijidaozhang or decimal.Decimal('0.00')
try:
user_main = UserMain.query.get(yonghuid=auto_record.yonghuid)
except UserMain.DoesNotExist:
user_main = User.query.get(yonghuid=auto_record.yonghuid)
except User.DoesNotExist:
logger.error('打款成功累加限额失败:用户不存在 %s', auto_record.yonghuid)
return
@@ -966,7 +966,7 @@ def close_audit_over_limit_refund(audit, auto_record=None, fail_reason='单笔
if audit.zhuangtai in (2, 3, 5):
return False
user_main = UserMain.objects.select_for_update().get(yonghuid=audit.yonghuid)
user_main = User.objects.select_for_update().get(yonghuid=audit.yonghuid)
refund_balance(user_main, audit.leixing, audit.shijidaozhang)
sync_audit_and_jilu_status(
audit, 3,