forked from dyf/fys-Multi-tenant
feat(device): 新增设备类型查询与设备添加功能
- 在AppDeviceXinghanController中新增查询所有设备类型接口 - 实现新增设备功能,包含设备MAC和IMEI唯一性校验- 添加设备类型权限验证逻辑 - 完善设备绑定状态和主题设置 - 在DeviceXinghanBizService中实现设备分配记录保存 - 优化文件批量插入逻辑,支持是否批量删除历史数据- 增加文件删除功能,支持根据ID列表删除业务文件 - 缩短MQTT消息去重时间窗口至3秒 - 在设备维修记录查询条件中增加维修人员模糊查询- 调整设备消息发送数据顺序,单位名称移至首位
This commit is contained in:
@ -64,7 +64,7 @@ public class XinghanBootLogoRule implements MqttMessageRule {
|
||||
|
||||
// --- 去重 START ---
|
||||
String dedupKey = "xd:MSG:LOGO:" + ctx.getDeviceImei() + ":" + respText;
|
||||
boolean first = RedisUtils.setObjectIfAbsent(dedupKey, "1", Duration.ofSeconds(10));
|
||||
boolean first = RedisUtils.setObjectIfAbsent(dedupKey, "1", Duration.ofSeconds(3));
|
||||
if (!first) {
|
||||
log.warn("重复消息丢弃 {}", dedupKey);
|
||||
return;
|
||||
|
||||
@ -57,7 +57,7 @@ public class XinghanSendAlarmMessageRule implements MqttMessageRule {
|
||||
log.info("设备上报紧急通知握手: {} ", respText);
|
||||
// --- 去重 START ---
|
||||
String dedupKey = "xd:ALARM:dedup:" + ctx.getDeviceImei() + ":" + respText;
|
||||
boolean first = RedisUtils.setObjectIfAbsent(dedupKey, "1", Duration.ofSeconds(10));
|
||||
boolean first = RedisUtils.setObjectIfAbsent(dedupKey, "1", Duration.ofSeconds(3));
|
||||
if (!first) {
|
||||
log.warn("重复消息丢弃 {}", dedupKey);
|
||||
return;
|
||||
|
||||
@ -57,7 +57,7 @@ public class XinghanSendMsgRule implements MqttMessageRule {
|
||||
|
||||
// --- 去重 START ---
|
||||
String dedupKey = "xd:MSG:dedup:" + ctx.getDeviceImei() + ":" + respText;
|
||||
boolean first = RedisUtils.setObjectIfAbsent(dedupKey, "1", Duration.ofSeconds(10));
|
||||
boolean first = RedisUtils.setObjectIfAbsent(dedupKey, "1", Duration.ofSeconds(3));
|
||||
if (!first) {
|
||||
log.warn("重复消息丢弃 {}", dedupKey);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user