package com.inspect.common.log.service;

import com.inspect.system.base.RemoteLogService;
import com.inspect.system.base.domain.SysOperateLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AsyncLogService {
    final RemoteLogService remoteLogService;

    @Autowired
    AsyncLogService(RemoteLogService remoteLogService) {
        this.remoteLogService = remoteLogService;
    }

    @Async
    public void saveSysLog(SysOperateLog sysOperateLog) {
        this.remoteLogService.saveLog(sysOperateLog, "inner");
    }
}
