| | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Areas getOpenedCityByName(String cityName) { |
| | | if (StringUtils.isBlank(cityName)) { |
| | |
| | | return areasMapper.selectOne(qw); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Areas getOpenedCityByCode(String code) { |
| | | if (StringUtils.isBlank(code)) { |
| | | return null; |
| | | } |
| | | Areas areas = areasMapper.selectById(code); |
| | | if(Objects.isNull(areas)||Objects.isNull(areas.getParentId())){ |
| | | return null; |
| | | } |
| | | Areas city = areasMapper.selectById(areas.getParentId()); |
| | | if(Objects.isNull(city)||Constants.equalsInteger(city.getIsdeleted(),Constants.ONE)|| |
| | | Constants.equalsInteger(city.getStatus(),Constants.ZERO)){ |
| | | return null; |
| | | } |
| | | return city; |
| | | } |
| | | |
| | | @Override |
| | | public void updateStatus(Areas areas) { |
| | | if (areas == null || areas.getId() == null) { |