图片路径优化
This commit is contained in:
parent
a863c372fc
commit
bd84986e44
|
@ -107,9 +107,7 @@ public class EventController {
|
||||||
event.setLatitude(camera.getBigDecimal("latitude"));
|
event.setLatitude(camera.getBigDecimal("latitude"));
|
||||||
event.setLongitude(camera.getBigDecimal("longitude"));
|
event.setLongitude(camera.getBigDecimal("longitude"));
|
||||||
JSONObject image = jsonObject.getJSONObject("image");
|
JSONObject image = jsonObject.getJSONObject("image");
|
||||||
String images = image.getString("imageUrl");
|
event.setImageUrl(image.getString("imageUrl"));
|
||||||
String all = images.replaceAll(images.substring(19, 26), "7:8070");
|
|
||||||
event.setImageUrl(all);
|
|
||||||
event.setTaskId(jsonObject.getString("taskId"));
|
event.setTaskId(jsonObject.getString("taskId"));
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//要转换的时间格式
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//要转换的时间格式
|
||||||
Date date;
|
Date date;
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.net.URLConnection;
|
||||||
public class FordController {
|
public class FordController {
|
||||||
|
|
||||||
@GetMapping("components/**")
|
@GetMapping("components/**")
|
||||||
@ApiOperation("查询所有事件")
|
|
||||||
public void ford(HttpServletRequest request, HttpServletResponse response)throws Exception{
|
public void ford(HttpServletRequest request, HttpServletResponse response)throws Exception{
|
||||||
|
|
||||||
String imageDomain = "http://10.132.191.48:30080";
|
String imageDomain = "http://10.132.191.48:30080";
|
||||||
|
@ -45,7 +44,7 @@ public class FordController {
|
||||||
outputStream.write(buffer, 0, len);
|
outputStream.write(buffer, 0, len);
|
||||||
len = inputStream.read(buffer);
|
len = inputStream.read(buffer);
|
||||||
}
|
}
|
||||||
|
inputStream.close();
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue