图片路径优化

This commit is contained in:
wuweida 2022-05-20 10:15:37 +08:00
parent a863c372fc
commit bd84986e44
2 changed files with 2 additions and 5 deletions

View File

@ -107,9 +107,7 @@ public class EventController {
event.setLatitude(camera.getBigDecimal("latitude"));
event.setLongitude(camera.getBigDecimal("longitude"));
JSONObject image = jsonObject.getJSONObject("image");
String images = image.getString("imageUrl");
String all = images.replaceAll(images.substring(19, 26), "7:8070");
event.setImageUrl(all);
event.setImageUrl(image.getString("imageUrl"));
event.setTaskId(jsonObject.getString("taskId"));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//要转换的时间格式
Date date;

View File

@ -15,7 +15,6 @@ import java.net.URLConnection;
public class FordController {
@GetMapping("components/**")
@ApiOperation("查询所有事件")
public void ford(HttpServletRequest request, HttpServletResponse response)throws Exception{
String imageDomain = "http://10.132.191.48:30080";
@ -45,7 +44,7 @@ public class FordController {
outputStream.write(buffer, 0, len);
len = inputStream.read(buffer);
}
inputStream.close();
}catch(Exception e) {
e.printStackTrace();
}