为旅拍 OTG 上传增加 client_photo_id,并按服务端已登记 ID 同步本地上传状态。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-16 19:13:19 +08:00
co-authored by Cursor
parent 3d5ad8a614
commit b019e1e494
11 changed files with 323 additions and 115 deletions
@@ -32,6 +32,9 @@ protocol TravelAlbumServing {
/// 上传并登记旅拍相册素材。
func uploadMaterial(_ request: TravelAlbumUploadMaterialRequest) async throws -> TravelAlbumMaterial
/// 拉取相册内已登记素材的客户端照片 ID。
func materialClientPhotoIds(userEquityTravelId: Int) async throws -> TravelAlbumMaterialClientPhotoIDsResponse
/// 删除旅拍相册。
func deleteAlbum(id: Int) async throws
@@ -115,6 +118,19 @@ final class TravelAlbumAPI: TravelAlbumServing {
try await client.send(APIRequest(method: .post, path: "\(basePath)/upload-material", body: request))
}
/// 拉取相册内已登记素材的客户端照片 ID。
func materialClientPhotoIds(userEquityTravelId: Int) async throws -> TravelAlbumMaterialClientPhotoIDsResponse {
try await client.send(
APIRequest(
method: .get,
path: "\(basePath)/material-client-photo-ids",
queryItems: [
URLQueryItem(name: "user_equity_travel_id", value: String(userEquityTravelId)),
]
)
)
}
/// 删除旅拍相册。
func deleteAlbum(id: Int) async throws {
let _: EmptyPayload = try await client.send(