fix: 移除订单自动确认,仅依赖支付宝回调验签;rsa2_verify 支持裸 base64 DER 公钥;.env 取消 git 跟踪

This commit is contained in:
2026-08-10 15:34:44 +08:00
parent 2ce97243ab
commit 49d740e27c
4 changed files with 10 additions and 71 deletions

View File

@@ -244,22 +244,13 @@ async fn main() -> std::io::Result<()> {
Err(e) => warn!("启动时清理 web 登录码失败: {}", e),
}
// 后台定时扫描待支付订单(每 5 分钟)
let pool_clone = pool.clone();
actix_web::rt::spawn(async move {
let mut interval = actix_web::rt::time::interval(std::time::Duration::from_secs(300));
interval.tick().await; // 跳过立即执行
loop {
interval.tick().await;
tracing::info!("[定时任务] 开始扫描待支付订单...");
match db::check_and_retry_pending_orders(&pool_clone).await {
Ok(confirmed) => {
if confirmed > 0 {
tracing::info!("[定时任务] 自动确认了 {} 个待支付订单", confirmed);
}
}
Err(e) => tracing::warn!("[定时任务] 扫描待支付订单失败: {}", e),
}
tracing::info!("[定时任务] 开始...");
// 会员到期前 7 天提醒
if let Err(e) = db::check_member_expiry_soon(&pool_clone).await {