From 2e1766b31e889d9ee54d433476d031220dfda294 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期日, 27 四月 2025 17:46:24 +0800 Subject: [PATCH] 处理异常报错 --- ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/AuthorizeMsgService.java | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/AuthorizeMsgService.java b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/AuthorizeMsgService.java index 2610ad1..1a8c358 100644 --- a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/AuthorizeMsgService.java +++ b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/AuthorizeMsgService.java @@ -1,6 +1,7 @@ package com.ruoyi.dataInterchange.server; import com.alibaba.fastjson.JSON; +import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.dataInterchange.dao.UPAuthorizeMsgStartupDao; import com.ruoyi.dataInterchange.model.UPAuthorizeMsgStartup; import com.ruoyi.dataInterchange.util.jtt809.packet.common.OuterPacket; @@ -40,9 +41,11 @@ byte[] body = out.getBody(); ByteBuf byteBuf = Unpooled.wrappedBuffer(body); UPAuthorizeMsgStartup startup = new UPAuthorizeMsgStartup().decode(byteBuf); - log.info("主链路视频时效口令上报:" + JSON.toJSONString(startup)); + log.info("视频时效口令上报:" + JSON.toJSONString(startup)); startup.setInferiorPlatformId(out.getGnsscenterId()); startup.setCreateTime(LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8))); - upAuthorizeMsgStartupDao.save(startup); + if(StringUtils.isNotEmpty(startup.getAuthorizeCode1())){ + upAuthorizeMsgStartupDao.save(startup); + } } } -- Gitblit v1.7.1