Explorar o código

报警列表报警图片修改

gao.qiang hai 10 meses
pai
achega
8766bca4cd

+ 8 - 1
vehicle-admin/src/main/java/com/ozs/web/controller/accountmanagment/MsgAlarmController.java

@@ -213,7 +213,14 @@ public class MsgAlarmController extends BaseController {
                 List<MsgAlarmExt> list1 = msgAlarmExtService.list(new LambdaQueryWrapper<MsgAlarmExt>().eq(MsgAlarmExt::getAlarmId, o.getAlarmId()));
                 if (!ObjectUtils.isEmpty(list1)) {
                     List<String> collect = list1.stream().map(MsgAlarmExt::getAlarmAttPath).collect(Collectors.toList());
-                    o.setImageUrls(collect);
+                    List<String> stringList=new ArrayList<>();
+                        for (String imageUrl : collect) {
+                            String oldIpAddress = "123.139.243.142";
+                            String newIpAddress = "10.48.36.53";
+                            String replacedUrl = imageUrl.replace(oldIpAddress, newIpAddress);
+                            stringList.add(replacedUrl);
+                        }
+                    o.setImageUrls(stringList);
                 }
                 return o;
             }).collect(Collectors.toList());