|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.ozs.common.core.controller.BaseController;
|
|
import com.ozs.common.core.controller.BaseController;
|
|
import com.ozs.common.utils.AppendUtils;
|
|
import com.ozs.common.utils.AppendUtils;
|
|
|
|
+import com.ozs.common.utils.StringUtils;
|
|
import com.ozs.service.entity.BaseCameraManagement;
|
|
import com.ozs.service.entity.BaseCameraManagement;
|
|
import com.ozs.service.entity.MsgAlarm;
|
|
import com.ozs.service.entity.MsgAlarm;
|
|
import com.ozs.service.entity.vo.MsgAlarmResp;
|
|
import com.ozs.service.entity.vo.MsgAlarmResp;
|
|
@@ -70,12 +71,14 @@ public class WebSocketConteoller extends BaseController {
|
|
msgAlarmResp.setAlarmTime(msgAlarm.getAlarmTime() != null ? msgAlarm.getAlarmTime() : new Date());
|
|
msgAlarmResp.setAlarmTime(msgAlarm.getAlarmTime() != null ? msgAlarm.getAlarmTime() : new Date());
|
|
// 图片
|
|
// 图片
|
|
ArrayList<String> objects = new ArrayList<>();
|
|
ArrayList<String> objects = new ArrayList<>();
|
|
- String[] split = msgAlarm.getImageUrl().split(";");
|
|
|
|
- for (String s : split) {
|
|
|
|
- s = imgUrl + s;
|
|
|
|
- objects.add(s);
|
|
|
|
|
|
+ if (!StringUtils.isEmpty(msgAlarm.getImageUrl())) {
|
|
|
|
+ String[] split = msgAlarm.getImageUrl().split(";");
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ s = imgUrl + s;
|
|
|
|
+ objects.add(s);
|
|
|
|
+ }
|
|
|
|
+ msgAlarmResp.setImageUrls(objects);
|
|
}
|
|
}
|
|
- msgAlarmResp.setImageUrls(objects);
|
|
|
|
// 推送消息reqMsgAlarmVo
|
|
// 推送消息reqMsgAlarmVo
|
|
webSocketServer.sendMoreMessage(list, objStr(msgAlarmResp));
|
|
webSocketServer.sendMoreMessage(list, objStr(msgAlarmResp));
|
|
|
|
|