Skip to content

Commit

Permalink
SQL微調整
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyKitten committed Dec 2, 2024
1 parent 10e7e24 commit 0a33790
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions stationapi/src/infrastructure/station_repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@ impl InternalStationRepository {
)
WHERE
s.line_cd = l.line_cd
ORDER BY s.e_sort, s.station_cd
),
sst_cte_c1 AS (
SELECT
Expand Down Expand Up @@ -1104,7 +1105,7 @@ impl InternalStationRepository {
LEFT JOIN `types` AS tt ON tt.type_cd = sst.type_cd
LEFT JOIN `line_aliases` AS la ON la.station_cd = sta.station_cd
LEFT JOIN `aliases` AS a ON la.alias_cd = a.id
LEFT JOIN `lines` AS lin ON lin.line_cd = sta.line_cd
JOIN `lines` AS lin ON lin.line_cd = sta.line_cd
WHERE
sta.station_cd = sst.station_cd
AND sta.e_status = 0
Expand Down Expand Up @@ -1158,9 +1159,6 @@ impl InternalStationRepository {
WHERE
sst.line_group_cd IS NULL
AND sta.e_status = 0
ORDER BY
sta.e_sort,
sta.station_cd
)",
from_station_id,
to_station_id,
Expand Down

0 comments on commit 0a33790

Please sign in to comment.