master
ELF 4 years ago
parent 8224cfb362
commit e94b6418f1

@ -579,6 +579,7 @@ class FinancePromoteController extends AdminController
$isMarketLeader = isMarketLeader();
if ($isMarketLeader) {
$map['promote.admin_id'] = ['gt', 0];
$map['s.market_admin_id'] = ['gt', 0];
}
//获取推广员

@ -43,10 +43,10 @@ class MarketService
M('promote', 'tab_')->where($map)->save(['admin_id' => $toId]);
M('promote', 'tab_')->where(['chain' => ['like', $promote['chain'] . $promote['id'] . '/%']])->save(['admin_id' => $promote['admin_id']]);
$authGroup = M('sys_auth_group')->where(['title'=>'市场总监'])->find();
$authGroup = M('auth_group', 'sys_')->where(['title'=>'市场总监'])->find();
$dataPresident = explode(',', $authGroup['data_president']);
if (!in_array($promote['id'], $dataPresident)) {
M('sys_auth_group')->where(['title'=>'市场总监'])->save(['data_president' => $authGroup['data_president'] . ',' . $promote['id']]);
M('auth_group', 'sys_')->where(['title'=>'市场总监'])->save(['data_president' => $authGroup['data_president'] . ',' . $promote['id']]);
}
}

Loading…
Cancel
Save