ソースを参照

修改字段名

zgg 1 ヶ月 前
コミット
f4d1092da1
1 ファイル変更6 行追加11 行削除
  1. 6 11
      application/common/model/Wlps.php

+ 6 - 11
application/common/model/Wlps.php

@@ -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:[];