|
|
@ -7,6 +7,7 @@ use app\admin\controller\qingdong\Base; |
|
|
use app\admin\library\Auth; |
|
|
use app\admin\library\Auth; |
|
|
use app\admin\model\AuthGroup; |
|
|
use app\admin\model\AuthGroup; |
|
|
use app\admin\model\AuthGroupAccess; |
|
|
use app\admin\model\AuthGroupAccess; |
|
|
|
|
|
use app\admin\model\MemberGroup; |
|
|
use app\admin\model\MemberGroupAccess; |
|
|
use app\admin\model\MemberGroupAccess; |
|
|
use think\Db; |
|
|
use think\Db; |
|
|
use think\Model; |
|
|
use think\Model; |
|
|
@ -224,7 +225,7 @@ class Staff Extends Model { |
|
|
if(!is_array($l_ids)){ |
|
|
if(!is_array($l_ids)){ |
|
|
$l_ids=explode(',',$l_ids); |
|
|
$l_ids=explode(',',$l_ids); |
|
|
} |
|
|
} |
|
|
$ids=AuthGroup::where(['pid' =>['in',$l_ids]])->column('id'); |
|
|
$ids=MemberGroup::where(['pid' =>['in',$l_ids]])->column('id'); |
|
|
if ($ids) { |
|
|
if ($ids) { |
|
|
$w_ids = self::getLowerId($ids,false); |
|
|
$w_ids = self::getLowerId($ids,false); |
|
|
$ids = array_merge($ids, $w_ids); |
|
|
$ids = array_merge($ids, $w_ids); |
|
|
@ -256,7 +257,7 @@ class Staff Extends Model { |
|
|
case 3://本部门 |
|
|
case 3://本部门 |
|
|
$uids = MemberGroupAccess::where(['group_id' => ['in', $groupIds]])->column('uid'); |
|
|
$uids = MemberGroupAccess::where(['group_id' => ['in', $groupIds]])->column('uid'); |
|
|
$l_ids = self::where([ |
|
|
$l_ids = self::where([ |
|
|
'id' => ['in', $uids], |
|
|
'id' => ['admin_id', $uids], |
|
|
'status' => 1, |
|
|
'status' => 1, |
|
|
// 'id' => ['neq', $staff->id] |
|
|
// 'id' => ['neq', $staff->id] |
|
|
])->column('id'); |
|
|
])->column('id'); |
|
|
@ -265,7 +266,7 @@ class Staff Extends Model { |
|
|
$groupIds = self::getLowerId($groupIds, false); |
|
|
$groupIds = self::getLowerId($groupIds, false); |
|
|
$uids = MemberGroupAccess::where(['group_id' => ['in', $groupIds]])->column('uid'); |
|
|
$uids = MemberGroupAccess::where(['group_id' => ['in', $groupIds]])->column('uid'); |
|
|
$l_ids = self::where([ |
|
|
$l_ids = self::where([ |
|
|
'id' => ['in', $uids], |
|
|
'admin_id' => ['in', $uids], |
|
|
'status' => 1, |
|
|
'status' => 1, |
|
|
// 'id' => ['neq', $staff->id] |
|
|
// 'id' => ['neq', $staff->id] |
|
|
])->column('id'); |
|
|
])->column('id'); |
|
|
@ -274,13 +275,18 @@ class Staff Extends Model { |
|
|
$groupIds = self::getLowerId($groupIds, true); |
|
|
$groupIds = self::getLowerId($groupIds, true); |
|
|
$uids = MemberGroupAccess::where(['group_id' => ['in', $groupIds]])->column('uid'); |
|
|
$uids = MemberGroupAccess::where(['group_id' => ['in', $groupIds]])->column('uid'); |
|
|
$l_ids = self::where([ |
|
|
$l_ids = self::where([ |
|
|
'id' => ['in', $uids], |
|
|
'admin_id' => ['in', $uids], |
|
|
'status' => 1, |
|
|
'status' => 1, |
|
|
// 'id' => ['neq', $staff->id] |
|
|
// 'id' => ['neq', $staff->id] |
|
|
])->column('id'); |
|
|
])->column('id'); |
|
|
break; |
|
|
break; |
|
|
case 6://全部 |
|
|
case 6://全部 |
|
|
$l_ids = Db::where("member_company")->where("cid",CID)->where( 'uid','neq',$staff->id)->column("uid"); |
|
|
$uids = Db::where("member_company")->where("cid",CID)->where( 'uid','neq',$staff->id)->column("uid"); |
|
|
|
|
|
$l_ids = self::where([ |
|
|
|
|
|
'admin_id' => ['in', $uids], |
|
|
|
|
|
'status' => 1, |
|
|
|
|
|
// 'id' => ['neq', $staff->id] |
|
|
|
|
|
])->column('id'); |
|
|
// $l_ids = self::where([ |
|
|
// $l_ids = self::where([ |
|
|
// 'cid'=>CID, |
|
|
// 'cid'=>CID, |
|
|
// 'status' => 1, |
|
|
// 'status' => 1, |
|
|
|