From 8da2085806fe524261377d10e2e27ae7af539b73 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Sat, 21 Oct 2023 10:37:57 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=A2=B3=E7=90=86=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E4=BD=99=E9=A2=9D=EF=BC=8C=E8=82=A1=E9=87=91=EF=BC=8C=E6=8A=BC?= =?UTF-8?q?=E9=87=91=E4=B8=89=E7=B1=BB=E9=87=91=E9=A2=9D=E7=9A=84=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E8=AE=B0=E5=BD=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/adminapi/controller/CompanyController.php | 4 ++-- app/common/logic/finance/ShareProfit.php | 2 +- app/common/logic/finance/TownShareProfit.php | 2 +- app/common/logic/finance/WithdrawLogic.php | 2 +- .../model/company/CompanyAccountLog.php | 20 ++++++++++++++++--- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/adminapi/controller/CompanyController.php b/app/adminapi/controller/CompanyController.php index a55c1c1ac..c90950d4e 100644 --- a/app/adminapi/controller/CompanyController.php +++ b/app/adminapi/controller/CompanyController.php @@ -504,8 +504,8 @@ class CompanyController extends BaseAdminController 'sn' => generate_sn(CompanyAccountLog::class, 'sn', 20), 'user_id' => 0, 'company_id' => $param['company_id'], - 'change_type' => 300, - 'change_object' => 2, + 'change_type' => CompanyAccountLog::COMPANY_DEPOSIT, + 'change_object' => CompanyAccountLog::DEPOSIT, 'action' => 1, 'change_amount' => $param['deposit'], 'left_amount' =>$left_amount, diff --git a/app/common/logic/finance/ShareProfit.php b/app/common/logic/finance/ShareProfit.php index 8f49e108f..cf6a5a124 100644 --- a/app/common/logic/finance/ShareProfit.php +++ b/app/common/logic/finance/ShareProfit.php @@ -85,7 +85,7 @@ class ShareProfit $company_log = [ 'sn' => generate_sn(UserAccountLog::class, 'sn', 20), 'company_id' => $datas['company_id'], - 'change_object' => CompanyAccountLog::SHAREHOLDER, //变动对象 + 'change_object' => CompanyAccountLog::COMPANY_MONEY, //变动对象 'change_type' => CompanyAccountLog::TASK_INC_SHAREHOLDER_MONEY, //变动类型 'action' => CompanyAccountLog::INC, //1-增加 2-减少 'left_amount' => $left_amount, //变动后数量 diff --git a/app/common/logic/finance/TownShareProfit.php b/app/common/logic/finance/TownShareProfit.php index 74269ce54..eea76bd64 100644 --- a/app/common/logic/finance/TownShareProfit.php +++ b/app/common/logic/finance/TownShareProfit.php @@ -183,7 +183,7 @@ class TownShareProfit // 公司收益 $deposit_count = bcadd($company['deposit'], $masterMoney, 2); // 公司收益变动记录 - $this->AccountLog($company['id'], $deposit_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_DEPOSIT); + $this->AccountLog($company['id'], $deposit_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_INCOME); $company_money_count = bcadd($company['company_money'], $masterMoney, 2); //公司余额变动记录 $this->AccountLog($company['id'], $company_money_count, $masterMoney, 1, CompanyAccountLog::TASK_INC_COMPANY_MONEY); diff --git a/app/common/logic/finance/WithdrawLogic.php b/app/common/logic/finance/WithdrawLogic.php index b726837bf..f92dfc349 100644 --- a/app/common/logic/finance/WithdrawLogic.php +++ b/app/common/logic/finance/WithdrawLogic.php @@ -72,7 +72,7 @@ class WithdrawLogic extends BaseLogic $companyAccountLog = [ 'sn' => generate_sn(UserAccountLog::class, 'sn', 20), 'company_id' => $companyInfo['id'], - 'change_object' => CompanyAccountLog::TASK, //变动对象 + 'change_object' => CompanyAccountLog::COMPANY_MONEY, //变动对象 'change_type' => CompanyAccountLog::WITHDRAW_DEC_DEPOSIT, //变动类型 'action' => CompanyAccountLog::DEC, //1-增加 2-减少 'left_amount' => $leftMoney, //变动后数量 diff --git a/app/common/model/company/CompanyAccountLog.php b/app/common/model/company/CompanyAccountLog.php index 476ccd4d2..49c2a0d82 100644 --- a/app/common/model/company/CompanyAccountLog.php +++ b/app/common/model/company/CompanyAccountLog.php @@ -41,9 +41,18 @@ class CompanyAccountLog extends BaseModel */ const TASK = 1; /** - * 股金 + * 公司股金 */ const SHAREHOLDER = 2; + /** + * 公司余额 + */ + const COMPANY_MONEY = 3; + + /** + * 公司押金 + */ + const DEPOSIT = 4; /** * 动作 @@ -72,13 +81,13 @@ class CompanyAccountLog extends BaseModel const WITHDRAW_DEC_DEPOSIT = 102; /** - * 用户余额增加类型 + * 公司金额变动类型 */ /** * 任务收益 */ - const TASK_INC_DEPOSIT = 200; + const TASK_INC_INCOME = 200; /** * 公司余额 */ @@ -88,4 +97,9 @@ class CompanyAccountLog extends BaseModel */ const TASK_INC_SHAREHOLDER_MONEY = 202; + /** + * 押金 + */ + const COMPANY_DEPOSIT = 300; + } \ No newline at end of file