|
@@ -21,10 +21,10 @@ class User extends Base
|
|
|
if($post['level']!=0) $where[]=['level','=',$post['level']];
|
|
|
if($post['itemid']!=0) $where[]=['accountItem.itemid','=',$post['itemid']];
|
|
|
$list=$this->model->with(['accountItem'=>['itemName'],'company_relaton'])
|
|
|
- ->withJoin(['userInfo',"accountItem"],'left')
|
|
|
+ ->withJoin(['userInfo',"account_item"],'left')
|
|
|
->where($where)->order('account.id asc')
|
|
|
->paginate(['list_rows'=>$post['size'],'page'=>$post['page']]);
|
|
|
- $list->hidden(['userInfo','password','salt','accountItem']);
|
|
|
+ $list->hidden(['userInfo','password','salt','account_item','accountItem']);
|
|
|
return success('获取成功',['list'=>$list->items(),'count'=>$list->total()]);
|
|
|
}
|
|
|
|
|
@@ -38,10 +38,10 @@ class User extends Base
|
|
|
public function userChange(){
|
|
|
$param =$this->request->param([
|
|
|
'id'=>"",
|
|
|
- 'nickname'=>'',
|
|
|
- 'mobile'=>'',
|
|
|
- 'level'=>'',
|
|
|
- 'status'=>''],'post','trim');
|
|
|
+ 'nickname',
|
|
|
+ 'mobile',
|
|
|
+ 'level',
|
|
|
+ 'status'],'post','trim');
|
|
|
$valid = Validate::rule([
|
|
|
"id|账户id"=>"require|number|gt:0",
|
|
|
"nickname|账户名称"=>"max:255",
|