Package com.lgx8.gateway.service

Examples of com.lgx8.gateway.service.IGatewayService


    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("adfirst.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
    //通栏广告
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CTC_TLGG,iPObject != null?iPObject.getAreaNode():null);
    root.put("productVOs", productVOs);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here


    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("luxuryproduct.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CID_GXSP);
    if(gatewayCategory != null)
    {
      root.put("gatewayCategory", gatewayCategory);
    }
   
    //共享奢品
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CID_GXSP);
   
    if(productVOs != null && productVOs.size() != 0)
    {
      root.put("productVOs", productVOs);
    }
View Full Code Here

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("adviselist.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CYP_YPLB);
    root.put("gatewayCategory", gatewayCategory);
//   
//    String categoryId = request.getParameter("categoryId");
//   
//    if("".equals(categoryId) || categoryId == null || "null".equals(categoryId))
//    {
//      categoryId = "0";
//    }
   
    //优品列表
//    List<Product> products = gatewayService.findAllProductByAreaCategoryId(Long.parseLong(categoryId));
//    root.put("products", products);
   
    //优品列表商品类型
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CYP_YPLBSPLX);
    root.put("productVOs2", productVOs2);
   
    List<List<Product>> results = new ArrayList<List<Product>>();
   
    for(ProductVO vo : productVOs2)
    {
      List<Product> products = gatewayService.findProductByConditions(2l, Long.parseLong(vo.getEntityId()), null, 0, 0,null);
      results.add(products);
    }
   
    root.put("results", results);
   
View Full Code Here

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("adviseproduct.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CTC_TCTH);
    root.put("gatewayCategory", gatewayCategory);
   
    //同城兑换类型
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CTC_TCTHLX);
    root.put("productVOs", productVOs);
   
    String type = request.getParameter("typeNumber");
    String pageno = request.getParameter("pageno");
    String orderType = request.getParameter("orderType");
    String orderStr = request.getParameter("orderStr");
    String orderStrType = request.getParameter("orderStrType");
    if("".equals(orderStrType)||orderStrType == null)
    {
      orderStrType = "0";
    }
    root.put("orderStrType", orderStrType);
   
    String order = "1";
   
    if("1".equals(orderType))
    {
      orderStr = " order by p.price " + orderStr;
      order = "1";
    }else if("2".equals(orderType))
    {
      orderStr = " order by p.createdate " + orderStr;
      order = "2";
    }else
    {
      orderStr = "";
    }

    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } catch (Exception e1) {
      pagenum = 1;
    }   
   
    String point = "0";
   
    List<Product> products = null;
   
    PageList pageList = null;
   
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
   
    if("0".equals(type)||"".equals(type)||"null".equals(type)||type == null)
    {
      pageList = gatewayService.findProductByConditions(5l, 0l, null, null,iPObject==null?null:iPObject.getAreaNode(),pagenum+"",orderStr);
      point = "0";
    }else if("1".equals(type))
    {
      pageList = gatewayService.findProductByConditions(5l, 0l, "0", "50",iPObject==null?null:iPObject.getAreaNode(),pagenum+"",orderStr);
      point = "1";
    }else if("2".equals(type))
    {
      pageList = gatewayService.findProductByConditions(5l, 0l, "50", "100",iPObject==null?null:iPObject.getAreaNode(),pagenum+"",orderStr);
      point = "2";
    }else if("3".equals(type))
    {
      pageList = gatewayService.findProductByConditions(5l, 0l, "100", "200",iPObject==null?null:iPObject.getAreaNode(),pagenum+"",orderStr);
      point = "3";
    }else if("4".equals(type))
    {
      pageList = gatewayService.findProductByConditions(5l, 0l, "200", "500",iPObject==null?null:iPObject.getAreaNode(),pagenum+"",orderStr);
      point = "4";
    }else if("5".equals(type))
    {
      pageList = gatewayService.findProductByConditions(5l, 0l, "500", "1000",iPObject==null?null:iPObject.getAreaNode(),pagenum+"",orderStr);
      point = "5";
    }else if("6".equals(type))
    {
      pageList = gatewayService.findProductByConditions(5l, 0l, "1000", null,iPObject==null?null:iPObject.getAreaNode(),pagenum+"",orderStr);
      point = "6";
    }
   
    root.put("point", point);
   
View Full Code Here

    Template temp = getConfiguration().getTemplate("goodproselect.ftl");
   
    String type = request.getParameter("typeNumber");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    List<ProductVO> productVOs = null;
   

    String pageno = request.getParameter("pageno");

    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } 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)
    {
View Full Code Here

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("adfirst.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //通栏广告
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CYP_TLGG);
    root.put("productVOs", productVOs);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here

    Template temp = getConfiguration().getTemplate("slideshow.ftl");
   
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //主左同城模块
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CTC_ZZTCMK,iPObject != null?iPObject.getAreaNode():null);
    root.put("productVOs1", productVOs1);
   
    //主右同城模块
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CTC_ZYTCMK,iPObject != null?iPObject.getAreaNode():null);
    root.put("productVOs2", productVOs2);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("hotscreen.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //上周热兑换榜
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CLP_SZRTHB);
    root.put("productVOs1", productVOs1);
   
    //主中展示模块
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CLP_ZZZSMK);
    root.put("productVOs2", productVOs2);
   
    //主右展示模块
    List<ProductVO> productVOs3 = gatewayService.initGatewayInfo(GatewayConstants.CLP_ZYZSMK);
    root.put("productVOs3", productVOs3);
   
    List<ProductVO> productVOs4 = gatewayService.initGatewayInfo(GatewayConstants.CLP_ZYZSMKX);
    root.put("productVOs4", productVOs4);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("famousbrand.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CID_GXMP);
    if(gatewayCategory != null)
    {
      root.put("gatewayCategory", gatewayCategory);
    }
   
    //共享名品上
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CID_GXMP);
   
    if(productVOs1 != null && productVOs1.size() != 0)
    {
      root.put("productVOs1", productVOs1);
    }
   
    //共享名品下
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CID_GXMPX);
   
    if(productVOs2 != null && productVOs2.size() != 0)
    {
      root.put("productVOs2", productVOs2);
    }
View Full Code Here

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("adviseproduct.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //优品推荐区域
   
    //主左展示模块
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CYP_ZZZSMK);
    root.put("productVOs1", productVOs1);
   
//    //主展示模块
//    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CYP_ZZSMK);
//    root.put("productVOs2", productVOs2);
View Full Code Here

TOP

Related Classes of com.lgx8.gateway.service.IGatewayService

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.