作者 潘浩文
1 个管道 的构建 通过 耗费 4 秒

XIAOPAN

... ... @@ -36,7 +36,10 @@ class AdminUsersController extends AdminBaseController{
$users=new UsersModel();
$data=$users->where($where)->order('create_time','desc')->paginate(10)->each(function ($item) {
if ($item['is_use']==1){
$item['eq']=Db::name('order')->where(['users_id'=>$item['id'],'state'=>1])->find()['eq_name'];
$item['eq']=Db::name('order')
->alias('o')
->join('equipment e','o.eq_name=e.name')
->where(['o.users_id'=>$item['id'],'o.state'=>1])->find()['serial_number'];
}
return $item;
});
... ...