package com.bonus.common.log.service;

import com.bonus.common.core.domain.R;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.system.api.domain.SysLogsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.bonus.common.core.constant.SecurityConstants;
import com.bonus.system.api.RemoteLogService;
import com.bonus.system.api.domain.SysOperLog;

import java.util.Map;

/**
 * 异步调用日志服务
 * 
 * @author bonus
 */
@Service
public class AsyncLogService
{
    @Autowired
    private RemoteLogService remoteLogService;
    /**
     * 保存系统日志记录
     */
//    @Async
//    public void saveSysLog(SysOperLog sysOperLog) throws Exception
//    {
//        remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER);
//    }


    /**
     * 保存系统日志记录
     */
    @Async
    public void addLogs(SysLogsVo sysLogsVo) throws Exception
    {
        remoteLogService.addLogs(sysLogsVo, SecurityConstants.INNER);
    }

    /**
     * 保存系统日志记录
     */
    @Async
    public Map<String,String> getLogsModule(SysLogsVo sysLogsVo) throws Exception {
       return   remoteLogService.getLogsModule(sysLogsVo, SecurityConstants.INNER);
    }

}
