Package com.eatle.persistent.pojo.merchant.RestaurantCriteria

Examples of com.eatle.persistent.pojo.merchant.RestaurantCriteria.Criteria.andMerchantIdEqualTo()


    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap.containsKey("merchantId"))
      {
        criteria.andMerchantIdEqualTo(Long.parseLong((String) queryMap.get("merchantId")));
      }
      if (queryMap.containsKey("name"))
      {
        criteria.andNameLike("%" + (String) queryMap.get("name") + "%");
      }
View Full Code Here


    List<Merchant> merchants = merchantService.findAll();
    for(int i = 0, len = merchants.size(); i < len; i++)
    {
      RestaurantCriteria rc = new RestaurantCriteria();
      Criteria criteria = rc.createCriteria();
      criteria.andMerchantIdEqualTo(merchants.get(i).getId());
      map.put((i + 1) + "." + merchants.get(i).getMerchantName(), findByCriteria(rc));
    }
    return map;
  }
 
View Full Code Here

    // 获取所有用户
    users = userService.findAll();
    // 根据商家ID获取相应餐厅
    RestaurantCriteria rc = new RestaurantCriteria();
    Criteria criteria = rc.createCriteria();
    criteria.andMerchantIdEqualTo(userMerchant.getMerchantId());
    restaurants = restaurantService.findByCriteria(rc);
    return "showAdd";
  }

  public void add() throws IOException
View Full Code Here

    // 获取所有用户
    users = userService.findAll();
    // 根据商家ID获取相应餐厅
    RestaurantCriteria rc = new RestaurantCriteria();
    Criteria criteria = rc.createCriteria();
    criteria.andMerchantIdEqualTo(userMerchant.getMerchantId());
    restaurants = restaurantService.findByCriteria(rc);
    // 对可管理餐厅处理,将可管理的餐厅标记,迭代展示时使用
    List<String> ids = Arrays.asList(userMerchant.getManageRestaurantList().split(","));
    for(Restaurant r : restaurants)
    {
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.