|
@@ -14,6 +14,7 @@ import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
|
|
+import org.springframework.data.domain.PageRequest;
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
@@ -31,7 +32,7 @@ public class DeviceRecordService {
|
|
|
|
|
|
public Result<Page<DeviceRecord>> getDeviceRecordList(DeviceRecord params) {
|
|
public Result<Page<DeviceRecord>> getDeviceRecordList(DeviceRecord params) {
|
|
Specification<DeviceRecord> spec = null;
|
|
Specification<DeviceRecord> spec = null;
|
|
- Pageable pageable = null;
|
|
|
|
|
|
+ Pageable pageable = new PageRequest(0, 10);
|
|
Page<DeviceRecord> page = deviceRecordRepository.findAll(spec, pageable);
|
|
Page<DeviceRecord> page = deviceRecordRepository.findAll(spec, pageable);
|
|
return new Result<>().success(page);
|
|
return new Result<>().success(page);
|
|
}
|
|
}
|