派单
This commit is contained in:
parent
0103120071
commit
cf2fa22190
|
|
@ -22,6 +22,7 @@ use think\exception\ValidateException;
|
|||
class Worker extends Backend
|
||||
{
|
||||
|
||||
protected $noNeedRight = ['dispatchList','dispatchMapList'];
|
||||
/**
|
||||
* Worker模型对象
|
||||
* @var \app\admin\model\Worker
|
||||
|
|
@ -283,6 +284,7 @@ class Worker extends Backend
|
|||
|
||||
$build = model('worker')
|
||||
->where('status', 1)
|
||||
->where('type',2)
|
||||
->with(['area'])
|
||||
->withCount(['myorder' => function ($query) {
|
||||
$query->where('status', Order::STATUS_FINISHED);
|
||||
|
|
@ -333,7 +335,7 @@ SELECT id,
|
|||
point(lng, lat),
|
||||
point(?, ?)
|
||||
) AS distance
|
||||
FROM fa_worker where status = 1
|
||||
FROM fa_worker where status = 1 and type = 2
|
||||
) AS t
|
||||
WHERE distance < 50000
|
||||
ORDER BY distance;",[$order->lng,$order->lat]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user