Package com.lgx8.common

Examples of com.lgx8.common.PageList


    } catch (Exception e1) {
      pagenum = 1;
    }   
    String point = "2";
   
    PageList pageList = null;
   
    if("1".equals(type))
    {
      //1-200积分
      pageList = gatewayService.findProductByConditions(1l, 0l, "1", "200",null,pagenum+"",null);
      point = "1";
     
    }else if("2".equals(type))
    {
      //200-500积分
      pageList = gatewayService.findProductByConditions(1l, 0l, "200", "500",null,pagenum+"",null);
      point = "2";
    }else if("3".equals(type))
    {
      //500-1000积分
      pageList = gatewayService.findProductByConditions(1l, 0l, "500", "1000",null,pagenum+"",null);
      point = "3";
    }else if("4".equals(type))
    {
      //1000积分以上
      pageList = gatewayService.findProductByConditions(1l, 0l, "1000", null,null,pagenum+"",null);
      point = "4";
    }else
    {
      //200-500积分
      pageList = gatewayService.findProductByConditions(1l, 0l, "200", "500",null,pagenum+"",null);
      point = "2";
    }
   
    if(pageList!=null&&pageList.getDataList()!=null)
    {
      root.put("pageList", pageList);
    }
   
    root.put("point", point);
View Full Code Here


 
  public List<News> findByType(Object type) {
    String hql = "from News n where n.type ="+type+" order by n.time desc";
   
    Object[] values = new Object[]{};
    PageList page = findByPage4Report(hql, values, 0, 3);
    return page.getDataList();
  }
View Full Code Here

        return result;
      }
     
    });
    int totalPageNum = totalRecordNum/pageSize;
    PageList pageList = new PageList();
    pageList.setPageSize(pageSize);
    pageList.setCurrentPageNum(pageNum);
    pageList.setDataList(data);
    pageList.setTotalPageNum(totalPageNum);
    pageList.setTotalRecordNum(totalRecordNum);
    return pageList;
  }
View Full Code Here

        return result;
      }
     
    });
    int totalPageNum = totalRecordNum/pageSize;
    PageList pageList = new PageList();
    pageList.setPageSize(pageSize);
    pageList.setCurrentPageNum(pageNum);
    pageList.setDataList(data);
    pageList.setTotalPageNum(totalPageNum);
    pageList.setTotalRecordNum(totalRecordNum);
    return pageList;
  }
View Full Code Here

    super.init(config);
    configuration = new Configuration();
        configuration.setServletContextForTemplateLoading(getServletContext(), "ftl/gateway");
        configuration.setDefaultEncoding("UTF-8");
       
        GatewayConfig gatewayConfig = (GatewayConfig) getServletContext().getAttribute("gatewayConfig");
        base.put("gatewayConfig", gatewayConfig);
   
    List<AreaCategory> areaCategorys = (List<AreaCategory>) getServletContext().getAttribute("areaCategorys");
    base.put("areaCategorys", areaCategorys);
   
View Full Code Here

    return getHibernateTemplate().find(hql);
  }
 
  public static void main(String[] args) {
    ApplicationContext ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
    ICategoryDao categoryDao = (ICategoryDao) ac.getBean("categoryDao");
    List<Category> list = categoryDao.findAllCategoryList(new Long(5));
    for(int i=0;i<list.size();i++) {
      System.out.println(list.get(i).getName());
    }
  }
View Full Code Here

    return page;
  }

  public static void main(String[] args) {
    ApplicationContext ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
    IProductDao productDao = (IProductDao) ac.getBean("productDao");
    PageList page = productDao.findProduct(new Long(12), new String[]{"商品","4"}, 2, 5, "");
    System.out.println(page.getDataList().size());
    System.out.println();
  }
View Full Code Here

    return findByPage4Report(hql, values, argment.getCurPage(), argment.getPageSize());
  }

  @Transactional
  public void delBrand(Long id) {
    Brand brand = getBrandById(id);
    this.getHibernateTemplate().delete(brand);
  }
View Full Code Here

    getHibernateTemplate().bulkUpdate("delete from Category c where c.id="+id);
  }
 
  public List<Category> findAllCategoryList(long id) {
    List<Category> list = new ArrayList<Category>();
    Category category = getHibernateTemplate().get(Category.class, id);
    if(category!=null) {
      list.add(category);
      List<Category> childs = findAllChilds(list);
      while(childs!=null&&childs.size()>0) {
        for(Category c:childs) {
View Full Code Here

    return findByPage4Report(hql, new Object[]{}, argment.getCurPage(), argment.getPageSize());
  }

  public List<Category> findAllCategoryList(long id) {
    List<Category> list = new ArrayList<Category>();
    Category category = findCategory(id);
    if(category!=null) {
      list.add(category);
      List<Category> childs = findAllChilds(list);
      while(childs!=null&&childs.size()>0) {
        for(Category c:childs) {
View Full Code Here

TOP

Related Classes of com.lgx8.common.PageList

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.