Package com.lgx8.gateway.service

Examples of com.lgx8.gateway.service.IGatewayService


    } catch (Exception e) {
      lbrandid = -1;
    }
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
 
    PageList page = null;
    if("all".equals(areacategoryid)&&"all".equals(categoryid)&&"all".equals(brandid)) {
     
    } else if("all".equals(areacategoryid)&&"all".equals(categoryid)) {
      //查商品
      if("1".equals(type)) {
        page = gatewayService.findProduct(keys, pagenum, Constants.SEARCH_RESULT_PAGE_SIZE, orderStr);
      //查品牌
      } else {
        if(brandid!=null&&!"".equals(brandid)&&lbrandid!=-1) {
          page = gatewayService.findProductByBrand(lbrandid, pagenum, Constants.SEARCH_RESULT_PAGE_SIZE, orderStr);
        } else {
          page = gatewayService.findProductByBrand(keys, pagenum, Constants.SEARCH_RESULT_PAGE_SIZE, orderStr);
        }
      }
      //查询指定商品分类下面所有分区商品
    } else if("all".equals(areacategoryid)&&categoryid!=null) {
      page = gatewayService.findProduct(new Long(categoryid), keys, pagenum, Constants.SEARCH_RESULT_PAGE_SIZE, orderStr);
      //查询指定分区下面所有商品分类
    } else if("all".equals(categoryid)&&areacategoryid!=null) {
      page = gatewayService.findProductAllCategory(new Long(areacategoryid), keys, pagenum, Constants.SEARCH_RESULT_PAGE_SIZE, orderStr);
    } else if(categoryid!=null&&areacategoryid!=null) {
      page = gatewayService.findProduct(new Long(areacategoryid), new Long(categoryid), keys, pagenum, Constants.SEARCH_RESULT_PAGE_SIZE, orderStr);
    }
     
   
   
   
    Template temp = null;
   
    //TODO 假数据
    List<Product> lastWeekHotProduct = gatewayService.findLastWeekHotProduct(Constants.LAST_WEEK_HOT_PRODUCT_SIZE);
    if(lastWeekHotProduct!=null) {
      root.put("lastWeekHotProduct", lastWeekHotProduct);
    }
   
    //TODO 猜你喜欢的商品,先做假数据
View Full Code Here


    response.setCharacterEncoding("UTF-8");
   
    String id = request.getParameter("id");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    gatewayService.deleteProductProperty(Long.parseLong(id));
   
    pw.write("1");
  }
View Full Code Here

   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    String categoryId = request.getParameter("categoryId");
   
    if(categoryId == null || "".equals(categoryId) || "null".equals(categoryId))
    {
      categoryId = "0";
    }else
    {
      Template temp = getConfiguration().getTemplate("listGatewayCategoryDetail.ftl");
     
      GatewayCategory category = gatewayService.findGatewayCategoryById(Integer.parseInt(categoryId));
     
      root.put("category", category);
     
      List<GatewayCategoryDetail> details = gatewayService.findGatewayCategoryDetailByCategoryId(Integer.parseInt(categoryId));
     
      root.put("details", details);
     
      /* 将模板和数据模型合并 */
      Writer out = response.getWriter();
View Full Code Here

    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("product/ProductDetail.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    String id = request.getParameter("id");
    long lid = -1;
    try {
      lid = Long.parseLong(id);
    } catch (Exception e1) {
      lid = -1;
    }
   
    Product product = gatewayService.findProductById(lid);
    if(product!=null) {
      root.put("product", product);
      root.put("Product_List_Url", Constants.PRODUCT_LIST_URL);
     
      List<Brand> brands = gatewayService.findBrand();
      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> farewaySelect = gatewayService.findFare();
      if(farewaySelect!=null&&farewaySelect.size()>0) {
        root.put("farewaySelect", farewaySelect);
      }
     
      List<IPObject> iPObjects = gatewayService.findAllIPObject();
      root.put("iPObjects", iPObjects);
     
      String color = product.getColor();
      String[] colors = color.split(";");
      Map<String, String> colorMap = new HashMap<String, String>();
View Full Code Here

  /**
   * @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 id = request.getParameter("id");
    String categoryId = request.getParameter("categoryId");
    String categoryType = request.getParameter("type");
    String areaNode = request.getParameter("areaNode");
    String entityId = request.getParameter("entityId");
    String entityUrl = request.getParameter("entityUrl");
    String otherUrl = request.getParameter("otherUrl");
    String entityName = request.getParameter("entityName");
    String url = request.getParameter("url");
    String layerOrder = request.getParameter("layerOrder");
    if((!"".equals(categoryType)&&categoryType != null) &&("".equals(id)||id == null) && categoryId != null)
    {
      GatewayCategory category = gatewayService.findGatewayCategoryById(Integer.parseInt(categoryId));
     
      if("".equals(areaNode)|| areaNode == null || "null".equals(areaNode))
      {
        areaNode = "";
      }
      gatewayService.saveGatewayCategoryDetail(category, entityId, entityUrl, entityName, layerOrder, Integer.parseInt(categoryType),areaNode,url,otherUrl);
      PrintWriter pw = response.getWriter();
     
      pw.write("1");
    }else if((!"".equals(categoryType)&&categoryType != null) && categoryId != null)
    {
View Full Code Here

  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
   
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    List<Advertisement> advertisements = gatewayService.findAllAdvertisement();
   
    Template temp = getConfiguration().getTemplate("listAdvertisement.ftl");
   
    root.put("advertisements", advertisements);
   
View Full Code Here

    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(super.root);
    Template temp = getConfiguration().getTemplate("selectImage.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    List<ProductImage> productImages = gatewayService.findProductImageListOrderByTime("desc");
   
    if(productImages!=null&&productImages.size()>0) {
      root.put("productImages", productImages);
    }
   
View Full Code Here

    root.putAll(base);
   
    Template temp = getConfiguration().getTemplate("adviseshop.ftl");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //商家一
    List<ProductVO> productVOs11 = gatewayService.initGatewayInfo(GatewayConstants.CLP_TJSJ11);
    root.put("productVOs11", productVOs11);
   
    List<ProductVO> productVOs12 = gatewayService.initGatewayInfo(GatewayConstants.CLP_TJSJ12);
    root.put("productVOs12", productVOs12);
   
    List<ProductVO> productVOs13 = gatewayService.initGatewayInfo(GatewayConstants.CLP_TJSJ13);
    root.put("productVOs13", productVOs13);
   
    //商家二
    List<ProductVO> productVOs21 = gatewayService.initGatewayInfo(GatewayConstants.CLP_TJSJ21);
    root.put("productVOs21", productVOs21);
   
    List<ProductVO> productVOs22 = gatewayService.initGatewayInfo(GatewayConstants.CLP_TJSJ22);
    root.put("productVOs22", productVOs22);
   
    List<ProductVO> productVOs23 = gatewayService.initGatewayInfo(GatewayConstants.CLP_TJSJ23);
    root.put("productVOs23", productVOs23);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here

  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(base);
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    //良品分类
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CLP_LPFL);
    root.put("gatewayCategory", gatewayCategory);
   
    //良品分类
    List<ProductVO> productVOs1 = gatewayService.initGatewayInfo(GatewayConstants.CLP_LPFL);
    root.put("productVOs1", productVOs1);
   
    //良品分类商品类型
    List<ProductVO> productVOs2 = gatewayService.initGatewayInfo(GatewayConstants.CLP_LPFLSPLX);
    root.put("productVOs2", productVOs2);
   
    Template temp = getConfiguration().getTemplate("goodprocate.ftl");
   
    /* 将模板和数据模型合并 */
 
View Full Code Here

    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

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.