1 gadu atpakaļ
vecāks
revīzija
427a789fdd

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/dto/store/SpareStoreDTO.java

@@ -24,6 +24,7 @@ import java.util.List;
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = true)
 public class SpareStoreDTO extends BaseDTO implements Serializable {
+    private Integer isSpecial;
     /**
      * 设备名称或者型号,新号或者旧号,用于查询或者筛选
      */

+ 4 - 4
platform-dao/src/main/resources/mapper/store/InStoreFormMapper.xml

@@ -169,8 +169,8 @@
             <if test="typeId != null and typeId != ''">
                 and info.type_id = #{typeId}
             </if>
-            <if test="isSpecial != null and isSpecial != ''">
-                and info.is_special = #{isSpecial}
+            <if test="isSpecial==1 or isSpecial==0">
+                and info.is_special=#{isSpecial}
             </if>
             <if test="producerName != null and producerName != ''">
                 AND producer.name like concat('%',#{producerName},'%')
@@ -368,8 +368,8 @@
                 <if test="typeId != null and typeId != ''">
                     and info.type_id = #{typeId}
                 </if>
-                <if test="isSpecial != null and isSpecial != ''">
-                    and info.is_special = #{isSpecial}
+                <if test="isSpecial==1 or isSpecial==0">
+                    and info.is_special=#{isSpecial}
                 </if>
                 <if test="producerName != null and producerName != ''">
                     AND producer.name like concat('%',#{producerName},'%')

+ 4 - 4
platform-dao/src/main/resources/mapper/store/OutStoreFormMapper.xml

@@ -148,8 +148,8 @@
             <if test="typeId != null and typeId != ''">
                 and info.type_id = #{typeId}
             </if>
-            <if test="isSpecial != null and isSpecial != ''">
-                and info.is_special = #{isSpecial}
+            <if test="isSpecial==1 or isSpecial==0">
+                and info.is_special=#{isSpecial}
             </if>
             <if test="producerName != null and producerName != ''">
                 AND producer.name like concat('%',#{producerName},'%')
@@ -317,8 +317,8 @@
             <if test="typeId != null and typeId != ''">
                 and info.type_id = #{typeId}
             </if>
-            <if test="isSpecial != null and isSpecial != ''">
-                and info.is_special = #{isSpecial}
+            <if test="isSpecial==1 or isSpecial==0">
+                and info.is_special=#{isSpecial}
             </if>
             <if test="producerName != null and producerName != ''">
                 AND producer.name like concat('%',#{producerName},'%')

+ 3 - 1
platform-dao/src/main/resources/mapper/store/SpareStoreMapper.xml

@@ -211,7 +211,9 @@
             <if test="userId != null and userId != ''">
                 and store.user_id = #{userId}
             </if>
-
+            <if test="isSpecial==1 or isSpecial==0">
+                and spareinfo.is_special=#{isSpecial}
+            </if>
         </where>
         group by spareinfo.id
     </select>