Package com.eatle.persistent.pojo.merchant

Examples of com.eatle.persistent.pojo.merchant.SchoolRestaurantCriteria


  }

  @Override
  public Pagination findPagination(Map<String, Object> queryMap, int currentPage, int pageSize)
  {
    SchoolRestaurantCriteria schoolRestaurantCriteria = new SchoolRestaurantCriteria();
    Criteria criteria = schoolRestaurantCriteria.createCriteria();
    // 设置搜索条件参数
    if (queryMap != null)
    {
      if (queryMap.containsKey("restaurantId"))
      {
        criteria.andRestaurantIdEqualTo((Long) queryMap.get("restaurantId"));
      }
    }
    // 设置分页参数
    schoolRestaurantCriteria.setPageSize(pageSize);
    schoolRestaurantCriteria.setStartIndex((currentPage - 1) * pageSize);
    List<SchoolRestaurant> items = schoolRestaurantMapper.selectByCriteria(schoolRestaurantCriteria);
    int totalCount = (int) schoolRestaurantMapper.selectCountByCriteria(schoolRestaurantCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here


      json.put(DwzAjaxJsonUtil.KEY_STATUSCODE, 300);
      json.put(DwzAjaxJsonUtil.KEY_MESSAGE, "操作失败!");
    }
    else
    {
      SchoolRestaurantCriteria src = new SchoolRestaurantCriteria();
      com.eatle.persistent.pojo.merchant.SchoolRestaurantCriteria.Criteria criteria = src.createCriteria();
      criteria.andSchoolIdEqualTo(schoolRestaurant.getSchoolId());
      criteria.andRestaurantIdEqualTo(schoolRestaurant.getRestaurantId());
      if(schoolRestaurantService.findByCriteria(src).size() < 1)
      {
        schoolRestaurantService.add(schoolRestaurant);
View Full Code Here

TOP

Related Classes of com.eatle.persistent.pojo.merchant.SchoolRestaurantCriteria

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.