Map<String, Object> ajaxvote(@RequestParam("objId") Long objId,
@RequestParam("star") Integer star) {
Map<String, Object> map = new HashMap<String, Object>();
try {
User user = (User) WebHelper.getSessionAttribute(null, Constant.SESSION_USER);
if (user == null) {
map.put("loginStatus", false);
return map;
}
map.put("loginStatus", true);
if (ratyService.isRaty(objId, user.getId())) {
Spot spot = spotService.view(objId);
map.put("SpotStar", spot.getStar());
map.put("VoteNum", spot.getVotes());
map.put("Raty_Tag", true);
return map;
}
Spot spot = (Spot) ratyService.ratyStar(objId, RatyObjType.SPOT, user.getId(), star);
map.put("Star", spot.getStar());
map.put("VoteNum", spot.getVotes());
return map;
} catch (Exception e) {