diff --git a/application/admin/controller/workers/Worker.php b/application/admin/controller/workers/Worker.php index a44c729..6d72192 100644 --- a/application/admin/controller/workers/Worker.php +++ b/application/admin/controller/workers/Worker.php @@ -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]);