}
String loginname = userContext.getUsername();
String adviceStr = request.getParameter("content");
String parentId = request.getParameter("parentId");
Advice advice = new Advice();
advice.setCreate_time(new Date());
advice.setLoginname(loginname);
advice.setName(loginname);
advice.setAdvice(adviceStr);
advice.setParent_id(parentId==null?new Long(0):Long.valueOf(parentId));
AdviceService service = new AdviceServiceImpl();
if(!service.saveAdvice(advice)){
String json = "{\"status\":\"0\",\"message\":\"���Ա���ʧ��!\",\"result\":\"{���Ա���ʧ��}\"}";