From 24aeee2fe7b76c7e9a8731f7bef93b48a47da17f Mon Sep 17 00:00:00 2001
From: lyfO_o <764716047@qq.com>
Date: 星期二, 26 四月 2022 15:53:38 +0800
Subject: [PATCH] up

---
 src/main/java/com/nanometer/smartlab/dao/DangerousEncodeMapper.xml |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/nanometer/smartlab/dao/DangerousEncodeMapper.xml b/src/main/java/com/nanometer/smartlab/dao/DangerousEncodeMapper.xml
index 703c10a..57c3513 100644
--- a/src/main/java/com/nanometer/smartlab/dao/DangerousEncodeMapper.xml
+++ b/src/main/java/com/nanometer/smartlab/dao/DangerousEncodeMapper.xml
@@ -298,6 +298,7 @@
   </select>
   <select id="selectByCodeAndName" resultType="com.nanometer.smartlab.entity.DangerousEncode">
     select
+    id,
       container_number containerNumber, reagent_code reagentCode, reagent_name reagentName, cas, memo, property, feature, avoid,
       status, fire, random, code, update_time, creator, count
     from sys_dangerous_encode
@@ -310,7 +311,7 @@
         and reagent_name =  #{reagentname}
       </if>
       <if test="cas != null and cas != ''">
-        and cas = #{cas}
+        and cas like concat("%",#{cas},"%")
       </if>
       <if test="code != null and code != ''">
         and code = #{code}
@@ -328,7 +329,7 @@
             and reagent_name like concat("%",#{reagentname},"%")
         </if>
         <if test="cas != null and cas != ''">
-            and cas = #{cas}
+            and cas like concat("%",#{cas},"%")
         </if>
     </where>
   </select>
@@ -344,4 +345,11 @@
           </if>
       </where>
   </select>
+  <select id="selectById" resultType="com.nanometer.smartlab.entity.DangerousEncode">
+    select
+    id,container_number containerNumber, reagent_code reagentCode, reagent_name reagentName, cas, memo,
+      property, feature, avoid, status, fire, random, code, update_time, creator, count
+    from sys_dangerous_encode
+    where id = #{id}
+  </select>
 </mapper>

--
Gitblit v1.9.2