From a2c5db55007b64a4bb7e9219bc1e65ec3011ca2b Mon Sep 17 00:00:00 2001 From: QQ Date: Fri, 31 Dec 2021 14:55:26 +0800 Subject: [PATCH] Update --- app/Models/BalanceLog.php | 1 + app/Models/WalletLog.php | 1 + app/Services/DistributionPreIncomeJobService.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Models/BalanceLog.php b/app/Models/BalanceLog.php index 952ea4ba..0e2407e6 100644 --- a/app/Models/BalanceLog.php +++ b/app/Models/BalanceLog.php @@ -11,6 +11,7 @@ class BalanceLog extends Model use Filterable; use HasDateTimeFormatter; + public const ACTION_MIGRATE_OLD = 0; // 老数据迁移 public const ACTION_ORDER_PAID = 1; public const ACTION_ORDER_CANCELLED = 2; public const ACTION_ORDER_AFTER_SALE = 3; diff --git a/app/Models/WalletLog.php b/app/Models/WalletLog.php index 34a0a24c..cf56ac11 100644 --- a/app/Models/WalletLog.php +++ b/app/Models/WalletLog.php @@ -11,6 +11,7 @@ class WalletLog extends Model use Filterable; use HasDateTimeFormatter; + public const ACTION_MIGRATE_OLD = 0; // 老数据迁移 public const ACTION_ORDER_PAID = 1; public const ACTION_ORDER_CANCELLED = 2; public const ACTION_ORDER_AFTER_SALE = 3; diff --git a/app/Services/DistributionPreIncomeJobService.php b/app/Services/DistributionPreIncomeJobService.php index af9082d0..38fc3cd2 100644 --- a/app/Services/DistributionPreIncomeJobService.php +++ b/app/Services/DistributionPreIncomeJobService.php @@ -282,7 +282,7 @@ class DistributionPreIncomeJobService $preIncome = $user->inviterInfo->distributionPreIncomes()->create([ 'order_id' => $order->id, 'type' => DistributionPreIncome::TYPE_PRICE_DIFF, - 'agent_level' => $user->agent_level, + 'agent_level' => $user->inviterInfo->agent_level, 'total_amount' => $totalDiffPrice, 'total_sales_value' => $totalSalesValue, 'total_revenue' => round($totalRevenue, 2),