正在显示
5 个修改的文件
包含
294 行增加
和
37 行删除
| @@ -63,8 +63,8 @@ public class IotProduct implements Serializable | @@ -63,8 +63,8 @@ public class IotProduct implements Serializable | ||
| 63 | @ApiModelProperty("是否需要同步数据库(0否,1是)") | 63 | @ApiModelProperty("是否需要同步数据库(0否,1是)") |
| 64 | private Integer is_sync_db; | 64 | private Integer is_sync_db; |
| 65 | 65 | ||
| 66 | - @ApiModelProperty("需要同步数据库的名称") | ||
| 67 | - private String sync_db; | 66 | + @ApiModelProperty("数据库同步服务") |
| 67 | + private Integer sync_db; | ||
| 68 | 68 | ||
| 69 | @ApiModelProperty("解析服务") | 69 | @ApiModelProperty("解析服务") |
| 70 | private Integer analysis_clas; // varchar(100) DEFAULT 'com.zhonglai.luhui.device.protocol.factory.analysis.DefaultProtocolParserFactoryImpl' COMMENT '解析服务', | 70 | private Integer analysis_clas; // varchar(100) DEFAULT 'com.zhonglai.luhui.device.protocol.factory.analysis.DefaultProtocolParserFactoryImpl' COMMENT '解析服务', |
| @@ -96,11 +96,11 @@ public class IotProduct implements Serializable | @@ -96,11 +96,11 @@ public class IotProduct implements Serializable | ||
| 96 | this.is_sync_db = is_sync_db; | 96 | this.is_sync_db = is_sync_db; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | - public String getSync_db() { | 99 | + public Integer getSync_db() { |
| 100 | return sync_db; | 100 | return sync_db; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | - public void setSync_db(String sync_db) { | 103 | + public void setSync_db(Integer sync_db) { |
| 104 | this.sync_db = sync_db; | 104 | this.sync_db = sync_db; |
| 105 | } | 105 | } |
| 106 | public void setCreate_time(Integer create_time) | 106 | public void setCreate_time(Integer create_time) |
| 1 | package com.zhonglai.luhui.device.domain; | 1 | package com.zhonglai.luhui.device.domain; |
| 2 | 2 | ||
| 3 | -import com.ruoyi.common.annotation.PublicSQLConfig; | 3 | +import com.ruoyi.common.annotation.Excel; |
| 4 | import io.swagger.annotations.ApiModel; | 4 | import io.swagger.annotations.ApiModel; |
| 5 | import io.swagger.annotations.ApiModelProperty; | 5 | import io.swagger.annotations.ApiModelProperty; |
| 6 | - | ||
| 7 | -import java.io.Serializable; | ||
| 8 | - | 6 | +import com.ruoyi.common.annotation.PublicSQLConfig; |
| 7 | +import com.ruoyi.common.tool.BaseEntity; | ||
| 8 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 9 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 产品解析插件包对象 iot_protocol_class | ||
| 13 | + * | ||
| 14 | + * @author 钟来 | ||
| 15 | + * @date 2024-06-13 | ||
| 16 | + */ | ||
| 9 | @ApiModel("产品解析插件包") | 17 | @ApiModel("产品解析插件包") |
| 10 | -public class IotProtocolClass implements Serializable { | 18 | +public class IotProtocolClass extends BaseEntity |
| 19 | +{ | ||
| 11 | @PublicSQLConfig(isSelect=false) | 20 | @PublicSQLConfig(isSelect=false) |
| 12 | private static final long serialVersionUID = 1L; | 21 | private static final long serialVersionUID = 1L; |
| 13 | - @ApiModelProperty("主键id") | ||
| 14 | - private Integer id; | ||
| 15 | 22 | ||
| 16 | - @ApiModelProperty("创建时间") | ||
| 17 | - private String create_time; | 23 | + /** 主键 */ |
| 24 | + @ApiModelProperty("主键") | ||
| 25 | + private Integer id; | ||
| 18 | 26 | ||
| 27 | + /** 类型(1解析协议,2清洗协议,3数据库同步服务) */ | ||
| 19 | @ApiModelProperty("类型(1解析协议,2清洗协议,3数据库同步服务)") | 28 | @ApiModelProperty("类型(1解析协议,2清洗协议,3数据库同步服务)") |
| 20 | private Integer type; | 29 | private Integer type; |
| 21 | 30 | ||
| 31 | + /** 名称 */ | ||
| 22 | @ApiModelProperty("名称") | 32 | @ApiModelProperty("名称") |
| 23 | private String name; | 33 | private String name; |
| 24 | 34 | ||
| 35 | + /** 模型举例 */ | ||
| 25 | @ApiModelProperty("模型举例") | 36 | @ApiModelProperty("模型举例") |
| 26 | private String case_model; | 37 | private String case_model; |
| 27 | 38 | ||
| 39 | + /** 类名 */ | ||
| 28 | @ApiModelProperty("类名") | 40 | @ApiModelProperty("类名") |
| 29 | private String classname; | 41 | private String classname; |
| 30 | 42 | ||
| 31 | - public Integer getId() { | ||
| 32 | - return id; | ||
| 33 | - } | 43 | + /** 创建时间 */ |
| 44 | + @ApiModelProperty("创建时间") | ||
| 45 | + private String create_time; | ||
| 34 | 46 | ||
| 35 | - public void setId(Integer id) { | 47 | + public void setId(Integer id) |
| 48 | + { | ||
| 36 | this.id = id; | 49 | this.id = id; |
| 37 | } | 50 | } |
| 38 | 51 | ||
| 39 | - public String getCreate_time() { | ||
| 40 | - return create_time; | 52 | + public Integer getId() |
| 53 | + { | ||
| 54 | + return id; | ||
| 41 | } | 55 | } |
| 42 | - | ||
| 43 | - public void setCreate_time(String create_time) { | ||
| 44 | - this.create_time = create_time; | 56 | + public void setType(Integer type) |
| 57 | + { | ||
| 58 | + this.type = type; | ||
| 45 | } | 59 | } |
| 46 | 60 | ||
| 47 | - public Integer getType() { | 61 | + public Integer getType() |
| 62 | + { | ||
| 48 | return type; | 63 | return type; |
| 49 | } | 64 | } |
| 50 | - | ||
| 51 | - public void setType(Integer type) { | ||
| 52 | - this.type = type; | 65 | + public void setName(String name) |
| 66 | + { | ||
| 67 | + this.name = name; | ||
| 53 | } | 68 | } |
| 54 | 69 | ||
| 55 | - public String getName() { | 70 | + public String getName() |
| 71 | + { | ||
| 56 | return name; | 72 | return name; |
| 57 | } | 73 | } |
| 58 | - | ||
| 59 | - public void setName(String name) { | ||
| 60 | - this.name = name; | 74 | + public void setCase_model(String case_model) |
| 75 | + { | ||
| 76 | + this.case_model = case_model; | ||
| 61 | } | 77 | } |
| 62 | 78 | ||
| 63 | - public String getCase_model() { | 79 | + public String getCase_model() |
| 80 | + { | ||
| 64 | return case_model; | 81 | return case_model; |
| 65 | } | 82 | } |
| 66 | - | ||
| 67 | - public void setCase_model(String case_model) { | ||
| 68 | - this.case_model = case_model; | 83 | + public void setClassname(String classname) |
| 84 | + { | ||
| 85 | + this.classname = classname; | ||
| 69 | } | 86 | } |
| 70 | 87 | ||
| 71 | - public String getClassname() { | 88 | + public String getClassname() |
| 89 | + { | ||
| 72 | return classname; | 90 | return classname; |
| 73 | } | 91 | } |
| 92 | + public void setCreate_time(String create_time) | ||
| 93 | + { | ||
| 94 | + this.create_time = create_time; | ||
| 95 | + } | ||
| 74 | 96 | ||
| 75 | - public void setClassname(String classname) { | ||
| 76 | - this.classname = classname; | 97 | + public String getCreate_time() |
| 98 | + { | ||
| 99 | + return create_time; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + @Override | ||
| 103 | + public String toString() { | ||
| 104 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 105 | + .append("id", getId()) | ||
| 106 | + .append("type", getType()) | ||
| 107 | + .append("name", getName()) | ||
| 108 | + .append("case_model", getCase_model()) | ||
| 109 | + .append("classname", getClassname()) | ||
| 110 | + .append("create_time", getCreate_time()) | ||
| 111 | + .toString(); | ||
| 77 | } | 112 | } |
| 78 | } | 113 | } |
| 1 | +package com.zhonglai.luhui.device.mapper; | ||
| 2 | + | ||
| 3 | +import com.zhonglai.luhui.device.domain.IotProtocolClass; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 产品解析插件包Mapper接口 | ||
| 9 | + * | ||
| 10 | + * @author 钟来 | ||
| 11 | + * @date 2024-06-13 | ||
| 12 | + */ | ||
| 13 | +public interface IotProtocolClassMapper | ||
| 14 | +{ | ||
| 15 | + /** | ||
| 16 | + * 查询产品解析插件包 | ||
| 17 | + * | ||
| 18 | + * @param id 产品解析插件包主键 | ||
| 19 | + * @return 产品解析插件包 | ||
| 20 | + */ | ||
| 21 | + public IotProtocolClass selectIotProtocolClassById(Integer id); | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 查询产品解析插件包列表 | ||
| 25 | + * | ||
| 26 | + * @param iotProtocolClass 产品解析插件包 | ||
| 27 | + * @return 产品解析插件包集合 | ||
| 28 | + */ | ||
| 29 | + public List<IotProtocolClass> selectIotProtocolClassList(IotProtocolClass iotProtocolClass); | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 新增产品解析插件包 | ||
| 33 | + * | ||
| 34 | + * @param iotProtocolClass 产品解析插件包 | ||
| 35 | + * @return 结果 | ||
| 36 | + */ | ||
| 37 | + public int insertIotProtocolClass(IotProtocolClass iotProtocolClass); | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 修改产品解析插件包 | ||
| 41 | + * | ||
| 42 | + * @param iotProtocolClass 产品解析插件包 | ||
| 43 | + * @return 结果 | ||
| 44 | + */ | ||
| 45 | + public int updateIotProtocolClass(IotProtocolClass iotProtocolClass); | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 删除产品解析插件包 | ||
| 49 | + * | ||
| 50 | + * @param id 产品解析插件包主键 | ||
| 51 | + * @return 结果 | ||
| 52 | + */ | ||
| 53 | + public int deleteIotProtocolClassById(Integer id); | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 批量删除产品解析插件包 | ||
| 57 | + * | ||
| 58 | + * @param ids 需要删除的数据主键集合 | ||
| 59 | + * @return 结果 | ||
| 60 | + */ | ||
| 61 | + public int deleteIotProtocolClassByIds(Integer[] ids); | ||
| 62 | +} |
| 1 | +package com.zhonglai.luhui.device.service; | ||
| 2 | + | ||
| 3 | +import com.zhonglai.luhui.device.domain.IotProtocolClass; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 产品解析插件包Service接口 | ||
| 9 | + * | ||
| 10 | + * @author 钟来 | ||
| 11 | + * @date 2024-06-13 | ||
| 12 | + */ | ||
| 13 | +public interface IIotProtocolClassService | ||
| 14 | +{ | ||
| 15 | + /** | ||
| 16 | + * 查询产品解析插件包 | ||
| 17 | + * | ||
| 18 | + * @param id 产品解析插件包主键 | ||
| 19 | + * @return 产品解析插件包 | ||
| 20 | + */ | ||
| 21 | + public IotProtocolClass selectIotProtocolClassById(Integer id); | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 查询产品解析插件包列表 | ||
| 25 | + * | ||
| 26 | + * @param iotProtocolClass 产品解析插件包 | ||
| 27 | + * @return 产品解析插件包集合 | ||
| 28 | + */ | ||
| 29 | + public List<IotProtocolClass> selectIotProtocolClassList(IotProtocolClass iotProtocolClass); | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 新增产品解析插件包 | ||
| 33 | + * | ||
| 34 | + * @param iotProtocolClass 产品解析插件包 | ||
| 35 | + * @return 结果 | ||
| 36 | + */ | ||
| 37 | + public int insertIotProtocolClass(IotProtocolClass iotProtocolClass); | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 修改产品解析插件包 | ||
| 41 | + * | ||
| 42 | + * @param iotProtocolClass 产品解析插件包 | ||
| 43 | + * @return 结果 | ||
| 44 | + */ | ||
| 45 | + public int updateIotProtocolClass(IotProtocolClass iotProtocolClass); | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 批量删除产品解析插件包 | ||
| 49 | + * | ||
| 50 | + * @param ids 需要删除的产品解析插件包主键集合 | ||
| 51 | + * @return 结果 | ||
| 52 | + */ | ||
| 53 | + public int deleteIotProtocolClassByIds(Integer[] ids); | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 删除产品解析插件包信息 | ||
| 57 | + * | ||
| 58 | + * @param id 产品解析插件包主键 | ||
| 59 | + * @return 结果 | ||
| 60 | + */ | ||
| 61 | + public int deleteIotProtocolClassById(Integer id); | ||
| 62 | +} |
| 1 | +package com.zhonglai.luhui.device.service.impl; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import com.zhonglai.luhui.device.domain.IotProtocolClass; | ||
| 6 | +import com.zhonglai.luhui.device.mapper.IotProtocolClassMapper; | ||
| 7 | +import com.zhonglai.luhui.device.service.IIotProtocolClassService; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 产品解析插件包Service业务层处理 | ||
| 13 | + * | ||
| 14 | + * @author 钟来 | ||
| 15 | + * @date 2024-06-13 | ||
| 16 | + */ | ||
| 17 | +@Service | ||
| 18 | +public class IotProtocolClassServiceImpl implements IIotProtocolClassService | ||
| 19 | +{ | ||
| 20 | + @Autowired | ||
| 21 | + private IotProtocolClassMapper iotProtocolClassMapper; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 查询产品解析插件包 | ||
| 25 | + * | ||
| 26 | + * @param id 产品解析插件包主键 | ||
| 27 | + * @return 产品解析插件包 | ||
| 28 | + */ | ||
| 29 | + @Override | ||
| 30 | + public IotProtocolClass selectIotProtocolClassById(Integer id) | ||
| 31 | + { | ||
| 32 | + return iotProtocolClassMapper.selectIotProtocolClassById(id); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 查询产品解析插件包列表 | ||
| 37 | + * | ||
| 38 | + * @param iotProtocolClass 产品解析插件包 | ||
| 39 | + * @return 产品解析插件包 | ||
| 40 | + */ | ||
| 41 | + @Override | ||
| 42 | + public List<IotProtocolClass> selectIotProtocolClassList(IotProtocolClass iotProtocolClass) | ||
| 43 | + { | ||
| 44 | + return iotProtocolClassMapper.selectIotProtocolClassList(iotProtocolClass); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 新增产品解析插件包 | ||
| 49 | + * | ||
| 50 | + * @param iotProtocolClass 产品解析插件包 | ||
| 51 | + * @return 结果 | ||
| 52 | + */ | ||
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + public int insertIotProtocolClass(IotProtocolClass iotProtocolClass) | ||
| 56 | + { | ||
| 57 | + return iotProtocolClassMapper.insertIotProtocolClass(iotProtocolClass); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 修改产品解析插件包 | ||
| 62 | + * | ||
| 63 | + * @param iotProtocolClass 产品解析插件包 | ||
| 64 | + * @return 结果 | ||
| 65 | + */ | ||
| 66 | + | ||
| 67 | + @Override | ||
| 68 | + public int updateIotProtocolClass(IotProtocolClass iotProtocolClass) | ||
| 69 | + { | ||
| 70 | + return iotProtocolClassMapper.updateIotProtocolClass(iotProtocolClass); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 批量删除产品解析插件包 | ||
| 75 | + * | ||
| 76 | + * @param ids 需要删除的产品解析插件包主键 | ||
| 77 | + * @return 结果 | ||
| 78 | + */ | ||
| 79 | + | ||
| 80 | + @Override | ||
| 81 | + public int deleteIotProtocolClassByIds(Integer[] ids) | ||
| 82 | + { | ||
| 83 | + return iotProtocolClassMapper.deleteIotProtocolClassByIds(ids); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 删除产品解析插件包信息 | ||
| 88 | + * | ||
| 89 | + * @param id 产品解析插件包主键 | ||
| 90 | + * @return 结果 | ||
| 91 | + */ | ||
| 92 | + | ||
| 93 | + @Override | ||
| 94 | + public int deleteIotProtocolClassById(Integer id) | ||
| 95 | + { | ||
| 96 | + return iotProtocolClassMapper.deleteIotProtocolClassById(id); | ||
| 97 | + } | ||
| 98 | +} |
-
请 注册 或 登录 后发表评论