Examples of IGatewayService


Examples of com.lgx8.gateway.service.IGatewayService

  /**
   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    String categoryId = request.getParameter("categoryId");
    String params = request.getParameter("params");
   
    gatewayService.updateGatewayCategoryDetails(Integer.parseInt(categoryId), params);
   
    PrintWriter pw = response.getWriter();
   
    pw.write("1");
  }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("partner.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //合作伙伴
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CST_HZHB);
   
    if(productVOs != null && productVOs.size() != 0)
    {
      root.put("productVOs", productVOs);
    }
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("brand/BrandList.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.findBrandPage(pagenum, Constants.BRAND_LIST_SIZE);
    } else {
      page = gatewayService.findBrandPage(pagenum, Constants.BRAND_LIST_SIZE, searchType, keys);
    }
   
    if(page!=null&&page.getDataList().size()>0) {
      root.put("page", page);
      root.put("Update_Brand_Url", Constants.UPDATE_BRAND_URL);
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    String id = request.getParameter("id");
    String operation = request.getParameter("operation");
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    if("3".equals(operation)) {
      try {
        Category category = gatewayService.findCategory(Long.parseLong(id));
        if(category!=null&&category.getChilds().size()>0) {
          PrintWriter pw = response.getWriter();
          pw.write("0:请先删除子类!");
          return;
        }
        gatewayService.deleteCategory(Long.parseLong(id));
        List<Category> categorys = (List<Category>) getServletContext().getAttribute("categorys");
//        categorys.clear();
//        categorys.addAll(gatewayService.findAllCategory());
       
        getServletContext().setAttribute("categorys", categorys);
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

   
    Merchant merchant = merchantDao.getMerchantById(Long.parseLong(merchantId));
   
    root.put("merchant", merchant);
   
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CST_SJYMGG);
   
    if(productVOs != null && productVOs.size() != 0)
    {
      root.put("productVOs", productVOs);
    }
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

   
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(base);
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");

    String newsType = request.getParameter("newsType");
   
    root.put("newsType", newsType);
   
    String newsName = "新闻中心";
   
    if("1".equals(newsType)||newsType==null)
    {
      newsName = "新闻中心";
    }else if("2".equals(newsType))
    {
      newsName = "公告中心";
    }else if("3".equals(newsType))
    {
      newsName = "新手上路";
    }
   
    root.put("newsName", newsName);
   
    if("main".equals(type))
    {
      String newsId = request.getParameter("newsId");
     
      News news = gatewayService.findById(Integer.parseInt(newsId));
     
      root.put("news", news);
     
      News upnews = gatewayService.findUpNewsByCurrId(newsType, Integer.parseInt(newsId));
     
      root.put("upnews", upnews);
     
      News downnews = gatewayService.findDownNewsByCurrId(newsType, Integer.parseInt(newsId));
     
      root.put("downnews", downnews);
     
    }else
    {
      String pageno = request.getParameter("pageno");

      //处理当前页
      if(pageno==null) {
        pageno = "1";
      }
      int pagenum = 1;
      try {
        pagenum = Integer.parseInt(pageno);
      } catch (Exception e1) {
        pagenum = 1;
      }
     
      int pageSize = 15;
     
      PageList pageList = gatewayService.findNewsByConditions(newsType, null, pagenum, pageSize);
     
      if(pageList!=null&&pageList.getDataList()!=null)
      {
        root.put("pageList", pageList);
      }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("excellentproduct.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CID_GXYP);
    if(gatewayCategory != null)
    {
      root.put("gatewayCategory", gatewayCategory);
    }
   
    //共享优品
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CID_GXYP);
   
    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("cityshop.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    IDictionaryDao dictionaryDao = (IDictionaryDao) ac.getBean("dictionaryDao");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CTC_TCSJ);
    root.put("gatewayCategory", gatewayCategory);
   
    //同城商家类型
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CTC_TCSJLX);
    root.put("productVOs", productVOs);
   
//    String orgId = request.getParameter("orgId");
   
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

     
//      gatewayConfig.setUrl("http://localhost:8080/yikatao");
     
      Constants.gatewayConfig = gatewayConfig;
     
      IGatewayService gatewayService = (IGatewayService) appContext.getBean("gatewayService");
    List<AreaCategory> areaCategorys = gatewayService.findAllAreaCategory();
    if(areaCategorys!=null&&areaCategorys.size()>0) {
      servletContext.setAttribute("areaCategorys", areaCategorys);
    }
    List<Category> categorys = gatewayService.findAllCategory();
    if(categorys!=null&&categorys.size()>0) {
      servletContext.setAttribute("categorys", categorys);
    }
   
    Map<Long, Category> categoryMap = new HashMap<Long, Category>();
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.