Browse Source

新增城市查询(树形结构更新)

tags/v2.4.1
xiaoying 1 year ago
parent
commit
48117157c1
5 changed files with 4 additions and 4 deletions
  1. +1
    -1
      tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/CityController.java
  2. +1
    -1
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/CityService.java
  3. +2
    -2
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/CityServiceImpl.java
  4. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/model/vo/TenantVo.class
  5. BIN
      tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class

+ 1
- 1
tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/CityController.java View File

@@ -43,7 +43,7 @@ public class CityController{
* @return 行政区列表(树结构)
*/
@GetMapping("/queryCityList")
public List<City> queryCityList() {
public JsonResult queryCityList() {
return cityService.getCityList();
}
}

+ 1
- 1
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/CityService.java View File

@@ -19,7 +19,7 @@ public interface CityService extends IService<City> {
*
* @return 行政区列表
*/
List<City> getCityList();
JsonResult getCityList();

/**
* 根据查询条件获取数据列表

+ 2
- 2
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/CityServiceImpl.java View File

@@ -30,7 +30,7 @@ public class CityServiceImpl extends ServiceImpl<CityMapper, City>
private CityMapper cityMapper;

@Override
public List<City> getCityList() {
public JsonResult getCityList() {
List<City> list = cityMapper.selectList(new LambdaQueryWrapper<City>()
.eq(City::getMark, 1));

@@ -40,7 +40,7 @@ public class CityServiceImpl extends ServiceImpl<CityMapper, City>
.peek(city -> city.setItemList(getChildren(city, list))).sorted(Comparator.comparingInt(city -> (city.getSort() == null ? 0 : city.getSort())))
.collect(Collectors.toList());

return result;
return JsonResult.success(result);
}

/**

BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/model/vo/TenantVo.class View File


BIN
tuoheng_oidc_admin/target/classes/com/tuoheng/service/impl/ClientUserServiceImpl.class View File


Loading…
Cancel
Save