@ -541,9 +541,16 @@ class PromoteController extends ThinkController
'title' => '渠道注册',
'title' => '渠道注册',
'template_list' =>'ch_reg_list',
'template_list' =>'ch_reg_list',
);
);
$total=D($model['m_name'])->join('tab_promote ON tab_user.promote_id = tab_promote.id')->where(array('tab_user.promote_id'=>array('neq',0),'puid'=>0))->count();
$ttotal=D($model['m_name'])->join('tab_promote ON tab_user.promote_id = tab_promote.id')->where('register_time'.total(1))->where(array('tab_user.promote_id'=>array('neq',0),'puid'=>0))->count();
$map2['register_time'] = total(1, false);
$ytotal=D($model['m_name'])->join('tab_promote ON tab_user.promote_id = tab_promote.id')->where('register_time'.total(5))->where(array('tab_user.promote_id'=>array('neq',0),'puid'=>0))->count();
$map3['register_time'] = total(5, false);
//为数据权限添加
setPowerPromoteIds($map1);
setPowerPromoteIds($map2);
setPowerPromoteIds($map3);
$total = D($model['m_name'])->join('tab_promote ON tab_user.promote_id = tab_promote.id')->where($map1)->count();
$ttotal=D($model['m_name'])->join('tab_promote ON tab_user.promote_id = tab_promote.id')->where($map2)->where(array('tab_user.promote_id'=>array('neq',0),'puid'=>0))->count();
$ytotal=D($model['m_name'])->join('tab_promote ON tab_user.promote_id = tab_promote.id')->where($map3)->where(array('tab_user.promote_id'=>array('neq',0),'puid'=>0))->count();
$this->assign('total', $total);
$this->assign('total', $total);
$this->assign('ttotal', $ttotal);
$this->assign('ttotal', $ttotal);
$this->assign('ytotal', $ytotal);
$this->assign('ytotal', $ytotal);
@ -670,11 +677,19 @@ class PromoteController extends ThinkController