mqtt配置修改

This commit is contained in:
2025-11-11 10:37:04 +08:00
parent 43edc47aaa
commit 5381cd597c
4 changed files with 135 additions and 30 deletions

View File

@ -14,7 +14,6 @@ import com.xzzn.common.annotation.Excel;
public class EmsMqttTopicConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
@ -22,13 +21,21 @@ public class EmsMqttTopicConfig extends BaseEntity
@Excel(name = "订阅topic")
private String mqttTopic;
/** QoS等级0/1/2 */
@Excel(name = "QoS等级", readConverterExp = "0=/1/2")
private Integer qos;
/** topic描述 */
@Excel(name = "topic描述")
private String topicName;
/** 对应方法 */
@Excel(name = "对应方法")
private String method;
private String handleMethod;
/** 处理器类型:(device=设备数据system=系统状态alarm=告警数据等) */
@Excel(name = "处理器类型:(device=设备数据system=系统状态alarm=告警数据等)")
private String handleType;
/** 站点id */
@Excel(name = "站点id")
@ -54,6 +61,16 @@ public class EmsMqttTopicConfig extends BaseEntity
return mqttTopic;
}
public void setQos(Integer qos)
{
this.qos = qos;
}
public Integer getQos()
{
return qos;
}
public void setTopicName(String topicName)
{
this.topicName = topicName;
@ -64,14 +81,24 @@ public class EmsMqttTopicConfig extends BaseEntity
return topicName;
}
public void setMethod(String method)
public void setHandleMethod(String handleMethod)
{
this.method = method;
this.handleMethod = handleMethod;
}
public String getMethod()
public String getHandleMethod()
{
return method;
return handleMethod;
}
public void setHandleType(String handleType)
{
this.handleType = handleType;
}
public String getHandleType()
{
return handleType;
}
public void setSiteId(String siteId)
@ -89,8 +116,10 @@ public class EmsMqttTopicConfig extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("mqttTopic", getMqttTopic())
.append("qos", getQos())
.append("topicName", getTopicName())
.append("method", getMethod())
.append("handleMethod", getHandleMethod())
.append("handleType", getHandleType())
.append("siteId", getSiteId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())

View File

@ -58,4 +58,7 @@ public interface EmsMqttTopicConfigMapper
* @return 结果
*/
public int deleteEmsMqttTopicConfigByIds(Long[] ids);
// 判断topic是否存在
public String checkTopicIsExist(String strategyTopic);
}