Sfoglia il codice sorgente

fix: 修改小程序获取航线列表接口

luofeiyun 4 settimane fa
parent
commit
50452258fb

+ 5 - 2
ship-module-resource/ship-module-resource-biz/src/main/resources/mapper/resourceroute/ResourceRouteMapper.xml

@@ -27,7 +27,7 @@
            resource_route rr
                LEFT JOIN resource_dock rd on rr.on_dock_id = rd.id
                LEFT JOIN resource_port rp on rd.port_id = rp.id
-               LEFT JOIN product_voyage pv ON rr.id = pv.route_id
+               LEFT JOIN product_voyage pv ON rr.id = pv.route_id  and pv.start_time > now()
                                                   <if test="reqVo.startDay != null and reqVo.startDay != ''">
                                                       and pv.start_time BETWEEN BETWEEN CONCAT(#{reqVo.startDay},' 00:00:00') and CONCAT(#{reqVo.startDay},' 23:59:59')
                                                   </if>
@@ -43,15 +43,17 @@
                        FROM
                            product_price_voyage ppv
                                LEFT JOIN product_price_room_model pprm ON pprm.object_id = ppv.id
+                       where ppv.deleted = 0 and pprm.deleted = 0
                        ORDER BY
                            pprm.price ASC
                    ) t1
                GROUP BY
                    t1.voyage_id
            ) t2 ON pv.id = t2.voyage_id
+        where rr.deleted = 0 and rd.deleted = 0 and rp.deleted = 0 and pv.deleted = 0 and rs.deleted = 0
        GROUP BY
            rs.id
-      ) t3 where 1=1
+      ) t3 where 1=1 and t3.price is not null
      <if test="reqVo.shipId != null">
       and t3.ship_id = #{reqVo.shipId}
       </if>
@@ -67,6 +69,7 @@
       <if test="reqVo.direction != null">
                   and t3.direction = #{reqVo.direction}
         </if>
+        order by t3.price asc
     </select>