sth
This commit is contained in:
parent
3fb6925a8f
commit
d4aea44afc
|
|
@ -126,8 +126,6 @@ class Worker extends Backend
|
|||
if(trim($arr[1])){
|
||||
$filter['end_time'] = trim($arr[1]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//派单表
|
||||
|
|
@ -139,7 +137,7 @@ class Worker extends Backend
|
|||
|
||||
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
|
||||
$list = $this->model->alias('fa_worker')
|
||||
->with(['area'])
|
||||
->with(['area','items'])
|
||||
->field([
|
||||
'fa_worker.*',
|
||||
'IFNULL(a.dispatch_count, 0) AS dispatch_count',
|
||||
|
|
|
|||
|
|
@ -62,4 +62,12 @@ class Worker extends BaseModel
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 定义通过中间表与 roles 表的一对多关系
|
||||
public function items()
|
||||
{
|
||||
return $this->hasManyThrough(Item::class, WorkerItem::class, 'worker_id', 'item_id', 'id', 'id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user