Examples of IGatewayService


Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("hotscreen.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //热门商品
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CID_RMSP);
   
    if(productVOs1 != null && productVOs1.size() != 0)
    {
      root.put("productVOs1", productVOs1);
    }
   

    //热兑换
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CID_SZRTHB);
   
    if(productVOs2 != null && productVOs2.size() != 0)
    {
      root.put("productVOs2", productVOs2);
    }
   
    List<News> listNews1 = gatewayService.findByType("1");
   
    root.put("listNews1", listNews1);
   
    List<News> listNews2 = gatewayService.findByType("2");
   
    root.put("listNews2", listNews2);
   
    List<News> listNews3 = gatewayService.findByType("3");
   
    root.put("listNews3", listNews3);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("supplier/SupplierList.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    String pageno = request.getParameter("pageno");
    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } catch (Exception e1) {
      pagenum = 1;
    }
   
   
    String searchType = request.getParameter("searchType");
    String keyword = request.getParameter("keyword");
    //处理关键字
    String[] keys = null;
    if(keyword!=null) {
      keyword = keyword.trim();
    }
    if(keyword==null||"".equals(keyword)) {
      keys = null;
    } else {
      root.put("keyword", keyword);
      root.put("searchType", searchType);
      if(keyword.indexOf(" ")>0) {
        String[] keywords = keyword.split(" ");
        keys = new String[keywords.length+1];
        keys[0] = keyword;
        for(int i=1;i<keys.length;i++) {
          keys[i] = keywords[i-1];
        }
      } else {
        keys = new String[]{keyword };
      }
    }
   
   
    PageList page = null;
    if(keys==null) {
      page = gatewayService.findSupplierPage(pagenum, Constants.SUPPLIER_LIST_SIZE);
    } else {
      page = gatewayService.findSupplierPage(pagenum, Constants.SUPPLIER_LIST_SIZE, searchType, keys);
    }
    if(page!=null&&page.getDataList().size()>0) {
      root.put("page", page);
      root.put("Update_Supplier_Url", Constants.UPDATE_SUPPLIER_URL);
    }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("cityproduct.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CID_GXTC);
    if(gatewayCategory != null)
    {
      root.put("gatewayCategory", gatewayCategory);
    }
   
    List<ProductVO> productVOs0 = gatewayService.initGatewayInfo(GatewayConstants.CID_GXTCLX);
   
    if(productVOs0 != null && productVOs0.size() != 0)
    {
      root.put("productVOs0", productVOs0);
    }
   
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
   
    //共享同城(上左)
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CID_GXTCSZ,iPObject != null?iPObject.getAreaNode():null);
   
    if(productVOs1 != null && productVOs1.size() != 0)
    {
      root.put("productVOs1", productVOs1);
    }
   
    //共享同城(上右)
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CID_GXTCSY,iPObject != null?iPObject.getAreaNode():null);
   
    if(productVOs2 != null && productVOs2.size() != 0)
    {
      root.put("productVOs2", productVOs2);
    }
   
    //共享同城(下)
    List<ProductVO> productVOs3 = gatewayService.initGatewayInfo(GatewayConstants.CID_GXTCX,iPObject != null?iPObject.getAreaNode():null);
   
    if(productVOs3 != null && productVOs3.size() != 0)
    {
      root.put("productVOs3", productVOs3);
    }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("product/ProductList.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    String pageno = request.getParameter("pageno");
    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } catch (Exception e1) {
      pagenum = 1;
    }
   
    root.put("Update_Product_Url", Constants.UPDATE_PRODUCT_URL);
   
    String byProductId = request.getParameter("byProductId");
    //根据商品编号精确查询
    if("1".equals(byProductId)) {
      /*String productid = request.getParameter("productid");
      Product product = null;
      try {
        product = gatewayService.findProductById(Long
            .parseLong(productid));
      } catch (Exception e) {
        product = null;
      }
      if(product!=null) {
        List<Product> dataList = new ArrayList<Product>();
        dataList.add(product);
        PageList page = new PageList();
        page.setCurrentPageNum(1);
        page.setPageSize(Constants.PRODUCT_LIST_SIZE);
        page.setTotalPageNum(1);
        page.setTotalRecordNum(1);
        page.setDataList(dataList);
        root.put("page", page);
      } else {
       
      }*/
      String code = request.getParameter("productid");
      PageList page = gatewayService.findProductPageByCode(code, pagenum, Constants.PRODUCT_LIST_SIZE);
      if(page!=null&&page.getDataList().size()>0) {
        root.put("page", page);
      }
    } else {
      String keyword = request.getParameter("keyword");
      //处理关键字
      String[] keys = null;
      if(keyword!=null) {
        keyword = keyword.trim();
      }
      if(keyword==null||"".equals(keyword)) {
        keys = null;
      } else {
        root.put("keyword", keyword);
        if(keyword.indexOf(" ")>0) {
          String[] keywords = keyword.split(" ");
          keys = new String[keywords.length+1];
          keys[0] = keyword;
          for(int i=1;i<keys.length;i++) {
            keys[i] = keywords[i-1];
          }
        } else {
          keys = new String[]{keyword };
        }
      }
     
      String areaCategoryId = request.getParameter("areaCategoryId");
      root.put("areaCategoryId", areaCategoryId);
      String categoryId = request.getParameter("categoryId");
      root.put("categoryId", categoryId);
     
      long aid = -1;
      long cid = -1;
      try {
        aid = Long.parseLong(areaCategoryId);
      } catch (Exception e) {
        aid = -1;
      }
      try {
        cid = Long.parseLong(categoryId);
      } catch (Exception e) {
        cid = -1;
      }
      String keytype = request.getParameter("keytype");
      root.put("keytype", keytype);
      if(keytype==null) {
        keytype = "1";
      }
     
      PageList page = gatewayService.findProductPage(aid, cid, keytype, keys, pagenum, Constants.PRODUCT_LIST_SIZE);
      if(page!=null&&page.getDataList().size()>0) {
        root.put("page", page);
      }
    }
    /* 将模板和数据模型合并 */
 
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("adfirst.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //通栏广告
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CID_TLGG);
   
    if(productVOs != null && productVOs.size() != 0)
    {
      root.put("productVOs", productVOs);
    }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

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

Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("shoplogo.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //名品商家//名品品牌集
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CMP_MPPPJ);
    root.put("productVOs", productVOs);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    root.put("categorys", categorys);
   
    root.put("searchURL", Constants.SEARCH_URL);
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    List<IPObject> iPObjects = gatewayService.findAllIPObject();
   
    root.put("iPObjects",iPObjects);
  }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

                      sourcePath = path[path.length-3]+"/"+ path[path.length-2]+"/"+ path[path.length-1];
                      productImage.setSourceURL(sourcePath);
                    
                     
                      ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
                      IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
                      gatewayService.createProductImage(productImage);
                     
                      GatewayConfig gatewayConfig = (GatewayConfig) getServletContext().getAttribute("gatewayConfig");
                     
                      PrintWriter out = response.getWriter();
                     
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    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.CMP_MPLB);
    root.put("gatewayCategory", gatewayCategory);
   
    //名品列表
//    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CMP_MPLB);
//    root.put("productVOs1", productVOs1);
   
    //优品列表商品类型
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CMP_MPLBLX);
    root.put("productVOs2", productVOs2);
   
    List<List<Product>> results = new ArrayList<List<Product>>();
   
    for(ProductVO vo : productVOs2)
    {
      List<Product> products = gatewayService.findProductByConditions(3l, Long.parseLong(vo.getEntityId()), null, 0, 0,null);
      results.add(products);
    }
   
    root.put("results", results);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.