Explorar el Código

供应商主页

huangzhiguo hace 1 año
padre
commit
3d2d02a6cb
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  1. 6 4
      src/main/resources/mapper/OrderSellerMapper.xml

+ 6 - 4
src/main/resources/mapper/OrderSellerMapper.xml

@@ -481,10 +481,12 @@
         <if test="orderState == 5 ">
         <if test="orderState == 5 ">
             AND (orderStatusFlag in (2, 3) or refundStatus in (2, 3)) AND shopStatus not in (0, 4)
             AND (orderStatusFlag in (2, 3) or refundStatus in (2, 3)) AND shopStatus not in (0, 4)
         </if>
         </if>
-        AND userID IN
-        <foreach item="userId" index="index" collection="userIds" open="(" separator="," close=")">
-            #{userId}
-        </foreach>
+          <if test="userIds.size() > 0">
+            AND userID IN
+            <foreach item="userId" index="index" collection="userIds" open="(" separator="," close=")">
+                #{userId}
+            </foreach>
+          </if>
     </select>
     </select>
     <select id="getLastCheckOrderDate" resultType="java.util.Date">
     <select id="getLastCheckOrderDate" resultType="java.util.Date">
         SELECT lastCheckOrderDate
         SELECT lastCheckOrderDate