Merge branch 'dev_permission' of 47.111.118.107:/srv/git/platform into dev_permission

master
chenzhi 5 years ago
commit 047458d770

@ -541,9 +541,16 @@ class PromoteController extends ThinkController
'title' => '渠道注册',
'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();
$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();
$map1 = array('tab_user.promote_id'=>array('neq',0),'puid'=>0);
$map2['register_time'] = total(1, false);
$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('ttotal', $ttotal);
$this->assign('ytotal', $ytotal);
@ -672,9 +679,17 @@ class PromoteController extends ThinkController
);
$map1 = $map;
$map1['pay_status']=1;
$map2 = [
'pay_status' => 1,
'promote_id' => ["gt", 0],
];
//为数据权限添加
setPowerPromoteIds($map2);
$total = null_to_0(D('Spend')->where($map1)->sum('pay_amount'));
$ttotal=null_to_0(D('Spend')->where('pay_time'.total(1))->where(array('pay_status'=>1))->where(array('promote_id'=>array("gt",0)))->sum('pay_amount'));
$ytotal=null_to_0(D('Spend')->where('pay_time'.total(5))->where(array('pay_status'=>1))->where(array('promote_id'=>array("gt",0)))->sum('pay_amount'));
$ttotal = null_to_0(D('Spend')->where('pay_time'.total(1))->where($map2)->sum('pay_amount'));
$ytotal = null_to_0(D('Spend')->where('pay_time'.total(5))->where($map2)->sum('pay_amount'));
$this->assign('total', $total);
$this->assign('ttotal', $ttotal);
$this->assign('ytotal', $ytotal);
@ -746,9 +761,12 @@ class PromoteController extends ThinkController
setPowerPromoteIds($map);
$map1 = $map;
$map1['pay_status'] = 1;
$map2 = array('pay_status'=>1);
setPowerPromoteIds($map2);
$total = D('Agent')->field('sum(amount) amount,sum(real_amount) real_amount')->where($map1)->find();
$ttotal=D('Agent')->field('sum(amount) amount,sum(real_amount) real_amount')->where('create_time'.total(1))->where(array('pay_status'=>1))->find();
$ytotal=D('Agent')->field('sum(amount) amount,sum(real_amount) real_amount')->where('create_time'.total(5))->where(array('pay_status'=>1))->find();
$ttotal = D('Agent')->field('sum(amount) amount,sum(real_amount) real_amount')->where('create_time'.total(1))->where($map2)->find();
$ytotal = D('Agent')->field('sum(amount) amount,sum(real_amount) real_amount')->where('create_time'.total(5))->where($map2)->find();
$this->assign('total', $total);
$this->assign('ttotal', $ttotal);
$this->assign('ytotal', $ytotal);

@ -75,6 +75,7 @@ class PublicController extends \Think\Controller
if (is_login()) {
D('Member')->logout();
session('[destroy]');
session('user_auth_promote_ids');
cookie('think_language', Null);
// $this->success('退出成功!', U('login'));
$this->ajaxReturn(array('status' => 1, 'msg' => '退出成功!'));

Loading…
Cancel
Save