Package com.lgx8.management.dao.impl

Examples of com.lgx8.management.dao.impl.AccountDetailDao


    return detail;
  }

  @Transactional
  public void deleteGatewayCategoryDetail(Integer id) {
    GatewayCategoryDetail detail = getHibernateTemplate().get(GatewayCategoryDetail.class, id);
    getHibernateTemplate().delete(detail);
  }
View Full Code Here


     
      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

    getHibernateTemplate().persist(op);
  }

  @Transactional
  public void deleteOrderProduct(long id) {
    OrderProduct op = findOrderProduct(id);
    if(op!=null) {
      op.getOrders().getOrderProducts().remove(op);
      getHibernateTemplate().delete(op);
    }
  }
View Full Code Here

  @Transactional
  public Orders findCartByUserId(User user) {
    String hql = "from Orders o where o.status="+Orders.STATUS_CART+" and o.user.id="+user.getId();
    List<Orders> list = getHibernateTemplate().find(hql);
    if(list==null||list.size()==0) {
      Orders o = new Orders();
      //o.setId(System.currentTimeMillis());
      o.setUser(user);
      o.setStatus(Orders.STATUS_CART);
      o.setShoppingtime(new Date());
      createOrders(o);
      return o;
    } else {
      return list.get(0);
    }
View Full Code Here

     
//      String[] ids = idStr.split(",");
     
      List<Orders> orderList = orderService.queryOrders("from Orders o where o.id in ("+idStr+")", new Object[]{});
      if(null!=orderList&&orderList.size()>0){
        Orders order = orderList.get(0);
        order.setConfirmtime(new Date());
        order.setStatus(Orders.STATUS_CONFIRM);
        orderService.updateOrder(order);
      }
      //跳转
      response.setContentType("text/html;charset=UTF-8");
      PrintWriter out = response.getWriter();
View Full Code Here

      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>();
      for(int i=0;i<colors.length;i++) {
        colorMap.put(colors[i], colors[i]);
      }
      root.put("colorMap", colorMap);
     
      String clothesize = product.getClothessize();
      String[] clothesizes = clothesize.split(";");
      Map<String, String> clothesizeMap = new HashMap<String, String>();
      for(int i=0;i<clothesizes.length;i++) {
        clothesizeMap.put(clothesizes[i], clothesizes[i]);
      }
      root.put("clothesizeMap", clothesizeMap);
     
      String shoesize = product.getShoesize();
      String[] shoesizes = shoesize.split(";");
      Map<String, String> shoesizeMap = new HashMap<String, String>();
      for(int i=0;i<shoesizes.length;i++) {
        shoesizeMap.put(shoesizes[i], shoesizes[i]);
      }
      root.put("shoesizeMap", shoesizeMap);
     
      String fareway = product.getFareway();
      String[] fareways = fareway.split(";");
      Map<String, String> farewayMap = new HashMap<String, String>();
      for(int i=0;i<fareways.length;i++) {
        farewayMap.put(fareways[i], fareways[i]);
      }
View Full Code Here

    this.productPropertyCategoryDao = productPropertyCategoryDao;
  }

  @Transactional
  public ProductProperty createProductProperty(Long categoryId, String value) {
    ProductProperty property = new ProductProperty();
    property.setEnabled(true);
   
    ProductPropertyCategory category = productPropertyCategoryDao.findProductPropertyCategoryById(categoryId);
   
    property.setCategory(category);
    property.setValue(value);
    getHibernateTemplate().persist(property);
    return property;
  }
View Full Code Here

    getHibernateTemplate().update(property);
    return property;
  }

  public ProductProperty findProductPropertyById(Long id) {
    ProductProperty property = getHibernateTemplate().get(ProductProperty.class, id);
    return property;
  }
View Full Code Here

    return property;
  }

  @Transactional
  public void deleteProductProperty(Long id) {
    ProductProperty property = findProductPropertyById(id);
    property.setEnabled(false);
    getHibernateTemplate().update(property);
  }
View Full Code Here

  @Transactional
  public ProductProperty createProductProperty(Long categoryId, String value) {
    ProductProperty property = new ProductProperty();
    property.setEnabled(true);
   
    ProductPropertyCategory category = productPropertyCategoryDao.findProductPropertyCategoryById(categoryId);
   
    property.setCategory(category);
    property.setValue(value);
    getHibernateTemplate().persist(property);
    return property;
View Full Code Here

TOP

Related Classes of com.lgx8.management.dao.impl.AccountDetailDao

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.