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 {