diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java
index b4611cd3..0c951f7d 100644
--- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java
+++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java
@@ -64,7 +64,11 @@ public class DcEventImportantServiceImpl implements IDcEventImportantService
@Override
public int updateDcEventImportant(DcEventImportant dcEventImportant)
{
- return dcEventImportantMapper.updateDcEventImportant(dcEventImportant);
+ int i = dcEventImportantMapper.updateDcEventImportant(dcEventImportant);
+ if (i < 1){
+ i = dcEventImportantMapper.insertDcEventImportant(dcEventImportant);
+ }
+ return i;
}
/**
diff --git a/zc-business/src/main/resources/mapper/business/DcEventImportantMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventImportantMapper.xml
index 2e61910a..700322c0 100644
--- a/zc-business/src/main/resources/mapper/business/DcEventImportantMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcEventImportantMapper.xml
@@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
chemicals_name = #{chemicalsName},
leakage_level = #{leakageLevel},
- where id = #{id}
+ where event_id = #{eventId}