-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from Enraged-Dun-Cookie-Development-Team/feat…
…-修改版本cdn问题 Feat 修改版本cdn问题
- Loading branch information
Showing
18 changed files
with
347 additions
and
127 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
40 changes: 0 additions & 40 deletions
40
http_service/ceobe_operation/release_version_service/src/handlers/common.rs
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "page_next_id" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
serde.workspace = true | ||
mongodb.workspace = true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod response; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
use _private::NextIdTrait; | ||
use mongodb::bson::oid::ObjectId; | ||
use serde::Serialize; | ||
|
||
#[derive(Debug, Serialize)] | ||
pub struct ListWithNextId<T, N> | ||
where | ||
T: Serialize, | ||
N: Serialize + NextIdTrait, | ||
{ | ||
list: Vec<T>, | ||
next_id: Option<N>, | ||
} | ||
|
||
mod _private { | ||
pub trait NextIdTrait {} | ||
} | ||
|
||
pub trait GenerateListWithNextId<N>: IntoIterator | ||
where | ||
Self::Item: Serialize, | ||
N: Serialize + NextIdTrait, | ||
{ | ||
fn with_page_next_id_info( | ||
self, next_id: Option<N>, | ||
) -> ListWithNextId<Self::Item, N>; | ||
} | ||
|
||
impl<N, T> GenerateListWithNextId<N> for T | ||
where | ||
T: IntoIterator, | ||
T::Item: Serialize, | ||
N: Serialize + NextIdTrait, | ||
{ | ||
fn with_page_next_id_info( | ||
self, next_id: Option<N>, | ||
) -> ListWithNextId<Self::Item, N> { | ||
ListWithNextId { | ||
list: self.into_iter().collect(), | ||
next_id, | ||
} | ||
} | ||
} | ||
|
||
// 支持成为NextId的类型 | ||
impl NextIdTrait for ObjectId {} | ||
impl NextIdTrait for String {} |
This file contains 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
This file contains 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
Oops, something went wrong.