|
|
@ -9,9 +9,11 @@ import com.inscloudtech.common.utils.ip.AddressUtils; |
|
|
|
import com.inscloudtech.system.domain.SysExceptionReport; |
|
|
|
import com.inscloudtech.system.domain.SysRequestLog; |
|
|
|
import com.inscloudtech.system.mapper.SysRequestLogMapper; |
|
|
|
import com.inscloudtech.system.service.ISysExceptionReportService; |
|
|
|
import com.inscloudtech.system.service.SysExceptionReportService; |
|
|
|
import com.inscloudtech.system.service.SysRequestLogService; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.context.event.EventListener; |
|
|
|
import org.springframework.scheduling.annotation.Async; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -26,10 +28,10 @@ import java.util.List; |
|
|
|
* @date 2024-08-28 |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
@AllArgsConstructor |
|
|
|
@RequiredArgsConstructor |
|
|
|
public class SysRequestLogServiceImpl extends ServiceImpl<SysRequestLogMapper, SysRequestLog> implements SysRequestLogService { |
|
|
|
|
|
|
|
private final ISysExceptionReportService exceptionReportService; |
|
|
|
private final SysExceptionReportService sysExceptionReportService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 预警时间阈值(分钟) |
|
|
@ -60,7 +62,7 @@ public class SysRequestLogServiceImpl extends ServiceImpl<SysRequestLogMapper, S |
|
|
|
report.setType("大量访问请求"); |
|
|
|
addList.add(report); |
|
|
|
} |
|
|
|
exceptionReportService.saveBatch(addList); |
|
|
|
sysExceptionReportService.saveBatch(addList); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|