fix:退出登录日志记录
This commit is contained in:
@@ -12,9 +12,11 @@ import com.honeycombis.honeycom.common.data.tenant.TenantBroker;
|
||||
import com.honeycombis.honeycom.common.data.tenant.TenantContextHolder;
|
||||
import com.honeycombis.honeycom.common.log.util.LogTypeEnum;
|
||||
import com.honeycombis.honeycom.log.api.entity.SysLog;
|
||||
import com.honeycombis.honeycom.log.api.feign.RemoteSpdmLogService;
|
||||
import com.honeycombis.honeycom.log.api.vo.PreLogVO;
|
||||
import com.honeycombis.honeycom.log.mapper.SysLogMapper;
|
||||
import com.honeycombis.honeycom.log.service.SysLogService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -33,8 +35,11 @@ import java.util.stream.Collectors;
|
||||
* @since 2017-11-20
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {
|
||||
|
||||
private final RemoteSpdmLogService remoteSpdmLogService;
|
||||
|
||||
/**
|
||||
* 批量插入前端错误日志
|
||||
* @param preLogVoList 日志信息
|
||||
@@ -86,6 +91,12 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> impleme
|
||||
BeanUtils.copyProperties(sysLog, log, "createTime");
|
||||
return baseMapper.insert(log);
|
||||
});
|
||||
|
||||
// 退出登录记录到spdm日志中去
|
||||
if ("退出登录".equals(sysLog.getTitle())) {
|
||||
remoteSpdmLogService.saveLog(sysLog);
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user