Commit 22f761b4 authored by 蔡镇泽's avatar 蔡镇泽

省市区查询接口修改

parent 72085864
...@@ -34,8 +34,8 @@ public class DisableController { ...@@ -34,8 +34,8 @@ public class DisableController {
* @param districtCode 上级区域代码 * @param districtCode 上级区域代码
*/ */
@RequestMapping("/district") @RequestMapping("/district")
public Result<List<ChFndDistrict>> district(String districtLevel, String districtCode) { public Result<List<ChFndDistrict>> district(String districtLevel, String districtName) {
List<ChFndDistrict> districts = disableService.district(districtLevel, districtCode); List<ChFndDistrict> districts = disableService.district(districtLevel, districtName);
return Result.success(districts); return Result.success(districts);
} }
......
...@@ -48,7 +48,7 @@ public interface DisableService { ...@@ -48,7 +48,7 @@ public interface DisableService {
void disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark); void disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark);
List<ChFndDistrict> district(String districtLevel, String districtCode); List<ChFndDistrict> district(String districtLevel, String districtName);
List<ChFndOrgan> fndOrganRoot(); List<ChFndOrgan> fndOrganRoot();
......
...@@ -95,10 +95,10 @@ public class DisableServiceImpl implements DisableService { ...@@ -95,10 +95,10 @@ public class DisableServiceImpl implements DisableService {
} }
@Override @Override
public List<ChFndDistrict> district(String districtLevel, String districtCode) { public List<ChFndDistrict> district(String districtLevel, String districtName) {
if ("4".equals(districtCode)) { if ("4".equals(districtLevel)) {
QueryWrapper<ChFndStreet> queryWrapper = new QueryWrapper<>(); QueryWrapper<ChFndStreet> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("AREA_CODE", districtCode); queryWrapper.eq("STREET_NAME", districtName);
queryWrapper.eq("IS_VALID", 0); queryWrapper.eq("IS_VALID", 0);
List<ChFndStreet> fndStreets = fndStreetMapper.selectList(queryWrapper); List<ChFndStreet> fndStreets = fndStreetMapper.selectList(queryWrapper);
List<ChFndDistrict> resuts = new ArrayList<>(); List<ChFndDistrict> resuts = new ArrayList<>();
...@@ -114,7 +114,7 @@ public class DisableServiceImpl implements DisableService { ...@@ -114,7 +114,7 @@ public class DisableServiceImpl implements DisableService {
queryWrapper.eq("IS_VALID", "Y"); queryWrapper.eq("IS_VALID", "Y");
queryWrapper.eq("DISTRICT_LEVEL", districtLevel); queryWrapper.eq("DISTRICT_LEVEL", districtLevel);
if (!"1".equals(districtLevel)) { if (!"1".equals(districtLevel)) {
queryWrapper.eq("PARENT_DISTIRCT_CODE", districtCode); queryWrapper.eq("DISTRICT_NAME", districtName);
} }
return districtMapper.selectList(queryWrapper); return districtMapper.selectList(queryWrapper);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment