From 67e81be04cdc3046247269bd42834172dbc1dcef Mon Sep 17 00:00:00 2001 From: zhouyl <583641232@qq.com> Date: Fri, 6 Sep 2024 17:50:29 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=20=20=E6=94=AF=E6=8C=81=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=83=85=E5=86=B5=E6=8A=A5=E5=91=8A=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=8C=85=E6=8B=AC=E5=A4=A7=E9=87=8F=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E3=80=81=E5=BC=82=E5=B8=B8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/SysExceptionReportController.java | 6 +++--- ...portService.java => SysExceptionReportService.java} | 2 +- .../service/impl/SysExceptionReportServiceImpl.java | 6 ++++-- .../system/service/impl/SysRequestLogServiceImpl.java | 10 ++++++---- 4 files changed, 14 insertions(+), 10 deletions(-) rename tp-system/src/main/java/com/inscloudtech/system/service/{ISysExceptionReportService.java => SysExceptionReportService.java} (76%) diff --git a/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysExceptionReportController.java b/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysExceptionReportController.java index 8fa95c1..46d180d 100644 --- a/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysExceptionReportController.java +++ b/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysExceptionReportController.java @@ -13,7 +13,7 @@ import com.inscloudtech.common.core.page.TableDataInfo; import com.inscloudtech.common.enums.BusinessType; import com.inscloudtech.system.domain.SysExceptionReport; import com.inscloudtech.system.domain.SysRequestLog; -import com.inscloudtech.system.service.ISysExceptionReportService; +import com.inscloudtech.system.service.SysExceptionReportService; import com.inscloudtech.system.service.SysRequestLogService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -24,12 +24,12 @@ import org.springframework.web.bind.annotation.*; * @author zfcf * @date 2024-08-28 */ -@RestController + @RequiredArgsConstructor @RequestMapping("/functional/exceptionReport") public class SysExceptionReportController { - private final ISysExceptionReportService iSysExceptionReportService; + private final SysExceptionReportService iSysExceptionReportService; private final SysRequestLogService sysRequestLogService; diff --git a/tp-system/src/main/java/com/inscloudtech/system/service/ISysExceptionReportService.java b/tp-system/src/main/java/com/inscloudtech/system/service/SysExceptionReportService.java similarity index 76% rename from tp-system/src/main/java/com/inscloudtech/system/service/ISysExceptionReportService.java rename to tp-system/src/main/java/com/inscloudtech/system/service/SysExceptionReportService.java index 41aac45..72baaf0 100644 --- a/tp-system/src/main/java/com/inscloudtech/system/service/ISysExceptionReportService.java +++ b/tp-system/src/main/java/com/inscloudtech/system/service/SysExceptionReportService.java @@ -11,7 +11,7 @@ import com.inscloudtech.system.domain.SysRequestLog; * @author inscloudtech * @date 2024-08-08 */ -public interface ISysExceptionReportService extends IService { +public interface SysExceptionReportService extends IService { } diff --git a/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysExceptionReportServiceImpl.java b/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysExceptionReportServiceImpl.java index 7aa9668..08117ac 100644 --- a/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysExceptionReportServiceImpl.java +++ b/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysExceptionReportServiceImpl.java @@ -5,13 +5,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.inscloudtech.common.core.domain.event.ExceptionReportEvent; import com.inscloudtech.system.domain.SysExceptionReport; import com.inscloudtech.system.mapper.SysExceptionReportMapper; -import com.inscloudtech.system.service.ISysExceptionReportService; +import com.inscloudtech.system.service.SysExceptionReportService; import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; import java.util.Date; -public class SysExceptionReportServiceImpl extends ServiceImpl implements ISysExceptionReportService { +@Service +public class SysExceptionReportServiceImpl extends ServiceImpl implements SysExceptionReportService { @Async @EventListener diff --git a/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysRequestLogServiceImpl.java b/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysRequestLogServiceImpl.java index d9baa8e..b553564 100644 --- a/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysRequestLogServiceImpl.java +++ b/tp-system/src/main/java/com/inscloudtech/system/service/impl/SysRequestLogServiceImpl.java @@ -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 implements SysRequestLogService { - private final ISysExceptionReportService exceptionReportService; + private final SysExceptionReportService sysExceptionReportService; /** * 预警时间阈值(分钟) @@ -60,7 +62,7 @@ public class SysRequestLogServiceImpl extends ServiceImpl