update
This commit is contained in:
parent
d9aecf8cea
commit
e1f6cd3317
|
@ -128,7 +128,7 @@ class LandController extends BaseApiController
|
|||
$historyList[]['value'] = $valueRow;
|
||||
}
|
||||
|
||||
$list[] = compact('alarmCount', 'historyList');
|
||||
$list[$type] = compact('alarmCount', 'historyList');
|
||||
}
|
||||
|
||||
return $this->success('成功', compact('list'));
|
||||
|
@ -137,13 +137,17 @@ class LandController extends BaseApiController
|
|||
// 土地列表
|
||||
public function landList()
|
||||
{
|
||||
$list = Land::where(function ($query) {
|
||||
$list = Land::alias('l')->field('l.*,d.video_url')->join('land_product lp', 'lp.land_id=l.id')
|
||||
->join('product_device pd', 'lp.product_id=pd.product_id')
|
||||
->join('device d', 'pd.device_id=d.id')
|
||||
->where(function ($query) {
|
||||
if ($this->streetCode != '') {
|
||||
$query->where('l.town_code', $this->streetCode);
|
||||
} else {
|
||||
$query->where('l.county_code', $this->areaCode);
|
||||
}
|
||||
})->select();
|
||||
return $this->success('成功', compact('list'));
|
||||
}
|
||||
|
||||
public function centralCount()
|
||||
|
|
Loading…
Reference in New Issue