diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php
index 779518460..5e6dc0a92 100644
--- a/Application/Admin/Controller/PromoteCompanyController.class.php
+++ b/Application/Admin/Controller/PromoteCompanyController.class.php
@@ -2,6 +2,7 @@
namespace Admin\Controller;
+use mysql_xdevapi\Exception;
use User\Api\UserApi as UserApi;
use OSS\OssClient;
use OSS\Core\OSsException;
@@ -472,4 +473,64 @@ class PromoteCompanyController extends ThinkController
}
# code...
}
+
+ public function promoteDataConfigIndex() {
+
+ if (IS_POST) {
+
+ $changeData = I('post.','');
+
+ $promoteData = M("promote","tab_")
+ ->field("id")
+ ->where(['company_belong'=>2])
+ ->select();
+
+ $promoteData = implode(',',array_column($promoteData,'id'));
+
+ if ($changeData['admin_type']) {
+
+
+ $num_pend = 0;
+ $num_deposit = 0;
+ if ($promoteData) {
+
+ $sql_spend = "UPDATE `tab_spend` SET `old_change_promote_id`=`promote_id`,`old_change_promote_account`=`promote_account`,`promote_id`=0,`promote_account`='{$changeData['admin_type']}' WHERE promote_id in ({$promoteData})";
+ $sql_deposit = "UPDATE `tab_deposit` SET `old_change_promote_id`=`promote_id`,`old_change_promote_account`=`promote_account`,`promote_id`=0,`promote_account`='{$changeData['admin_type']}' WHERE promote_id in ({$promoteData})";
+
+ $model = new \Think\Model();
+ $num_pend = $model->execute($sql_spend,true);
+// $num_deposit = $model->execute($sql_deposit,true);
+
+ $this->ajaxReturn(['info'=>"将数据设为'{$changeData['admin_type']}',处理订单数据".($num_pend+$num_deposit).'条']);
+
+ }
+
+ }
+// else {
+// $num_pend = 0;
+// $num_deposit = 0;
+//
+// if ($promoteData) {
+//
+// $sql_spend = "UPDATE `tab_spend` SET `old_change_promote_id`=`promote_id`,`old_change_promote_account`=`promote_account`,`promote_id`=0,`promote_account`='无' WHERE promote_id in ({$promoteData})";
+// $sql_deposit = "UPDATE `tab_deposit` SET `old_change_promote_id`=`promote_id`,`old_change_promote_account`=`promote_account`,`promote_id`=0,`promote_account`='无' WHERE promote_id in ({$promoteData})";
+//
+// $model = new \Think\Model();
+// $num_pend = $model->execute($sql_spend,true);
+// $num_deposit = $model->execute($sql_deposit,true);
+//
+// $this->ajaxReturn(['info'=>"将数据还原,处理数据".($num_pend+$num_deposit).'条']);
+//
+// }
+//
+// }
+
+ } else {
+
+ $this->display();
+
+ }
+
+ }
+
}
diff --git a/Application/Admin/View/PromoteCompany/promotedataconfigindex.html b/Application/Admin/View/PromoteCompany/promotedataconfigindex.html
new file mode 100644
index 000000000..51e44c5c0
--- /dev/null
+++ b/Application/Admin/View/PromoteCompany/promotedataconfigindex.html
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
业务配置
+
+
+
+
+
+
+
+
+
+
+ 联盟分发订单归属: |
+
+
+
+
+ |
+
+
+ 聚合平台订单归属: |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html
index 438a93554..ee14ed000 100644
--- a/Application/Admin/View/Spend/lists.html
+++ b/Application/Admin/View/Spend/lists.html
@@ -211,7 +211,8 @@
{:encryptStr(get_promote_account($data['promote_id']))}
-->
- {:get_promote_account($data['promote_id'])}
+ {$data['promote_account']}
+
{$data.spend_ip} |
diff --git a/Data/update.sql b/Data/update.sql
index d0563deee..44157231e 100644
--- a/Data/update.sql
+++ b/Data/update.sql
@@ -1567,3 +1567,11 @@ CREATE TABLE `tab_finance_compare_info` (
KEY `pay_way` (`pay_way`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='财务导入对账详情表';
+--新增财务导入对账详情表 zyx 20200417
+ALTER TABLE `tab_spend`
+ADD COLUMN `old_change_promote_id` int(11) NULL DEFAULT 0 COMMENT '修改配置前渠道' AFTER `old_promote_account`,
+ADD COLUMN `old_change_promote_account` varchar(30) NULL COMMENT '修改配置前渠道账号' AFTER `old_change_promote_id`;
+
+ALTER TABLE `tab_deposit`
+ADD COLUMN `old_change_promote_id` int(11) NULL DEFAULT 0 COMMENT '修改配置前渠道' ,
+ADD COLUMN `old_change_promote_account` varchar(30) NULL COMMENT '修改配置前渠道账号' ;
\ No newline at end of file