|
|
@@ -180,7 +180,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> |
|
|
|
//查询出对应事件对应的最新三张图片 |
|
|
|
List<TargetData> targetData = targetDataMapper.selectList(Wrappers.<TargetData>lambdaQuery() |
|
|
|
.eq(TargetData::getTargetId, event.getTargetId()) |
|
|
|
.eq(TargetData::getTenantId,CurrentUserUtil.getTenantId()) |
|
|
|
.eq(TargetData::getTenantId, CurrentUserUtil.getTenantId()) |
|
|
|
.orderByDesc(BaseEntity::getCreateTime).last("limit 3")); |
|
|
|
//拼接域名 |
|
|
|
targetData = targetData.stream().map(t -> { |
|
|
@@ -207,7 +207,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> |
|
|
|
} |
|
|
|
//图片集合 |
|
|
|
List<TargetData> targetData = targetDataMapper.selectList(Wrappers.<TargetData>lambdaQuery() |
|
|
|
.eq(TargetData::getTenantId,CurrentUserUtil.getTenantId()) |
|
|
|
.eq(TargetData::getTenantId, CurrentUserUtil.getTenantId()) |
|
|
|
.eq(TargetData::getTargetId, event.getTargetId())); |
|
|
|
List<String> list = new ArrayList<>(); |
|
|
|
//经纬度集合 |
|
|
@@ -217,6 +217,24 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> |
|
|
|
} |
|
|
|
return JsonResult.success(list); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult findLastImg(String eventId) { |
|
|
|
|
|
|
|
Event event = eventMapper.selectById(eventId); |
|
|
|
if (ObjectUtils.isNull(event.getInspectionId())) { |
|
|
|
return JsonResult.error("该事件不存在"); |
|
|
|
} |
|
|
|
//图片集合 |
|
|
|
List<TargetData> targetDataList = targetDataMapper.selectList(Wrappers.<TargetData>lambdaQuery() |
|
|
|
.eq(TargetData::getTenantId, CurrentUserUtil.getTenantId()) |
|
|
|
.eq(TargetData::getTargetId, event.getTargetId()) |
|
|
|
.orderByDesc(BaseEntity::getCreateTime).last("limit 1")); |
|
|
|
TargetData data = targetDataList.get(0); |
|
|
|
data.setImageUrl(CommonConfig.ossURL + data.getImageUrl()); |
|
|
|
|
|
|
|
return JsonResult.success(data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|