|
@@ -205,15 +205,10 @@ class Wlps extends Base
|
|
|
|
|
|
// 初始化运送用户信息
|
|
|
public function initYsUser(){
|
|
|
- $rolesids = [];
|
|
|
- $list = Db::name('roles')
|
|
|
- ->whereLike('mode','%'.'182868')
|
|
|
+ $rolesids = Db::name('roles')
|
|
|
->where('org_id',$this->orgId)
|
|
|
->where('enable',1)
|
|
|
- ->column('roles_id');
|
|
|
- foreach ($list as $kk=>$vv){
|
|
|
- $rolesids[] = $vv['roles_id'];
|
|
|
- }
|
|
|
+ ->column('id');
|
|
|
if($rolesids){
|
|
|
$map[] = $this->whereIn('ur.roles_id',$rolesids);
|
|
|
}else{
|
|
@@ -222,11 +217,11 @@ class Wlps extends Base
|
|
|
$map = $map?$map:true;
|
|
|
$users = Db::name('user_roles')
|
|
|
->alias('ur')
|
|
|
- ->field('u.user_id,u.real_name,u.mobile')
|
|
|
- ->join('user as u','u.user_id = ur.user_id')
|
|
|
- ->join('roles as r','ur.roles_id = r.roles_id')
|
|
|
+ ->field('u.id,u.real_name,u.mobile')
|
|
|
+ ->join('user as u','u.id = ur.user_id')
|
|
|
+ ->join('roles as r','ur.roles_id = r.id')
|
|
|
->where('u.enable',1)
|
|
|
- ->where('u.del_ref',0)
|
|
|
+ ->where('u.del',0)
|
|
|
->where($map)
|
|
|
->select();
|
|
|
$users = $users?$users:[];
|