소스 검색

优化sql2

wangfeng 5 년 전
부모
커밋
9ffd9667e8
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 6
      src/main/resources/mapper/BehospitalInfoMapper.xml

+ 3 - 6
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -2412,9 +2412,8 @@
         WHERE is_deleted = 'N') g
         ON tp.behospitalCode = g.behospital_code
         AND tp.hospitalId = g.hospital_id ) tu
-        where tu.checkStatus is not null
         <if test="checkStatus != null ">
-            and tu.checkStatus = #{checkStatus}
+            where tu.checkStatus = #{checkStatus}
         </if>
     </select>
 
@@ -2581,9 +2580,8 @@
         WHERE is_deleted = 'N') g
         ON tp.behospitalCode = g.behospital_code
         AND tp.hospitalId = g.hospital_id ) tu
-        where tu.checkStatus is not null
         <if test="checkStatus != null ">
-            and tu.checkStatus = #{checkStatus}
+            where tu.checkStatus = #{checkStatus}
         </if>
     </select>
 
@@ -2756,9 +2754,8 @@
         WHERE is_deleted = 'N') g
         ON tp.behospitalCode = g.behospital_code
         AND tp.hospitalId = g.hospital_id ) tu
-        WHERE tu.checkStatus IS NOT NULL
         <if test="checkStatus != null ">
-            and tu.checkStatus = #{checkStatus}
+            where tu.checkStatus = #{checkStatus}
         </if>
     </select>