Examples of IGatewayService


Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("adviseproduct2.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //奢品模块二
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CSP_SPMK2);
    root.put("productVOs", productVOs);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
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/AddProduct.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    List<Brand> brands = gatewayService.findAllBrand();
    if(brands!=null&&brands.size()>0) {
      root.put("brands", brands);
    }
    List<ProductProperty> colorSelect = gatewayService.findProductPropertyByCategoryId(Constants.PROPERTYCOLOR);
    if(colorSelect!=null&&colorSelect.size()>0) {
      root.put("colorSelect", colorSelect);
    }
   
    List<ProductProperty> coltheSizeSelect = gatewayService.findProductPropertyByCategoryId(Constants.PROPERTYCLOTHESIZE);
    if(coltheSizeSelect!=null&&coltheSizeSelect.size()>0) {
      root.put("coltheSizeSelect", coltheSizeSelect);
    }
   
    List<ProductProperty> shoeSizeSelect = gatewayService.findProductPropertyByCategoryId(Constants.PROPERTYSHOESIZE);
    if(shoeSizeSelect!=null&&shoeSizeSelect.size()>0) {
      root.put("shoeSizeSelect", shoeSizeSelect);
    }
   
    List<FareWay> fareways = gatewayService.findFare();
    if(fareways!=null&&fareways.size()>0) {
      root.put("fareways", fareways);
    }
   
    List<IPObject> iPObjects = gatewayService.findAllIPObject();
    root.put("iPObjects", iPObjects);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    String description = request.getParameter("description");
    String parentid = request.getParameter("parentid");
    String sendMsg = request.getParameter("sendMsg");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    Category category = new Category();
    category.setName(name);
    category.setUrl(url);
    category.setDescription(description);
    category.setSendMsg(sendMsg);
   
    Category parent = null;
    //非顶级目录
    if(parentid!=null&&!"-1".equals(parentid)) {
      parent = gatewayService.findCategory(new Long(parentid));
    }
    if(parent!=null) {
      category.setParent(parent);
    }
   
    gatewayService.createCategory(category);
   
    //更新ServletContext中的目录列表
    List<Category> categorys = (List<Category>) getServletContext().getAttribute("categorys");
    categorys.clear();
    categorys.addAll(gatewayService.findAllCategory());
   
    Map<Long, Category> categoryMap = new HashMap<Long, Category>();
    GatewayIndexListen.addCategoryToMap(categorys, categoryMap);
    getServletContext().setAttribute("categoryMap", categoryMap);
   
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

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

Examples of com.lgx8.gateway.service.IGatewayService

        out.flush();
        return;
      }
     
      ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
      IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
     
      boolean supplierNameExsits = gatewayService.checkSupplierNameExists(name);
     
      if(supplierNameExsits) {
        out.print("({'result':'0','msg':'供应商名称已经存在!'})");
        out.flush();
        return;
      }
     
     
      Supplier supplier = new Supplier();
      supplier.setName(name);
      supplier.setDescription(description);
      supplier.setBusinessNum(businessNum);
      supplier.setLegalPerson(legalPerson);
      supplier.setMobile(mobile);
      supplier.setEmail(email);
      supplier.setQq(qq);
      supplier.setWangwang(wangwang);
      supplier.setAddress(address);
      supplier.setIsproduct(isProduct);
     
     
     
     
      gatewayService.createSupplier(supplier);
     
     
      out.print("({'result':'1','msg':'成功添加供应商!'})");
      out.flush();
      return;
    } else if("2".equals(operation)) {
      String id = request.getParameter("id");
     
      long lid = -1;
      try {
        lid = Long.parseLong(id);
      } catch (Exception e) {
        lid = -1;
      }
      ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
      IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
     
      Supplier supplier = gatewayService.findSupplier(lid);
      if(supplier==null) {
        out.print("({'result':'0','msg':'修改的供应商信息不存在!'})");
        out.flush();
        return;
      }
     
      String name = request.getParameter("name");
      /*if(gatewayService.checkSupplierNameExists(name)) {
        out.print("({'result':'0','msg':'供应商名称已存在!'})");
        out.flush();
        return;
      }*/
     
      String description = request.getParameter("description");
      String businessNum = request.getParameter("businessNum");
      String legalPerson = request.getParameter("legalPerson");
      String mobile = request.getParameter("mobile");
      String email = request.getParameter("email");
      String qq = request.getParameter("qq");
      String wangwang = request.getParameter("wangwang");
      String address = request.getParameter("address");
      String isproduct = request.getParameter("isproduct");
      int isProduct = 1;
      if("0".equals(isproduct)) {
        isProduct = 0;
      }
     
      if(name==null||"".equals(name)) {
        out.print("({'result':'0','msg':'供应商名称不能为空!'})");
        out.flush();
        return;
      }
     
     
      supplier.setName(name);
      supplier.setDescription(description);
      supplier.setBusinessNum(businessNum);
      supplier.setLegalPerson(legalPerson);
      supplier.setMobile(mobile);
      supplier.setEmail(email);
      supplier.setQq(qq);
      supplier.setWangwang(wangwang);
      supplier.setAddress(address);
      supplier.setIsproduct(isProduct);
     
      gatewayService.updateSupplier(supplier);
     
      out.print("({'result':'1','msg':'修改供应商信息成功!'})");
      out.flush();
      return;
    } else if("3".equals(operation)) {
      String id = request.getParameter("id");
     
      long lid = -1;
      try {
        lid = Long.parseLong(id);
      } catch (Exception e) {
        lid = -1;
      }
      ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
      IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
     
      gatewayService.deleteSupplier(lid);
     
      request.getRequestDispatcher("page/gateway/admin/supplier/SupplierList.jsp").forward(request, response);
    }
   
  }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("guide.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //新手上路
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CST_XSSL);
   
    if(productVOs1 != null && productVOs1.size() != 0)
    {
      root.put("productVOs1", productVOs1);
    }
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    } catch (Exception e1) {
      productId = 0;
    }
    Product product = null;
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(base);
   
    root.put("searchURL", Constants.SEARCH_URL);
   
    if(productId!=0) {
      product = gatewayService.findProductById(productId);
    }
    if(product!=null) {
      root.put("product", product);
      if(product.getColor()!=null&&!"".equals(product.getColor())) {
        List<ProductProperty> colors = gatewayService.findProductPropertyByIds(product.getColor().split(";"));
        if(colors!=null&&colors.size()>0) {
          root.put("colors", colors);
        }
      }
      if(product.getClothessize()!=null&&!"".equals(product.getClothessize())) {
        List<ProductProperty> clothesizes = gatewayService.findProductPropertyByIds(product.getClothessize().split(";"));
        if(clothesizes!=null&&clothesizes.size()>0) {
          root.put("clothesizes", clothesizes);
        }
      }
      if(product.getShoesize()!=null&&!"".equals(product.getShoesize())) {
        List<ProductProperty> shoesizes = gatewayService.findProductPropertyByIds(product.getShoesize().split(";"));
        if(shoesizes!=null&&shoesizes.size()>0) {
          root.put("shoesizes", shoesizes);
        }
      }
     
      long supplierid = -1;
      try {
        supplierid = product.getBrand().getSupplier().getId();
      } catch (Exception e) {
        supplierid = -1;
      }
      //供应商相关产品
      List<Product> relatedProducts = gatewayService.findProductBySupplier(supplierid, Product.ONSALE, Constants.RELATED_PRODUCT_SIZE);;
      if(relatedProducts!=null) {
        root.put("relatedProducts", relatedProducts);
      }
    }
   
   
    //TODO 假数据
    List<Product> lastWeekHotProduct = gatewayService.findLastWeekHotProduct(Constants.LAST_WEEK_HOT_PRODUCT_SIZE);
    if(lastWeekHotProduct!=null) {
      root.put("lastWeekHotProduct", lastWeekHotProduct);
    }
   
    //TODO 猜你喜欢的商品,先做假数据
    List<Product> yourLoveProducts =  gatewayService.yourLoveProducts();
    if(yourLoveProducts!=null) {
      root.put("yourLoveProducts", yourLoveProducts);
    }
   
   
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

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

Examples of com.lgx8.gateway.service.IGatewayService

    } catch (Exception e1) {
      productId = 0;
    }
    Product product = null;
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(base);
   
    if(productId!=0) {
      product = gatewayService.findProductById(productId);
    }
    if(product!=null) {
      root.put("product", product);
    }
   
View Full Code Here

Examples of com.lgx8.gateway.service.IGatewayService

    root.putAll(super.root);
   
    Template temp = getConfiguration().getTemplate("newscreen.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CID_XPTJ);
    if(gatewayCategory != null)
    {
      root.put("gatewayCategory", gatewayCategory);
    }
   
    //新品推荐
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CID_XPTJ);
   
    if(productVOs1 != null && productVOs1.size() != 0)
    {
      root.put("productVOs1", productVOs1);
    }
   
    //新品推荐2
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CID_XPTJ2);
   
    if(productVOs2 != null && productVOs2.size() != 0)
    {
      root.put("productVOs2", productVOs2);
    }
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.