Commit 8c01cfaa authored by 赵啸非's avatar 赵啸非

添加服务追踪

parent 92d42774
......@@ -25,6 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
......@@ -110,6 +111,7 @@ public class RealTimePeopleStatTaskImpl implements ITaskExcuteService {
//下载最近一天的抓拍数据
RealtimeDataflowQuery realtimeDataflowQuery = new RealtimeDataflowQuery();
realtimeDataflowQuery.setDetectTimeStart(DateUtil.yesterday().toStringDefaultTimeZone());
realtimeDataflowQuery.setDetectTimeEnd(DateUtil.formatDateTime(new Date()));
//realtimeDataflowQuery.setPicture("");
List<RealtimeDataflowEntity> updateList = realtimeDataflowService.find(realtimeDataflowQuery).stream()
.filter(f -> ObjectUtils.isEmpty(f.getPicture()) && !ObjectUtils.isEmpty(f.getPicUri()))
......@@ -122,7 +124,8 @@ public class RealTimePeopleStatTaskImpl implements ITaskExcuteService {
if (!ObjectUtils.isEmpty(bytes)) {
InputStream inputStream = new ByteArrayInputStream(bytes);
MultipartFile file = ServletUtils.getMultipartFile(inputStream, "snap.jpg");
String filePath = uploadService.saveFileUpload(file, "file/fileupload/snap", null);
String filePath = uploadService.saveFileUpload(file, "file/fileupload/snap/" + DateUtil.today(), null);
item.setPicture(filePath);
item.setUpdateTime(new Date());
item.setUpdateUserId(1L);
......@@ -132,7 +135,7 @@ public class RealTimePeopleStatTaskImpl implements ITaskExcuteService {
}
return null;
}).filter(f -> f != null).collect(toList());
log.info("更新列表:{}",updateList.size());
log.info("更新列表:{}", updateList.size());
if (!ObjectUtils.isEmpty(updateList)) {
realtimeDataflowService.update(updateList, null);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment