Merge pull request '优化订单换绑到江息' (#217) from feature/finance_payment_20210115 into release

优化订单换绑到江息
master
陈志 4 years ago
commit b4277c2276

@ -253,13 +253,21 @@ class SubSpendController extends ThinkController
if(!isset($_REQUEST['ids']) || !isset($_REQUEST['company_id']) ) $this->error("参数错误"); if(!isset($_REQUEST['ids']) || !isset($_REQUEST['company_id']) ) $this->error("参数错误");
$ids = $_REQUEST['ids']; $ids = $_REQUEST['ids'];
$company_id = $_REQUEST['company_id']; $company_id = $_REQUEST['company_id'];
//获取会长及adminid if($company_id == 0){
$promote = M("promote","tab_")->field("id,account,admin_id")->where("company_id = '{$company_id}' and level = '1' and status = '1'")->find(); $saveData = [
$saveData = [ "promote_id"=>0,
"promote_id"=>$promote['id'], "promote_account"=>'官方渠道',
"promote_account"=>$promote['account'], "market_admin_id"=>0,
"market_admin_id"=>$promote['admin_id'], ];
]; }else{
//获取会长及adminid
$promote = M("promote","tab_")->field("id,account,admin_id")->where("company_id = '{$company_id}' and level = '1' and status = '1'")->find();
$saveData = [
"promote_id"=>$promote['id'],
"promote_account"=>$promote['account'],
"market_admin_id"=>$promote['admin_id'],
];
}
$where = [ $where = [
"id"=>['in',$ids] "id"=>['in',$ids]
]; ];
@ -310,8 +318,7 @@ class SubSpendController extends ThinkController
} }
//获取所有公司 //获取所有公司
$promoteCompany = M('promote_company','tab_')->field('id, company_name as name')->where(['status' => 1])->select(); $promoteCompany = M('promote_company','tab_')->field('id, company_name as name')->where(['status' => 1])->select();
array_unshift($promoteCompany,['id'=>0,'name'=>C('OFFICIEL_CHANNEL')]);
$this->assign('promoteCompany', $promoteCompany); $this->assign('promoteCompany', $promoteCompany);
$this->assign('data', $sendData); $this->assign('data', $sendData);
$this->assign('ids', $ids); $this->assign('ids', $ids);

Loading…
Cancel
Save