From 5f1afdef9f6c0790ee1b11ac0ad020c681d6c9e7 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 31 Jul 2020 17:57:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E5=A2=9E=E4=BC=9A?= =?UTF-8?q?=E9=95=BF=E5=85=B3=E7=B3=BB=E4=B8=8D=E8=B7=9F=E9=9A=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/OldCountController.class.php | 7 ++++--- Application/Admin/Controller/PromoteController.class.php | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/OldCountController.class.php b/Application/Admin/Controller/OldCountController.class.php index ece5601c6..b9bde1856 100644 --- a/Application/Admin/Controller/OldCountController.class.php +++ b/Application/Admin/Controller/OldCountController.class.php @@ -205,13 +205,14 @@ class OldCountController extends \Think\Controller public function promoteCompanyBelongInit() { //获取所有公司 - $comoany = M("PromoteCompany","tab_")->field("id,company_belong")->select(); - $comoany[] = ["id"=>0,"company_belong"=>0]; //海南万盟 + $comoany = M("PromoteCompany","tab_")->field("id,company_belong,develop_type")->select(); + $comoany[] = ["id"=>0,"company_belong"=>0,"develop_type"=>0]; //海南万盟 $count = count($comoany); $promote = M("Promote","tab_"); for ($i=0; $i < $count; $i++) { $savedata = array( - "company_belong"=>$comoany[$i]['company_belong'] + "company_belong"=>$comoany[$i]['company_belong'], + "company_relation"=>$comoany[$i]['develop_type'], ); $tmpid = $comoany[$i]['id']; $promote->where("company_id ='{$tmpid}'")->save($savedata); diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 63e42150e..0fdb2ba6c 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -289,7 +289,10 @@ class PromoteController extends ThinkController $company_belong = $_REQUEST['company_belong'] ?? 0; $company_relation = $_REQUEST['company_relation'] ?? 0; if($company_id && $company_id > 0){ - $company_belong = M("PromoteCompany","tab_")->field("company_belong")->where("id = {$company_id}")->find()['company_belong']; + //新增跟随系统 + $company_info = M("PromoteCompany","tab_")->field("company_belong,develop_type")->where("id = {$company_id}")->find(); + $company_belong = $company_info['company_belong']; + $company_relation = $company_info['develop_type']; } $data = array( 'account'=>$account,