log: make sure to log login timestamp

This commit is contained in:
mokurin000
2025-08-02 16:07:58 +08:00
parent fe008cca67
commit 45cba29b23
2 changed files with 6 additions and 5 deletions

View File

@@ -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(),
}