验收5-mqtt配置
This commit is contained in:
@ -9,7 +9,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 站点topic配置对象 ems_mqtt_topic_config
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-10-21
|
||||
* @date 2025-11-06
|
||||
*/
|
||||
public class EmsMqttTopicConfig extends BaseEntity
|
||||
{
|
||||
@ -18,14 +18,22 @@ public class EmsMqttTopicConfig extends BaseEntity
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private String siteId;
|
||||
|
||||
/** 订阅topic */
|
||||
@Excel(name = "订阅topic")
|
||||
private String mqttTopic;
|
||||
|
||||
/** topic描述 */
|
||||
@Excel(name = "topic描述")
|
||||
private String topicName;
|
||||
|
||||
/** 对应方法 */
|
||||
@Excel(name = "对应方法")
|
||||
private String method;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private String siteId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -36,16 +44,6 @@ public class EmsMqttTopicConfig extends BaseEntity
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setMqttTopic(String mqttTopic)
|
||||
{
|
||||
this.mqttTopic = mqttTopic;
|
||||
@ -56,12 +54,44 @@ public class EmsMqttTopicConfig extends BaseEntity
|
||||
return mqttTopic;
|
||||
}
|
||||
|
||||
public void setTopicName(String topicName)
|
||||
{
|
||||
this.topicName = topicName;
|
||||
}
|
||||
|
||||
public String getTopicName()
|
||||
{
|
||||
return topicName;
|
||||
}
|
||||
|
||||
public void setMethod(String method)
|
||||
{
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getMethod()
|
||||
{
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("siteId", getSiteId())
|
||||
.append("mqttTopic", getMqttTopic())
|
||||
.append("topicName", getTopicName())
|
||||
.append("method", getMethod())
|
||||
.append("siteId", getSiteId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsMqttTopicConfig;
|
||||
|
||||
/**
|
||||
* 站点topic配置Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-11-06
|
||||
*/
|
||||
public interface EmsMqttTopicConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询站点topic配置
|
||||
*
|
||||
* @param id 站点topic配置主键
|
||||
* @return 站点topic配置
|
||||
*/
|
||||
public EmsMqttTopicConfig selectEmsMqttTopicConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询站点topic配置列表
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 站点topic配置集合
|
||||
*/
|
||||
public List<EmsMqttTopicConfig> selectEmsMqttTopicConfigList(EmsMqttTopicConfig emsMqttTopicConfig);
|
||||
|
||||
/**
|
||||
* 新增站点topic配置
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsMqttTopicConfig(EmsMqttTopicConfig emsMqttTopicConfig);
|
||||
|
||||
/**
|
||||
* 修改站点topic配置
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsMqttTopicConfig(EmsMqttTopicConfig emsMqttTopicConfig);
|
||||
|
||||
/**
|
||||
* 删除站点topic配置
|
||||
*
|
||||
* @param id 站点topic配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttTopicConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除站点topic配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttTopicConfigByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsMqttTopicConfig;
|
||||
|
||||
/**
|
||||
* 站点topic配置Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-11-06
|
||||
*/
|
||||
public interface IEmsMqttTopicConfigService
|
||||
{
|
||||
/**
|
||||
* 查询站点topic配置
|
||||
*
|
||||
* @param id 站点topic配置主键
|
||||
* @return 站点topic配置
|
||||
*/
|
||||
public EmsMqttTopicConfig selectEmsMqttTopicConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询站点topic配置列表
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 站点topic配置集合
|
||||
*/
|
||||
public List<EmsMqttTopicConfig> selectEmsMqttTopicConfigList(EmsMqttTopicConfig emsMqttTopicConfig);
|
||||
|
||||
/**
|
||||
* 新增站点topic配置
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsMqttTopicConfig(EmsMqttTopicConfig emsMqttTopicConfig);
|
||||
|
||||
/**
|
||||
* 修改站点topic配置
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsMqttTopicConfig(EmsMqttTopicConfig emsMqttTopicConfig);
|
||||
|
||||
/**
|
||||
* 批量删除站点topic配置
|
||||
*
|
||||
* @param ids 需要删除的站点topic配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttTopicConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除站点topic配置信息
|
||||
*
|
||||
* @param id 站点topic配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttTopicConfigById(Long id);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xzzn.ems.mapper.EmsMqttTopicConfigMapper;
|
||||
import com.xzzn.ems.domain.EmsMqttTopicConfig;
|
||||
import com.xzzn.ems.service.IEmsMqttTopicConfigService;
|
||||
|
||||
/**
|
||||
* 站点topic配置Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-11-06
|
||||
*/
|
||||
@Service
|
||||
public class EmsMqttTopicConfigServiceImpl implements IEmsMqttTopicConfigService
|
||||
{
|
||||
@Autowired
|
||||
private EmsMqttTopicConfigMapper emsMqttTopicConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询站点topic配置
|
||||
*
|
||||
* @param id 站点topic配置主键
|
||||
* @return 站点topic配置
|
||||
*/
|
||||
@Override
|
||||
public EmsMqttTopicConfig selectEmsMqttTopicConfigById(Long id)
|
||||
{
|
||||
return emsMqttTopicConfigMapper.selectEmsMqttTopicConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点topic配置列表
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 站点topic配置
|
||||
*/
|
||||
@Override
|
||||
public List<EmsMqttTopicConfig> selectEmsMqttTopicConfigList(EmsMqttTopicConfig emsMqttTopicConfig)
|
||||
{
|
||||
return emsMqttTopicConfigMapper.selectEmsMqttTopicConfigList(emsMqttTopicConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点topic配置
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsMqttTopicConfig(EmsMqttTopicConfig emsMqttTopicConfig)
|
||||
{
|
||||
emsMqttTopicConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return emsMqttTopicConfigMapper.insertEmsMqttTopicConfig(emsMqttTopicConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点topic配置
|
||||
*
|
||||
* @param emsMqttTopicConfig 站点topic配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsMqttTopicConfig(EmsMqttTopicConfig emsMqttTopicConfig)
|
||||
{
|
||||
emsMqttTopicConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsMqttTopicConfigMapper.updateEmsMqttTopicConfig(emsMqttTopicConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除站点topic配置
|
||||
*
|
||||
* @param ids 需要删除的站点topic配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsMqttTopicConfigByIds(Long[] ids)
|
||||
{
|
||||
return emsMqttTopicConfigMapper.deleteEmsMqttTopicConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点topic配置信息
|
||||
*
|
||||
* @param id 站点topic配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsMqttTopicConfigById(Long id)
|
||||
{
|
||||
return emsMqttTopicConfigMapper.deleteEmsMqttTopicConfigById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user