From 90eed6f5ca0a9889af5153a3f53f17b0290de309 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 2 Jan 2020 18:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E7=AE=A1=E7=90=86--=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoController.class.php | 4 +++- Application/Admin/Controller/QueryController.class.php | 1 + Application/Admin/Model/WithdrawModel.class.php | 5 ++++- Application/Home/Controller/FinanceController.class.php | 1 + Data/update.sql | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 7b268b3be..c7b44a39d 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -1099,8 +1099,10 @@ public function auto_rrdae(){ $promoteMap['chain'] = ['like', "{$promote['chain']}{$promote['id']}/%"]; $promoteIds = M('promote', 'tab_')->where($promoteMap)->getField('id', true); $promoteIds[] = $promote['id']; + $settlementType = $promote['settlement_type']; $settlementEndTime = strtotime(date('Y-m-d')) - 1; if ($initial) { + $settlementType = 5; $settlementBeginTime = 0; } else { switch ($promote['settlement_type']) { @@ -1141,7 +1143,7 @@ public function auto_rrdae(){ $add['op_type'] = 3; $add['last_op_id'] = $add['op_id']; $add['last_op_type'] = 3; - $add['settlement_type'] = $promote['settlement_type']; + $add['settlement_type'] = $settlementType; M()->startTrans();//开启事物 $withdrawId = D('withdraw')->add($add); diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 069a5c112..d21825aec 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -259,6 +259,7 @@ class QueryController extends ThinkController $add['op_type'] = 2; $add['last_op_id'] = $add['op_id']; $add['last_op_type'] = 2; + $add['settlement_type'] = 3; M()->startTrans();//开启事物 $withdrawId = M('withdraw', 'tab_')->add($add); diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index 3a9859c8e..aad3366bc 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -23,7 +23,9 @@ class WithdrawModel extends Model{ //结算类型 const SETTLEMENT_TYPE_WEEK = 1; const SETTLEMENT_TYPE_MONTH = 2; - const SETTLEMENT_TYPE_OTHER = 3; + const SETTLEMENT_TYPE_ADMIN = 3; + const SETTLEMENT_TYPE_PROMOTE = 4; + const SETTLEMENT_TYPE_OTHER = 5; /** * 构造函数 @@ -47,6 +49,7 @@ class WithdrawModel extends Model{ public static $settlementTypeList = [ self::SETTLEMENT_TYPE_WEEK => '周结', self::SETTLEMENT_TYPE_MONTH => '月结', + self::SETTLEMENT_TYPE_ADMIN => '管理员提现', self::SETTLEMENT_TYPE_OTHER => '其他', ]; diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index d1437860e..24015b034 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -344,6 +344,7 @@ class FinanceController extends BaseController $add['op_type'] = 1; $add['last_op_id'] = $this->loginPromote['id']; $add['last_op_type'] = 1; + $add['settlement_type'] = 4; M()->startTrans();//开启事物 $withdrawId = M('withdraw', 'tab_')->add($add); diff --git a/Data/update.sql b/Data/update.sql index 06f649355..9a9da04f4 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -940,4 +940,4 @@ ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' C -- 2020-01-02 -- 提现结算类型 cxj ALTER TABLE `tab_withdraw` -ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型:1-周结 2-月结 3-其他'; +ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型:1-周结 2-月结 3-管理员提现 4-推广员提现 5-其他';