public void delete() { boolean flag = false; String id = request.getParameter("id"); try { messageCommentService.removeEntityById(Long.valueOf(id), MessageComment.class); flag = true; super.reponseWriter(JSON.toJSONString(flag)); } catch (NumberFormatException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }
/** 查询主页 */ public void query() { String page = request.getParameter("page"); // 当前页数 String rows = request.getParameter("rows"); // 每页显示行数 try { BBSMessage bbsMessage = new BBSMessage(); Pager pager = bbsMessageService.queryBBSMessageByPage( bbsMessage, Integer.valueOf(rows), Integer.valueOf(page)); super.reponseWriter(JSON.toJSONString(pager)); } catch (Exception e) { e.printStackTrace(); } }
public void update() { boolean flag = false; String id = request.getParameter("id"); MessageComment messageComment = getMessageComment(); try { messageComment.setId(Long.valueOf(id)); messageCommentService.saveEntity(messageComment); flag = true; super.reponseWriter(JSON.toJSONString(flag)); } catch (NumberFormatException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }
public void update() { boolean flag = false; String id = request.getParameter("id"); BBSMessage bbsMessage = getBBSMessage(); try { bbsMessage.setId(Long.valueOf(id)); bbsMessageService.saveEntity(bbsMessage); flag = true; super.reponseWriter(JSON.toJSONString(flag)); } catch (NumberFormatException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }
/** 查询主页 */ public void query() { messageid = Long.parseLong(request.getParameter("messageid")); String page = request.getParameter("page"); // 当前页数 String rows = request.getParameter("rows"); // 每页显示行数 try { MessageComment messageComment = new MessageComment(); messageComment.setMessageid(messageid); Pager pager = messageCommentService.queryMessageCommentByPage( messageComment, Integer.valueOf(rows), Integer.valueOf(page)); super.reponseWriter(JSON.toJSONString(pager)); } catch (Exception e) { e.printStackTrace(); } }
public void save() { boolean flag = false; BBSMessage bbsMessage = getBBSMessage(); try { bbsMessage.setScannum(Long.parseLong("0")); bbsMessage.setIsessence(0); bbsMessageService.saveEntity(bbsMessage); flag = true; super.reponseWriter(JSON.toJSONString(flag)); } catch (NumberFormatException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }
public String save() { boolean flag = false; MessageComment messageComment = getMessageComment(); try { messageCommentService.saveEntity(messageComment); bbsMessageQuery = bbsMessageService.findBBSMessageQuery(messageComment.getMessageid()); commentslist = bbsMessageService.queryCommentsByMsgId(messageComment.getMessageid()); flag = true; super.reponseWriter(JSON.toJSONString(flag)); } catch (NumberFormatException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return "bbs_detail"; }