Exemplo n.º 1
0
 @RequestMapping
 public ModelAndView findAllCities(String proId) {
   ModelAndView mv = new ModelAndView("area/city_list");
   Province province = areaService.findProvince(new ObjectId(proId));
   mv.addObject("province", province);
   mv.addObject("cityList", province.getCities());
   return mv;
 }
Exemplo n.º 2
0
 @RequestMapping
 public ModelAndView create_start_city(String proId) {
   ModelAndView mv = new ModelAndView("area/create_city");
   if (StringUtil.isEmpty(proId)) {
     return mv;
   }
   Province province = areaService.findProvince(new ObjectId(proId));
   mv.addObject("province", province);
   return mv;
 }
Exemplo n.º 3
0
 @ResponseBody
 @RequestMapping
 public List<City> findCities(String proId) {
   Province province = areaService.findProvince(new ObjectId(proId));
   List<City> cities = new ArrayList<City>();
   for (City city : province.getCities()) {
     city.setProvince(null);
     city.setAreas(null);
     cities.add(city);
   }
   return cities;
 }