|
@@ -225,10 +225,21 @@ public class ApiAppDeviceLogController {
|
|
|
if (!StringUtils.isEmpty(param)) {
|
|
|
query.addParam(QueryParamExp.like("sn", "%".concat(param.getSn()).concat("%")));
|
|
|
}
|
|
|
+ query.addParam(QueryParamExp.eq("status", 1));
|
|
|
Page<AppDevice> devicePage = appDeviceService.findByParam(query);
|
|
|
|
|
|
devicePage.getContent().forEach(p -> {
|
|
|
+ QueryParam finalQuery = new QueryParam();
|
|
|
+ finalQuery.addParam(QueryParamExp.desc("addTime"));
|
|
|
+ finalQuery.addParam(QueryParamExp.eq("sn", p.getSn()));
|
|
|
+ finalQuery.addParam(QueryParamExp.eq("type", 2));
|
|
|
+ Page<AppDeviceLog> deviceLogPage = deviceLogService.findByParam(query);
|
|
|
+ AppDeviceLog lastDeviceLogPage = new AppDeviceLog();
|
|
|
+ if (!deviceLogPage.isEmpty()) {
|
|
|
+ lastDeviceLogPage = deviceLogPage.getContent().get(0);
|
|
|
+ }
|
|
|
appDeviceService.addImeiTitle(p);
|
|
|
+ p.appendInfo(lastDeviceLogPage);
|
|
|
});
|
|
|
return new ApiPageDTO(null, devicePage);
|
|
|
}
|