From fc5b7d2d48a90ffbd0d033598f12ee3d9c1625f7 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 25 四月 2025 18:23:32 +0800 Subject: [PATCH] 修改文档bug --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CompanyCityServiceImpl.java | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CompanyCityServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CompanyCityServiceImpl.java index 6077c3e..d0ee293 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CompanyCityServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CompanyCityServiceImpl.java @@ -68,15 +68,15 @@ String englishName = city1.getEnglishName(); String frenchName = city1.getFrenchName(); for (String s : city) { - if(s.indexOf(chineseName) != -1){ + if(s.contains(chineseName)){ collect.add(city1.getId()); break; } - if(s.indexOf(englishName) != -1){ + if(s.contains(englishName)){ collect.add(city1.getId()); break; } - if(s.indexOf(frenchName) != -1){ + if(s.contains(frenchName)){ collect.add(city1.getId()); break; } @@ -85,6 +85,7 @@ if(collect.size() == 0){ return null; } + System.err.println("城市ids:" + collect); return companyMapper.query(collect); } @@ -98,15 +99,15 @@ String englishName = city1.getEnglishName(); String frenchName = city1.getFrenchName(); for (String s : city) { - if(s.indexOf(chineseName) != -1){ + if(s.contains(chineseName)){ collect.add(city1.getId()); break; } - if(s.indexOf(englishName) != -1){ + if(s.contains(englishName)){ collect.add(city1.getId()); break; } - if(s.indexOf(frenchName) != -1){ + if(s.contains(frenchName)){ collect.add(city1.getId()); break; } @@ -136,15 +137,15 @@ String englishName = city1.getEnglishName(); String frenchName = city1.getFrenchName(); for (String s : city) { - if(s.indexOf(chineseName) != -1){ + if(s.contains(chineseName)){ collect.add(city1.getId()); break; } - if(s.indexOf(englishName) != -1){ + if(s.contains(englishName)){ collect.add(city1.getId()); break; } - if(s.indexOf(frenchName) != -1){ + if(s.contains(frenchName)){ collect.add(city1.getId()); break; } -- Gitblit v1.7.1