From bb53af6a314eeb53c3e41ed9e840cf20a298a8e6 Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Wed, 22 May 2024 19:06:24 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zhgd/xmgl/async/AsyncCommon.java | 2 ++ src/main/java/com/zhgd/xmgl/async/AsyncDev.java | 2 ++ .../com/zhgd/xmgl/async/AsyncDevExcavation.java | 2 ++ .../java/com/zhgd/xmgl/async/AsyncLifter.java | 2 ++ .../java/com/zhgd/xmgl/async/AsyncTower.java | 2 ++ .../service/impl/SystemUserServiceImpl.java | 17 ++++++++++------- .../impl/LifterCurrentDataServiceImpl.java | 2 ++ .../service/impl/LifterServiceImpl.java | 2 ++ .../impl/TowerCurrentDataServiceImpl.java | 2 ++ .../service/impl/TowerServiceImpl.java | 2 ++ .../impl/InspectionRecordServiceImpl.java | 2 ++ ...AiAnalyseHardWareAlarmRecordServiceImpl.java | 2 ++ .../java/com/zhgd/xmgl/task/MsgPushTask.java | 2 ++ 13 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zhgd/xmgl/async/AsyncCommon.java b/src/main/java/com/zhgd/xmgl/async/AsyncCommon.java index c0982bf03..90e170c69 100644 --- a/src/main/java/com/zhgd/xmgl/async/AsyncCommon.java +++ b/src/main/java/com/zhgd/xmgl/async/AsyncCommon.java @@ -19,6 +19,7 @@ import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncResult; import org.springframework.stereotype.Component; @@ -41,6 +42,7 @@ public class AsyncCommon { private INoticeService noticeService; @Autowired private SystemUserMapper systemUserMapper; + @Lazy @Autowired AsyncAiAnalyse asyncAiAnalyse; diff --git a/src/main/java/com/zhgd/xmgl/async/AsyncDev.java b/src/main/java/com/zhgd/xmgl/async/AsyncDev.java index c2b51f0ef..f0d752519 100644 --- a/src/main/java/com/zhgd/xmgl/async/AsyncDev.java +++ b/src/main/java/com/zhgd/xmgl/async/AsyncDev.java @@ -3,6 +3,7 @@ package com.zhgd.xmgl.async; import com.zhgd.xmgl.modules.project.service.IProjectService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; @@ -15,6 +16,7 @@ import org.springframework.stereotype.Component; @Slf4j @Component public class AsyncDev { + @Lazy @Autowired AsyncAiAnalyse asyncAiAnalyse; diff --git a/src/main/java/com/zhgd/xmgl/async/AsyncDevExcavation.java b/src/main/java/com/zhgd/xmgl/async/AsyncDevExcavation.java index cba68a655..a2098a90b 100644 --- a/src/main/java/com/zhgd/xmgl/async/AsyncDevExcavation.java +++ b/src/main/java/com/zhgd/xmgl/async/AsyncDevExcavation.java @@ -12,6 +12,7 @@ import com.zhgd.xmgl.modules.project.service.IProjectService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; @@ -30,6 +31,7 @@ import java.util.stream.Collectors; public class AsyncDevExcavation { @Autowired private ISystemUserService systemUserService; + @Lazy @Autowired AsyncAiAnalyse asyncAiAnalyse; diff --git a/src/main/java/com/zhgd/xmgl/async/AsyncLifter.java b/src/main/java/com/zhgd/xmgl/async/AsyncLifter.java index b65f83e36..cf1be4cbb 100644 --- a/src/main/java/com/zhgd/xmgl/async/AsyncLifter.java +++ b/src/main/java/com/zhgd/xmgl/async/AsyncLifter.java @@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; @@ -38,6 +39,7 @@ public class AsyncLifter { private ThirdPartyPlatformServiceMapper thirdPartyPlatformServiceMapper; @Autowired private INoticeService noticeService; + @Lazy @Autowired private AsyncAiAnalyse asyncAiAnalyse; diff --git a/src/main/java/com/zhgd/xmgl/async/AsyncTower.java b/src/main/java/com/zhgd/xmgl/async/AsyncTower.java index d6a0934a8..ad6ea9c6a 100644 --- a/src/main/java/com/zhgd/xmgl/async/AsyncTower.java +++ b/src/main/java/com/zhgd/xmgl/async/AsyncTower.java @@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; @@ -38,6 +39,7 @@ public class AsyncTower { private ThirdPartyPlatformServiceMapper thirdPartyPlatformServiceMapper; @Autowired private INoticeService noticeService; + @Lazy @Autowired private AsyncAiAnalyse asyncAiAnalyse; diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java index f3e97f617..37c9d48b8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java @@ -39,6 +39,7 @@ import com.zhgd.xmgl.modules.worker.entity.UserEnterprise; import com.zhgd.xmgl.modules.worker.entity.WorkerInfo; import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.worker.service.impl.WorkerInfoServiceImpl; import com.zhgd.xmgl.modules.xz.entity.XzRegistry; import com.zhgd.xmgl.modules.xz.mapper.XzRegistryMapper; import com.zhgd.xmgl.modules.xz.service.impl.XzRegistryServiceImpl; @@ -765,6 +766,9 @@ public class SystemUserServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); @@ -795,13 +799,12 @@ public class SystemUserServiceImpl extends ServiceImpl() .set(XzRegistry::getEmail, systemUser.getPersonMail()) diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/LifterCurrentDataServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/LifterCurrentDataServiceImpl.java index 0f3eb4c83..0fa7c5ab4 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/LifterCurrentDataServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/LifterCurrentDataServiceImpl.java @@ -31,6 +31,7 @@ import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -60,6 +61,7 @@ public class LifterCurrentDataServiceImpl extends ServiceImpl impleme private BigDeviceDriverRecordMapper bigDeviceDriverRecordMapper; @Autowired private BigDeviceVideoMapper bigDeviceVideoMapper; + @Lazy @Autowired private AsyncLifter asyncLifter; @Autowired diff --git a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/TowerCurrentDataServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/TowerCurrentDataServiceImpl.java index 60f6e20be..35188bb2b 100644 --- a/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/TowerCurrentDataServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/bigdevice/service/impl/TowerCurrentDataServiceImpl.java @@ -39,6 +39,7 @@ import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cglib.beans.BeanMap; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -70,6 +71,7 @@ public class TowerCurrentDataServiceImpl extends ServiceImpl implements private ICompanyService companyService; @Autowired private ProjectDevStatisticsMapper projectDevStatisticsMapper; + @Lazy @Autowired private AsyncTower asyncTower; @Autowired diff --git a/src/main/java/com/zhgd/xmgl/modules/inspection/service/impl/InspectionRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/inspection/service/impl/InspectionRecordServiceImpl.java index c9d6162e8..f35063ba3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/inspection/service/impl/InspectionRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/inspection/service/impl/InspectionRecordServiceImpl.java @@ -16,6 +16,7 @@ import com.zhgd.xmgl.modules.inspection.mapper.InspectionRectifyRecordMapper; import com.zhgd.xmgl.modules.inspection.service.IInspectionRecordService; import org.apache.commons.collections.MapUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -40,6 +41,7 @@ public class InspectionRecordServiceImpl extends ServiceImpl