优化公会查看

master
chenzhi 3 years ago
parent 5ccda517b3
commit 822894ea17

@ -2889,13 +2889,15 @@ function isMarketLeader()
if(IS_SUBSITE){
return false;
}
$authGroup = M('auth_group','sys_')->where(['title'=>'市场总监'])->find();
if (!$authGroup) {
return false;
$gid = session('user_group_id');
$markerGroup = A("Market","Event")->isMarketAdminGroup($gid);
if($markerGroup){
if($markerGroup['department_level'] == A("Market","Event")->getConfig("DirectorLevel")){
//总监
return true;
}
}
$userAuth = session('user_auth');
$adminIds = M('auth_group_access', 'sys_')->where(['group_id' => $authGroup['id']])->getField('uid', true);
return in_array($userAuth['uid'], $adminIds);
return false;
}
function isMarketAdmin()

@ -42,20 +42,20 @@ class FinancePromoteController extends AdminController
$senddata = [];
//获取各会长的充值方式
$cash = self::getJoinPromoteData([],$istimeselect);
$cash = $this->getJoinPromoteData([],$istimeselect);
foreach($cash as $k=>$v){
$senddata[$v['p_id']] = $v;
}
$unsenddata = [];
$uncash = self::getJoinUnPayPromoteData([],$istimeselect);
$uncash = $this->getJoinUnPayPromoteData([],$istimeselect);
foreach($uncash as $k=>$v){
$unsenddata[$v['p_id']] = $v;
}
//内冲
$inside = self::getJoinPromoteData([],$istimeselect,"promote_coin");
$inside = $this->getJoinPromoteData([],$istimeselect,"promote_coin");
foreach($inside as $k=>$v){
if(array_key_exists($v['p_id'],$senddata)){
$senddata[$v['p_id']]['inside_cash_count']= $v['pay_amount']-$v['back_amount'];
@ -113,7 +113,7 @@ class FinancePromoteController extends AdminController
unset($_REQUEST['company_id']);
unset($_REQUEST['company_belong']);
$_REQUEST['promote_id'] = 0;
$gfcash = self::getJoinPromoteData([],$istimeselect);
$gfcash = $this->getJoinPromoteData([],$istimeselect);
$senddata[0] = $gfcash[0];
$pmap['status']=1;
@ -256,7 +256,8 @@ class FinancePromoteController extends AdminController
}
$isMarketLeader = isMarketLeader();
if ($isMarketLeader) {
$map['promote.admin_id'] = ['gt', 0];
$marketPromoteIds = getPowerPromoteIds();
$map['_string'] = "s.promote_id in ($marketPromoteIds)";
}
if (!empty(I('develop_type'))) {
@ -340,7 +341,8 @@ class FinancePromoteController extends AdminController
}
$isMarketLeader = isMarketLeader();
if ($isMarketLeader) {
$map['promote.admin_id'] = ['gt', 0];
$marketPromoteIds = getPowerPromoteIds();
$map['_string'] = "s.promote_id in ($marketPromoteIds)";
}
if (!empty(I('develop_type'))) {

Loading…
Cancel
Save