Selaa lähdekoodia

报警接口修改

gao.qiang 5 kuukautta sitten
vanhempi
commit
3f966f1a6d

+ 7 - 0
vehicle-admin/src/main/java/com/ozs/web/controller/accountmanagment/MsgAlarmController.java

@@ -77,6 +77,8 @@ public class MsgAlarmController extends BaseController {
     private BaseTerminalService baseTerminalService;
     @Autowired
     private CameraUtil cameraUtil;
+    @Resource
+    private MsgAlarmExtService msgAlarmExtService;
 
     /**
      * web更多消息-总数,已读数
@@ -208,6 +210,11 @@ public class MsgAlarmController extends BaseController {
                     String name = stringBuilder.toString();
                     o.setTrainNumName(name.substring(0, stringBuilder.lastIndexOf(",")));
                 }
+                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);
+                }
                 return o;
             }).collect(Collectors.toList());
             page.setRecords(dto1);