diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwWeb1.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwWeb1.java
index ff6e245..dfb7674 100644
--- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwWeb1.java
+++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwWeb1.java
@@ -32,6 +32,8 @@ public class HwWeb1 extends BaseEntity
private Long deviceId;
+ private Long typeId;
+
public void setWebId(Long webId)
{
this.webId = webId;
@@ -77,6 +79,15 @@ public class HwWeb1 extends BaseEntity
this.deviceId = deviceId;
}
+ public Long getTypeId() {
+ return typeId;
+ }
+
+ public void setTypeId(Long typeId) {
+ this.typeId = typeId;
+ }
+
+
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -85,6 +96,7 @@ public class HwWeb1 extends BaseEntity
.append("webJsonString", getWebJsonString())
.append("webCode", getWebCode())
.append("deviceId", getDeviceId())
+ .append("typeId", getTypeId())
.toString();
}
}
diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java
index cf7b997..61143d6 100644
--- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java
+++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwWebServiceImpl1.java
@@ -72,6 +72,8 @@ public class HwWebServiceImpl1 implements IHwWebService1
HwWeb1 codeWeb = new HwWeb1();
//编号唯一
codeWeb.setWebCode(hwWeb1.getWebCode());
+ codeWeb.setTypeId(hwWeb1.getTypeId());
+ codeWeb.setDeviceId(hwWeb1.getDeviceId());
if(hwWebMapper1.selectHwWebList(codeWeb).isEmpty()){
return hwWebMapper1.insertHwWeb(hwWeb1);
}
diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml
index 2f56147..f4c5020 100644
--- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml
+++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwWebMapper1.xml
@@ -10,11 +10,12 @@
+
select web_id, web_json, web_json_string, web_code,
- device_id
+ device_id,typeId
from hw_web1
@@ -26,6 +27,7 @@
and web_json_string = #{webJsonString}
and web_code = #{webCode}
and device_id = #{deviceId}
+ and typeId = #{typeId}
@@ -41,12 +43,14 @@
web_json_string,
web_code,
device_id,
+ typeId,
#{webJson},
#{webJsonString},
#{webCode},
#{deviceId},
+ #{typeId},
@@ -56,9 +60,12 @@
web_json = #{webJson},
web_json_string = #{webJsonString},
- device_id = #{deviceId},
+
+
where web_code = #{webCode}
+ and device_id = #{deviceId}
+ and typeId = #{typeId}