Package com.lgx8.common.entities

Examples of com.lgx8.common.entities.IPObject


    super.init(config);
    configuration = new Configuration();
        configuration.setServletContextForTemplateLoading(getServletContext(), "ftl/gateway");
        configuration.setDefaultEncoding("UTF-8");
       
        GatewayConfig gatewayConfig = (GatewayConfig) getServletContext().getAttribute("gatewayConfig");
        base.put("gatewayConfig", gatewayConfig);
   
    List<AreaCategory> areaCategorys = (List<AreaCategory>) getServletContext().getAttribute("areaCategorys");
    base.put("areaCategorys", areaCategorys);
   
View Full Code Here


    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

    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CTC_TCSJLX);
    root.put("productVOs", productVOs);
   
//    String orgId = request.getParameter("orgId");
   
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
   
    String pageno = request.getParameter("pageno1");
    String county = request.getParameter("county");

    String visibleType = request.getParameter("visibleType");
   
    if(StringUtil.isEmptyStr(visibleType))
    {
      visibleType = "0";
    }
   
    root.put("visibleType", visibleType);
   
    //处理当前页
    if(pageno==null) {
      pageno = "1";
    }
    int pagenum = 1;
    try {
      pagenum = Integer.parseInt(pageno);
    } catch (Exception e1) {
      pagenum = 1;
   
   
    root.put("county", county);
   
    PageList pageList = null;
   
    IAdvertisementDao advertisementDao = (IAdvertisementDao) ac.getBean("advertisementDao");
   
    pageList = advertisementDao.findAllAdvertisementByMerchant(iPObject==null?null:iPObject.getAreaNode(),county,"",pagenum,9);
   
    root.put("pageList", pageList);
   
    List<Dictionary> dictionarys = iPObject==null?null:dictionaryDao.listByKindAndCode("city", iPObject.getCode());
    root.put("dictionarys", dictionarys);
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
      temp.process(root, out);
View Full Code Here

    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
    GatewayCategory gatewayCategory = gatewayService.findGatewayCategoryById(GatewayConstants.CTC_TCTG);
    root.put("gatewayCategory", gatewayCategory);
   
    IPObject iPObject = (IPObject) request.getSession().getAttribute("iPObject");
    //同城推广
    List<ProductVO> productVOs = gatewayService.initGatewayInfo(GatewayConstants.CTC_TCTG,iPObject != null?iPObject.getAreaNode():null);
    root.put("productVOs", productVOs);
   
    /* 将模板和数据模型合并 */
    Writer out = response.getWriter();
    try {
View Full Code Here

   
    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

   
    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

    Map<Object, Object> root = new HashMap<Object, Object>();
    root.putAll(base);
   
    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

    String areaName = Escape.unescape(request.getParameter("areaName")).trim();

    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IGatewayService gatewayService = (IGatewayService) ac.getBean("gatewayService");
   
    IPObject iPObject = gatewayService.findIPObjectByAreaName(areaName);
   
    if(iPObject != null)
    {
      request.getSession().setAttribute("iPObject", iPObject);
    }else
View Full Code Here

    return getHibernateTemplate().find(hql);
  }
 
  public static void main(String[] args) {
    ApplicationContext ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
    ICategoryDao categoryDao = (ICategoryDao) ac.getBean("categoryDao");
    List<Category> list = categoryDao.findAllCategoryList(new Long(5));
    for(int i=0;i<list.size();i++) {
      System.out.println(list.get(i).getName());
    }
  }
View Full Code Here

      PrintWriter pw = response.getWriter();
     
      pw.write("1");
    }else if((!"".equals(categoryType)&&categoryType != null) && categoryId != null)
    {
      IGatewayCategoryDetailDao gatewayCategoryDetailDao = (IGatewayCategoryDetailDao) ac.getBean("gatewayCategoryDetailDao");
      GatewayCategoryDetail detail = gatewayCategoryDetailDao.findGatewayCategoryDetailById(Integer.parseInt(id));
      if(!"null".equals(entityId)&&!"".equals(entityId)&&entityId!=null)detail.setEntityId(entityId);
      if(!"null".equals(entityUrl)&&!"".equals(entityUrl)&&entityUrl!=null)detail.setEntityUrl(entityUrl);
      if(!"null".equals(otherUrl)&&!"".equals(otherUrl)&&otherUrl!=null)detail.setOtherUrl(otherUrl);
      if(!"null".equals(areaNode)&&!"".equals(areaNode)&&areaNode!=null)detail.setAreaNode(areaNode);
      if(!"null".equals(url)&&!"".equals(url)&&url!=null)detail.setUrl(url);
      if(!"null".equals(entityName)&&!"".equals(entityName)&&entityName!=null)detail.setEntityName(entityName);
     
      gatewayCategoryDetailDao.updateGatewayCategoryDetail(detail);
    }
   
  }
View Full Code Here

TOP

Related Classes of com.lgx8.common.entities.IPObject

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.