| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | }) |
| | | public ApiResponse<List<Areas>> getCityInfoList(@RequestBody Areas areas) { |
| | | return ApiResponse.success("查询成功",areasService.getCityList(areas)); |
| | | List<Areas> list = areasService.getCityList(areas); |
| | | |
| | | if(Objects.nonNull(areas)&&StringUtils.isNotBlank(areas.getName())){ |
| | | list = |
| | | list.stream().filter(item -> item.getName().contains(areas.getName())).collect(Collectors.toList()); |
| | | } |
| | | |
| | | return ApiResponse.success("查询成功",list); |
| | | } |
| | | |
| | | @ApiOperation("全部区划树形查询") |