feat: 首页接口调整
This commit is contained in:
parent
0f0e5a467d
commit
7ace9cc65c
|
|
@ -14,5 +14,8 @@ class Order extends Model
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function area()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\app\admin\model\Area::class,'area_id', 'area_code');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@ class OrderDispatchService extends BaseService
|
||||||
{
|
{
|
||||||
return $this->getOrderDispatchModel()
|
return $this->getOrderDispatchModel()
|
||||||
->with(['orderInfo' => function ($query) {
|
->with(['orderInfo' => function ($query) {
|
||||||
$query->field('id,order_no,item_id,item_title,receive_type,address,lng,lat,plan_time,online_amount,discount_amount');
|
$query->with(['area' => function ($query) {
|
||||||
|
$query->field('id,area_code,merge_name');
|
||||||
|
}])->field('id,order_no,item_id,item_title,receive_type,address,lng,lat,plan_time,online_amount,discount_amount,area_id');
|
||||||
}])
|
}])
|
||||||
->where('status', OrderDispatch::STATUS_TOGET)
|
->where('status', OrderDispatch::STATUS_TOGET)
|
||||||
->where('worker_id', $workerId)
|
->where('worker_id', $workerId)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user