|
|
@ -205,13 +205,14 @@ class OldCountController extends \Think\Controller
|
|
|
|
public function promoteCompanyBelongInit()
|
|
|
|
public function promoteCompanyBelongInit()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//获取所有公司
|
|
|
|
//获取所有公司
|
|
|
|
$comoany = M("PromoteCompany","tab_")->field("id,company_belong")->select();
|
|
|
|
$comoany = M("PromoteCompany","tab_")->field("id,company_belong,develop_type")->select();
|
|
|
|
$comoany[] = ["id"=>0,"company_belong"=>0]; //海南万盟
|
|
|
|
$comoany[] = ["id"=>0,"company_belong"=>0,"develop_type"=>0]; //海南万盟
|
|
|
|
$count = count($comoany);
|
|
|
|
$count = count($comoany);
|
|
|
|
$promote = M("Promote","tab_");
|
|
|
|
$promote = M("Promote","tab_");
|
|
|
|
for ($i=0; $i < $count; $i++) {
|
|
|
|
for ($i=0; $i < $count; $i++) {
|
|
|
|
$savedata = array(
|
|
|
|
$savedata = array(
|
|
|
|
"company_belong"=>$comoany[$i]['company_belong']
|
|
|
|
"company_belong"=>$comoany[$i]['company_belong'],
|
|
|
|
|
|
|
|
"company_relation"=>$comoany[$i]['develop_type'],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$tmpid = $comoany[$i]['id'];
|
|
|
|
$tmpid = $comoany[$i]['id'];
|
|
|
|
$promote->where("company_id ='{$tmpid}'")->save($savedata);
|
|
|
|
$promote->where("company_id ='{$tmpid}'")->save($savedata);
|
|
|
|