Browse Source

供应商主页

huangzhiguo 1 year ago
parent
commit
3d2d02a6cb
1 changed files with 6 additions and 4 deletions
  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