Package com.boco.bomc.vpn.domain

Examples of com.boco.bomc.vpn.domain.Advice


  public List<Advice> getAdvices(Page page) throws DaoException {
    List<Advice> advices = null;
    try {
      //advices = super.query(Advice.class, "SELECT * FROM "+new Advice().getTableName(), page.getOffset(),page.getPageSize());
      advices = super.query(Advice.class, "SELECT * FROM "+new Advice().getTableName());
    } catch (SQLException e) {
      e.printStackTrace();
    }
    return advices;
  }
View Full Code Here


  }
 
  public int getAdvicesCount() throws DaoException {
    int count = 0;
    try {
      count = super.queryCount("SELECT count(*) FROM "+new Advice().getTableName());
    } catch (SQLException e) {
      e.printStackTrace();
    }
    return count;
  }
View Full Code Here

    }
    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\":\"{���Ա���ʧ��}\"}";
View Full Code Here

TOP

Related Classes of com.boco.bomc.vpn.domain.Advice

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.