From fec2659d4687af2d69f30452395ff103c461c002 Mon Sep 17 00:00:00 2001 From: "DESKTOP-G8BCEP0\\HP" <2037158277@qq.com> Date: Mon, 2 Aug 2021 14:41:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8A=A4=E6=9E=97=E5=91=98=E4=BF=A1=E6=81=AF=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=88=86=E4=B8=BA=E7=9C=81?= =?UTF-8?q?=E5=B8=82=E4=B8=A4=E7=BA=A7=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xkrs/service/impl/ForestRangerServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/xkrs/service/impl/ForestRangerServiceImpl.java b/src/main/java/com/xkrs/service/impl/ForestRangerServiceImpl.java index 9e4dba0..a460106 100644 --- a/src/main/java/com/xkrs/service/impl/ForestRangerServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/ForestRangerServiceImpl.java @@ -50,14 +50,14 @@ public class ForestRangerServiceImpl implements ForestRangerService { // 获取区域信息 Locale locale = LocaleContextHolder.getLocale(); String tokenUserName = TokenUtil.getTokenUserName(token); - if("370000".equals(countyCode)){ - List all = forestRangerDao.findAll(); - if(all == null || all.size() == 0){ + if(countyCode.substring(2).equals("0000")){ + List allsByRangerCountyCode = forestRangerDao.findAllsByRangerCountyCode(countyCode.substring(0,2)); + if(allsByRangerCountyCode == null || allsByRangerCountyCode.size() == 0){ return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时还没该省护林员的信息",locale); } - return outputEncapsulationObject(PromptMessageEnum.SUCCESS,all,locale); + return outputEncapsulationObject(PromptMessageEnum.SUCCESS,allsByRangerCountyCode,locale); }else { - List allByRangerCountyCode = forestRangerDao.findAllsByRangerCountyCode(countyCode); + List allByRangerCountyCode = forestRangerDao.findAllsByRangerCountyCode(countyCode.substring(0,4)); if(allByRangerCountyCode == null || allByRangerCountyCode.size() == 0){ return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"暂时还没该市护林员的信息",locale); }