@Resource
private CalendarService calendarService;
public IResult getCalendarData(IRequest request) {
AjaxFormResult result = new AjaxFormResult();
String start = request.get("start");
String end = request.get("end");
String userId = CapSecurityContext.getUserId();
List<Remind> reminds = calendarService.getCalendarData(userId, start,
end);
List<Map<String, Object>> events = new ArrayList<Map<String, Object>>();
for (Remind remind : reminds) {
events.add(CapBeanUtil.bean2Map(remind,
CapEntityUtil.getColumnName(remind)));
}
Map<String, Object> reEvents = new HashMap<String, Object>();
reEvents.put("events", events);
result.putAll(reEvents);
return result;
}