Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

统一版本接口 #200

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open

统一版本接口 #200

wants to merge 33 commits into from

Conversation

Goodjooy
Copy link
Contributor

@Goodjooy Goodjooy commented Jul 4, 2024

统一版本接口

  • 设计统一版本接口结构体
    • 新旧类型转换
  • 旧类型弃用
  • 版本迁移postprepare
  • 统一版本接口设计
  • 旧接口弃用

@Goodjooy Goodjooy marked this pull request as ready for review July 8, 2024 05:25
@Goodjooy Goodjooy requested a review from phidiaLam July 8, 2024 05:25
Copy link
Member

@phidiaLam phidiaLam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先看一点,之后抽时间再看

#[resp_result]
// TODO: 这里把挂载的东西一起带进去可能会好点?
#[instrument(skip_all,fields(version = %arg_2.0))]
pub async fn release_version(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个写到cdn下面,要上腾讯云cdn,然后接一下之前写刷新cdn的接口在逻辑层那些改动的地方

@@ -51,6 +51,6 @@ type OperateResult<T> = Result<T, OperateError>;

impl<'db, Conn> OperationDatabaseOperate<'db, Conn> {
pub fn plugin_version(&self) -> PluginVersionOperate<'_, Conn> {
self.child()
SuperOperate::child(self)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边是为什么要改成这样子写

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边要上cdn,不需要自己搞这个modify cache了吧

Comment on lines +43 to +45
Chrome,
Firefox,
Edge,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边还得加一个叫"其他浏览器",这些是只有zip安装到时候

Comment on lines +51 to +53
let sort = doc! {
"$natural": -1i32
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边改成“_id”可能更好点?nature就是原本mongo文件顺序

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_id 是和时间相关的吗?如果是那也行

Comment on lines +30 to +48
// 找到当前平台的最新的发布版本,与当前添加版本比较。新版本必须更新
let filter = doc! {"platform":to_bson(&release_version.platform)?};
let exist_latest_version = collection
.with_mapping::<VersionOnly>()
.doing(|collection| {
collection.find_one(
filter,
FindOneOptions::builder()
.sort(doc! {"$natural": -1i32})
.projection(doc! {"version":1i32})
.build(),
)
})
.await?;
if let Some(VersionOnly { version }) = exist_latest_version {
if release_version.version <= version {
Err(Error::VersionTooOld(version, release_version.platform))?;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这部分是不是写到verify

Copy link
Member

@phidiaLam phidiaLam Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边可能还要支持一下update delete,update delete支持新表就够了。还有个日志列表,去包含版本、更新内容、平台这些信息,给后端做分页表格查询用,也给前端展示历史更新用

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update delete是声明意思?

  • 什么是表新?
  • 日志列表就是全部历史版本?

.build(),
)
.extend_download_source(
["Chrome", "Edge", "FireFox"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加两个字,商店

)
.add_download_source(
DownloadSourceItem::builder()
.name("ZIP")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加三个字,包下载其他一样

Copy link
Member

@phidiaLam phidiaLam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

然后缺少后台的统一的create update read delete的http接口

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants