Преглед на файлове

设备查询增加部门判断

wangyangyang преди 4 години
родител
ревизия
d24ce42114
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      sms_water/src/main/resources/mapper/DeviceMapper.xml

+ 4 - 0
sms_water/src/main/resources/mapper/DeviceMapper.xml

@@ -190,6 +190,10 @@
         <if test="deviceDto.deptOrgId != null and deviceDto.deptOrgId != 0 ">
             and d.DEPT_ORG_ID =#{deviceDto.deptOrgId}
         </if>
+        <if test="deviceDto.deptOrgId == null or deviceDto.deptOrgId == 0 ">
+            and d.DEPT_ORG_ID is null
+        </if>
+
         <if test="deviceDto.enableState != null ">
             and d.ENABLE_STATE =#{deviceDto.enableState}
         </if>