fix 修复 日志记录 异步不生效问题

This commit is contained in:
疯狂的狮子Li
2024-02-04 13:01:33 +08:00
parent a8777acc88
commit 03d50188a6
5 changed files with 5 additions and 15 deletions

View File

@@ -10,6 +10,7 @@ import org.dromara.system.domain.bo.SysLogininforBo;
import org.dromara.system.domain.bo.SysOperLogBo;
import org.dromara.system.service.ISysLogininforService;
import org.dromara.system.service.ISysOperLogService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
/**
@@ -25,12 +26,14 @@ public class RemoteLogServiceImpl implements RemoteLogService {
private final ISysOperLogService operLogService;
private final ISysLogininforService logininforService;
@Async
@Override
public void saveLog(RemoteOperLogBo remoteOperLogBo) {
SysOperLogBo sysOperLogBo = MapstructUtils.convert(remoteOperLogBo, SysOperLogBo.class);
operLogService.insertOperlog(sysOperLogBo);
}
@Async
@Override
public void saveLogininfor(RemoteLogininforBo remoteLogininforBo) {
SysLogininforBo sysLogininforBo = MapstructUtils.convert(remoteLogininforBo, SysLogininforBo.class);