package com.ruoyi.framework.web.service;

import org.springframework.stereotype.Component;
import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory;

/**
 * 基于若依 {@link AsyncManager} 的登录审计实现。
 * <p>短信发送/校验失败、发送成功等事件最终落入 {@code sys_logininfor} 表。</p>
 */
@Component
public class AsyncLoginInforRecorder implements LoginInforRecorder
{
    @Override
    public void record(String username, String status, String message)
    {
        AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, status, message));
    }
}
