qin 1 jaar geleden
bovenliggende
commit
4a3996cbf6
1 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 5 5
      src/main/resources/mapper/statistics/OrderMapper.xml

+ 5 - 5
src/main/resources/mapper/statistics/OrderMapper.xml

@@ -399,13 +399,13 @@
         )
         where d.yn = 0 and d.type = 1 and d.station_ids != '' and  ${ew.sqlSegment}  ) a
         on d.id = a.id
-        <if test="queryParam.stationIds!=null and queryParam.stationIds.size()>0">
+        where d.yn = 0 and d.type = 1 and d.station_ids != ''
+        <if test="queryParam.stationIds.size()>0">
             and a.stationId in
             <foreach collection="queryParam.stationIds" item="item" separator="," open="(" close=")">
                 #{item}
             </foreach>
         </if>
-        where d.yn = 0 and d.type = 1 and d.station_ids != ''
         and  ${ew.sqlSegment}
         group by d.id) t
     </select>
@@ -420,14 +420,14 @@
         )
         where d.yn = 0 and d.type = 1 and d.station_ids != '' and  ${ew.sqlSegment}  ) a
         on d.id = a.id
-        <if test="queryParam.stationIds!=null and queryParam.stationIds.size()>0">
+        where d.yn = 0 and d.type = 1 and d.station_ids != ''
+        and d.id > #{start}
+        <if test="queryParam.stationIds.size()>0">
             and a.stationId in
             <foreach collection="queryParam.stationIds" item="item" separator="," open="(" close=")">
                 #{item}
             </foreach>
         </if>
-        where d.yn = 0 and d.type = 1 and d.station_ids != ''
-        and d.id > #{start}
         and ${ew.sqlSegment}
         group by d.id
         order by d.id