| | |
| | | } |
| | | 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::getMsg, param).eq(MqttLog::getType, Constants.ZERO)); |
| | | if(msgCount>0){ |
| | | log.error("mqtt消息订阅==============已消费数据====="+param); |
| | | return; |
| | | } |
| | |
| | | log.setType(Constants.ZERO); |
| | | log.setMsg(param); |
| | | log.setInfo(info); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | log.setMsgId(msgId); |
| | | mqttLogMapper.insert(log); |
| | | } |