Explorar o código

fix. 剩余补卡次数异常

caozixuan hai 9 meses
pai
achega
da942902bb
Modificáronse 1 ficheiros con 8 adicións e 3 borrados
  1. 8 3
      sop-business/src/main/resources/mapper/TBDingMapper.xml

+ 8 - 3
sop-business/src/main/resources/mapper/TBDingMapper.xml

@@ -403,9 +403,14 @@
             <if test="serviceId != null and serviceId != ''">
                 AND service_id = #{serviceId}
             </if>
-            <if test="sopNo != null and sopNo != ''">
-                AND sop_no = #{sopNo}
-            </if>
+            <choose>
+                <when test="sopNo != null and sopNo != ''">
+                    AND sop_no = #{sopNo}
+                </when>
+                <otherwise>
+                    AND sop_no IS NULL
+                </otherwise>
+            </choose>
         </where>
     </select>
 </mapper>