|
@@ -7,9 +7,9 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.app.service;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.app.dao.DeviceRecordRepository;
|
|
|
import cn.com.qmth.examcloud.app.model.DeviceRecord;
|
|
|
import cn.com.qmth.examcloud.app.model.Result;
|
|
|
-import cn.com.qmth.examcloud.app.dao.DeviceRecordRepository;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -95,8 +95,8 @@ public class DeviceRecordService {
|
|
|
}
|
|
|
if (pageNo < 1) pageNo = 1;
|
|
|
if (pageSize < 1) pageSize = 1;
|
|
|
- Sort sort = Sort.by(Sort.Direction.DESC, "id");
|
|
|
- Pageable pageable = PageRequest.of(pageNo - 1, pageSize, sort);
|
|
|
+ Sort sort = new Sort(Sort.Direction.DESC, "id");
|
|
|
+ Pageable pageable = new PageRequest(pageNo - 1, pageSize, sort);
|
|
|
Page<DeviceRecord> page = deviceRecordRepository.findAll(spec, pageable);
|
|
|
return new Result<>().success(page);
|
|
|
}
|