From d4de89b9fd7819753717df30e6b020acfcabb3f2 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 1 Jul 2022 17:34:47 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=8F=AA=E8=BF=94=E5=9B=9E=E5=B1=B1=E4=B8=9C=E7=9C=81=E7=9A=84?= =?UTF-8?q?=E7=81=AB=E7=82=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/service/GlobalSettingService.java | 7 ---- .../impl/GlobalSettingServiceImpl.java | 32 ------------------- .../com/xkrs/utils/FirePointQueryHelper.java | 8 ----- 3 files changed, 47 deletions(-) delete mode 100644 src/main/java/com/xkrs/service/GlobalSettingService.java delete mode 100644 src/main/java/com/xkrs/service/impl/GlobalSettingServiceImpl.java diff --git a/src/main/java/com/xkrs/service/GlobalSettingService.java b/src/main/java/com/xkrs/service/GlobalSettingService.java deleted file mode 100644 index 4a5bf72..0000000 --- a/src/main/java/com/xkrs/service/GlobalSettingService.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.xkrs.service; - -public interface GlobalSettingService { - - boolean onlyShanDong(); - -} diff --git a/src/main/java/com/xkrs/service/impl/GlobalSettingServiceImpl.java b/src/main/java/com/xkrs/service/impl/GlobalSettingServiceImpl.java deleted file mode 100644 index 1d909d2..0000000 --- a/src/main/java/com/xkrs/service/impl/GlobalSettingServiceImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xkrs.service.impl; - -import com.xkrs.dao.GlobalSettingDao; -import com.xkrs.model.entity.GlobalSettingEntity; -import com.xkrs.service.GlobalSettingService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.List; - -@Service -public class GlobalSettingServiceImpl implements GlobalSettingService { - - @Resource - private GlobalSettingDao globalSettingDao; - - @Override - public boolean onlyShanDong() { - try { - List globalSettingList = globalSettingDao.findAll(); - for (GlobalSettingEntity globalSetting : globalSettingList) { - if (globalSetting.getKey().equalsIgnoreCase("OnlyShanDong")) { - return globalSetting.getValue() == 1L; - } - } - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - -} diff --git a/src/main/java/com/xkrs/utils/FirePointQueryHelper.java b/src/main/java/com/xkrs/utils/FirePointQueryHelper.java index ca0562b..b0ba661 100644 --- a/src/main/java/com/xkrs/utils/FirePointQueryHelper.java +++ b/src/main/java/com/xkrs/utils/FirePointQueryHelper.java @@ -2,7 +2,6 @@ package com.xkrs.utils; import com.xkrs.dao.FirePointDao; import com.xkrs.model.entity.FirePointEntity; -import com.xkrs.service.GlobalSettingService; import org.apache.hc.core5.util.TextUtils; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; @@ -23,17 +22,10 @@ public class FirePointQueryHelper { @Resource private FirePointDao firePointDao; - @Resource - private GlobalSettingService globalSettingService; - public List queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType) { Specification specification = (root, criteriaQuery, criteriaBuilder) -> { //查询条件集合 List predicateList = new ArrayList<>(); - if (globalSettingService.onlyShanDong()) { - predicateList.add(criteriaBuilder.like(root.get("countyCode").as(String.class), "37%")); - predicateList.add(criteriaBuilder.like(root.get("streetCode").as(String.class), "37%")); - } //添加区划编码查询条件 if (!TextUtils.isEmpty(code)) { try {