Package net.baguajie.domains

Examples of net.baguajie.domains.Place


  PlaceRepository placeRepository;

  @RequestMapping(value="/place/{id}", method=RequestMethod.GET)
  public String view(@PathVariable String id, Model model,
      HttpServletRequest request, HttpSession session){
    Place place = placeRepository.findOne(id);
    model.addAttribute("place", place);
    return "spots/place";
  }
View Full Code Here


    }
    if(result.hasErrors()){
      return new AjaxResult(AjaxResultCode.INVALID,
          BindingErrors.from(result));
    }
    Place place = placeRepository.save(Place.from(vo, signInUser));
    return new AjaxResult(AjaxResultCode.SUCCESS, place);
  }
View Full Code Here

      spot.setImage(res);
    } catch (Exception e) {
      throw new RuntimeException(e.getMessage(), e);
    }
    if(StringUtils.hasText(vo.getPlaceId())){
      Place place = placeRepository.findOne(vo.getPlaceId());
      if(place!=null){
        CityMeta city = cityMetaRepository.getByName(place.getCity());
        if(city!=null){
          spot.setCity(city.getPinyin());
        }
        spot.setLngLat(place.getLngLat());
        spot.setPlace(place);
      }
    }else if(!StringUtils.hasText(spot.getCity())){
      spot.setCity(ApplicationConfig.defaultCityPinyin);
    }
View Full Code Here

TOP

Related Classes of net.baguajie.domains.Place

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.