public void save(City country) {
   if (country.getId() != null) {
     cityMapper.updateByPrimaryKey(country);
   } else {
     cityMapper.insert(country);
   }
 }
 public City getById(Integer id) {
   return cityMapper.selectByPrimaryKey(id);
 }
 public void deleteById(Integer id) {
   cityMapper.deleteByPrimaryKey(id);
 }
 public List<City> getAll(City city) {
   if (city.getPage() != null && city.getRows() != null) {
     PageHelper.startPage(city.getPage(), city.getRows(), "id");
   }
   return cityMapper.selectAll();
 }