| | |
| | | } |
| | | MqttLog mqttLog = new MqttLog(); |
| | | mqttLog.setMsgId(msgId); |
| | | if(mqttLogMapper.selectCount(new QueryWrapper<MqttLog>().lambda().eq(MqttLog::getMsgId, msgId)) >0){ |
| | | int msgCount =mqttLogMapper.selectCount(new QueryWrapper<MqttLog>().lambda().eq(MqttLog::getMsgId, msgId)); |
| | | if(msgCount>0){ |
| | | log.error("mqtt消息订阅==============已消费数据====="+param); |
| | | return; |
| | | } |
| | |
| | | log.info("mqtt消息订阅=========还车==========成功"); |
| | | } |
| | | }catch (BusinessException e){ |
| | | e.printStackTrace(); |
| | | logInfo = "mqtt消息订阅错误==="+e.getMessage(); |
| | | result =1; |
| | | }catch (Exception e){ |
| | | logInfo = "mqtt消息订阅异常==="; |
| | | e.printStackTrace(); |
| | | logInfo = "mqtt消息订阅异常==="+e.getMessage(); |
| | | result =1; |
| | | } |
| | | createSubLog(topic,msgId,logId,result,param,logInfo); |
| | |
| | | log.setType(Constants.ZERO); |
| | | log.setMsg(param); |
| | | log.setInfo(info); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | log.setMsgId(msgId); |
| | | mqttLogMapper.insert(log); |
| | | } |