Repository navigation
feat(H): GET /customer/rides 乘客歷史行程列表(留言板入口補遺後端) - #39
Merged
Merged
Conversation
乘客端原本沒有「我的行程」列表,chat 入口只綁在進行中行程/協尋單。 加此端點讓乘客能列出過去行程、對有司機的行程事後聯絡(開對話)。 - repo ListRecentByCustomer:LEFT JOIN drivers 取 driver_name(無司機為 null,前端據此決定是否顯示「聯絡司機」);id DESC;limit 預設 20、 硬上限 MaxListRows;只回本人(呼叫端已由 CustomerAuth 綁 customerID) - CustomerRideRow:id/status/上下車地址/時間/車資/driver_id/driver_name - service RideQueryService.ListRecentByCustomer 委派 repo - handler HistoryByCustomer;route GET /customer/rides(與既有 /active、/:id 共存,gin 靜態優先,無衝突——runtime 啟動已驗) - 整合測試:只回本人、新到舊、有司機帶名/車資、無司機不帶、limit go build/vet 通過;repo 整合測試綠;runtime 造單→GET 回傳正確。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
乘客端原本沒有「我的行程」列表,聊天入口只綁在進行中行程/協尋單。加此端點讓乘客能列出過去行程、對有司機的行程事後聯絡(開對話)——對應 App 端「留言板入口補遺」。
改動
repo.ListRecentByCustomer:LEFT JOIN drivers 取driver_name(無司機為 null,前端據此決定是否顯示「聯絡司機」);id DESC;limit 預設 20、硬上限MaxListRows;只回本人(呼叫端已由CustomerAuth綁 customerID)CustomerRideRow:id/status/上下車地址/時間/車資/driver_id/driver_nameservice.RideQueryService.ListRecentByCustomer委派 repohandler.HistoryByCustomer;routeGET /customer/rides(與既有/active、/:id共存,gin 靜態優先,無衝突)驗收
go build/go vet通過GET /customer/rides回傳正確欄位🤖 Generated with Claude Code