log: make sure to log login timestamp
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use spdlog::info;
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
@@ -35,12 +36,14 @@ pub struct UserLoginApiResp {
|
||||
}
|
||||
|
||||
impl UserLoginApi {
|
||||
pub fn new(user_id: u32) -> Self {
|
||||
pub fn new(user_id: u32, is_continue: bool) -> Self {
|
||||
let date_time = SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.map(|t| t.as_secs())
|
||||
.unwrap_or_default();
|
||||
|
||||
info!("login unix timestamp: {date_time}");
|
||||
|
||||
// 爱玩星球焦作解放店
|
||||
UserLoginApi {
|
||||
user_id,
|
||||
@@ -48,7 +51,7 @@ impl UserLoginApi {
|
||||
region_id: 13,
|
||||
acsess_code: "".to_owned(),
|
||||
place_id: 3223.to_string(),
|
||||
is_continue: false,
|
||||
is_continue,
|
||||
generic_flag: 0,
|
||||
client_id: "A63E01E6170".into(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user