Package com.eatle.persistent.pojo.merchant

Examples of com.eatle.persistent.pojo.merchant.CommunityRestaurantCriteria$Criteria


  @Override
  public Pagination findPagination(Map<String, Object> queryMap,
      int currentPage, int pageSize)
  {
    CommunityRestaurantCriteria communityRestaurantCriteria = new CommunityRestaurantCriteria();
//    Criteria criteria = communityRestaurantCriteria.createCriteria();
    // 设置搜索条件参数
    // if(queryMap != null){
    // if(queryMap.containsKey("username")){
    // criteria.andUserNameLike("%"+(String)queryMap.get("username")+"%");
    // }
    // if(queryMap.containsKey("email")){
    // criteria.andEmailLike((String)queryMap.get("email"));
    // }
    // }
    // 设置分页参数
    communityRestaurantCriteria.setPageSize(pageSize);
    communityRestaurantCriteria.setStartIndex((currentPage - 1) * pageSize);
    List<CommunityRestaurant> items = communityRestaurantMapper.selectByCriteria(communityRestaurantCriteria);
    int totalCount = (int) communityRestaurantMapper.selectCountByCriteria(communityRestaurantCriteria);
    return new Pagination(pageSize, currentPage, totalCount, items);
  }
View Full Code Here


      json.put(DwzAjaxJsonUtil.KEY_STATUSCODE, 300);
      json.put(DwzAjaxJsonUtil.KEY_MESSAGE, "操作失败!");
    }
    else
    {
      CommunityRestaurantCriteria crc = new CommunityRestaurantCriteria();
      com.eatle.persistent.pojo.merchant.CommunityRestaurantCriteria.Criteria criteria = crc.createCriteria();
      criteria.andCommunityIdEqualTo(communityRestaurant.getCommunityId());
      criteria.andRestaurantIdEqualTo(communityRestaurant.getRestaurantId());
      if(communityRestaurantService.findByCriteria(crc).size() < 1)
      {
        communityRestaurantService.add(communityRestaurant);
View Full Code Here

TOP

Related Classes of com.eatle.persistent.pojo.merchant.CommunityRestaurantCriteria$Criteria

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.