feat(ids): 实现基于Snowflake的分布式ID生成功能
新增rs-snowflake依赖并实现分布式ID生成工具 在utils模块中添加ids子模块,提供业务ID生成与解析功能 替换原有UUID生成方式为分布式ID生成器
This commit is contained in:
@ -17,7 +17,7 @@ pub struct CreateLogInput {
|
||||
|
||||
pub async fn create(db: &Db, input: CreateLogInput) -> anyhow::Result<i64> {
|
||||
let am = request_log::ActiveModel {
|
||||
id: Default::default(),
|
||||
id: Set(crate::utils::generate_request_log_id()),
|
||||
path: Set(input.path),
|
||||
method: Set(input.method),
|
||||
request_params: Set(input.request_params),
|
||||
|
||||
Reference in New Issue
Block a user