Package com.lgx8.common.payment.util

Examples of com.lgx8.common.payment.util.AlipaySubmit


  public Card createUserByCard(String card, Double score, long parenttype,
      long usertype, long organizationid, User parent, User opener,String mobile,String email) {
   
    String password = createRandomPassowrd(5);
   
    Card car= new Card();
    car.setId(card);
    car.setScore(score);
    car.setPassword(password);
    this.getHibernateTemplate().persist(car);
   
    String md5Passwd = EncryptUtil.toMD5(password);
    User user = new User();
    user.setPassword(md5Passwd);
View Full Code Here


    getHibernateTemplate().bulkUpdate("delete from Category c where c.id="+id);
  }
 
  public List<Category> findAllCategoryList(long id) {
    List<Category> list = new ArrayList<Category>();
    Category category = getHibernateTemplate().get(Category.class, id);
    if(category!=null) {
      list.add(category);
      List<Category> childs = findAllChilds(list);
      while(childs!=null&&childs.size()>0) {
        for(Category c:childs) {
View Full Code Here

    return findByPage4Report(hql, new Object[]{}, argment.getCurPage(), argment.getPageSize());
  }

  public List<Category> findAllCategoryList(long id) {
    List<Category> list = new ArrayList<Category>();
    Category category = findCategory(id);
    if(category!=null) {
      list.add(category);
      List<Category> childs = findAllChilds(list);
      while(childs!=null&&childs.size()>0) {
        for(Category c:childs) {
View Full Code Here

    }
  }
 
  @Transactional
  public void deleteCategory(long id) {
    Category category = findCategory(id);
    getHibernateTemplate().delete(category);
  }
View Full Code Here

  }

  @Transactional
  public GatewayCategoryDetail updateGatewayCategoryDetail(
      Integer categoryId, Integer id, String layerOrder) {
    GatewayCategory category = gatewayCategoryDao.findGatewayCategoryById(categoryId);
    GatewayCategoryDetail detail = getHibernateTemplate().get(GatewayCategoryDetail.class, id);
    detail.setCategory(category);
    detail.setLayerOrder(layerOrder);
    getHibernateTemplate().update(detail);
    return detail;
View Full Code Here

    return getHibernateTemplate().get(GatewayCategory.class, id);
  }

  public String getGatewayCategoryFullName(Integer id) {
    String name = "";
    GatewayCategory cate = this.findGatewayCategoryById(id);
    name = cate.getName();
    if(cate.getParent() != null)
    {
      GatewayCategory pcate = cate.getParent();
      name = getGatewayCategoryFullName(pcate.getId()) + "->" + name;
    }
    return name;
  }
View Full Code Here

      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));
     
View Full Code Here

    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 = "";
      }
View Full Code Here

  }

  @Transactional
  public GatewayCategoryDetail saveGatewayCategoryDetail(GatewayCategory category,
      String entityId, String entityUrl,String entityName, String layerOrder, Integer type,String areaNode,String url,String otherUrl) {
    GatewayCategoryDetail detail = new GatewayCategoryDetail();
    detail.setCategory(category);
    detail.setEnabled(true);
    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("".equals(layerOrder) || layerOrder == null || "null".equals(layerOrder))
    {
      String hql = "from GatewayCategoryDetail d where d.enabled = true and d.category.id = " + category.getId();
      hql += " order by d.layerOrder desc";
      List<GatewayCategoryDetail> details = getHibernateTemplate().find(hql);
      if(details.size() == 0)
      {
        detail.setLayerOrder("0001");
      }else
      {
        Pattern pattern = Pattern.compile("([0-9]+)*");

        Matcher m = pattern.matcher(details.get(0).getLayerOrder());
        boolean b = m.matches();

        if(b)
        {
          Integer order = Integer.parseInt(details.get(0).getLayerOrder());
          String orderStr = "";
          order ++;
          if(order < 10)
          {
            orderStr = "000"+order;
          }else if(order < 100)
          {
            orderStr = "00"+order;
          }else if(order < 1000)
          {
            orderStr = "0"+order;
          }else
          {
            orderStr = ""+order;
          }
          detail.setLayerOrder(orderStr);
        }else
        {
          detail.setLayerOrder(details.get(0).getLayerOrder()+"1");
        }
      }
    }else
      detail.setLayerOrder(layerOrder);
    detail.setType(type);
    detail.setEntityName(entityName);
   
    getHibernateTemplate().persist(detail);
   
    return detail;
  }
View Full Code Here

  @Transactional
  public GatewayCategoryDetail updateGatewayCategoryDetail(
      Integer categoryId, Integer id, String layerOrder) {
    GatewayCategory category = gatewayCategoryDao.findGatewayCategoryById(categoryId);
    GatewayCategoryDetail detail = getHibernateTemplate().get(GatewayCategoryDetail.class, id);
    detail.setCategory(category);
    detail.setLayerOrder(layerOrder);
    getHibernateTemplate().update(detail);
    return detail;
  }
View Full Code Here

TOP

Related Classes of com.lgx8.common.payment.util.AlipaySubmit

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.