init
This commit is contained in:
@@ -129,12 +129,13 @@ class DeviceStatusRepository extends BaseRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备所有周期列表(操作记录)
|
||||
* 获取设备周期列表(操作记录,限制最多200条避免数据过大)
|
||||
*/
|
||||
public function getAllCyclesByDevice(int $deviceId): \Illuminate\Database\Eloquent\Collection
|
||||
public function getAllCyclesByDevice(int $deviceId, int $limit = 200): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return OpmDsCycle::where('device_id', $deviceId)
|
||||
->orderBy('id', 'desc')
|
||||
->limit($limit)
|
||||
->get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user