shudonghui 1 年之前
父節點
當前提交
fb1c26dfd0

+ 11 - 3
sop-business/src/main/resources/mapper/SysDeviceMapper.xml

@@ -24,10 +24,18 @@
             <if test="bound != null and bound != ''">
                 and a.bound = #{bound}
             </if>
-            <if test="enable != null and enable != ''">
-                and a.enable = #{enable}
-            </if>
 
+
+            <if test="enable != null">
+                <choose>
+                    <when test="enable">
+                        and a.enable =1
+                    </when>
+                    <otherwise>
+                        and a.enable = 0
+                    </otherwise>
+                </choose>
+            </if>
         </where>
         order by a.create_time desc
     </select>

+ 9 - 1
sop-business/src/main/resources/mapper/SysDingGroupMapper.xml

@@ -35,8 +35,16 @@
             <if test="status != null">
                 AND t.status = #{status}
             </if>
+
             <if test="faceOpen != null">
-                AND a.face_open = #{faceOpen}
+                <choose>
+                    <when test="faceOpen">
+                        AND a.face_open = 1
+                    </when>
+                    <otherwise>
+                        AND a.face_open = 0
+                    </otherwise>
+                </choose>
             </if>
             <if test="createStartTime != null and createStartTime != '' ">
                 <![CDATA[