Exemple #1
0
  /**
   * 根据查询条件分页查找customer
   *
   * @param cond
   * @return
   * @throws RuntimeException
   */
  public List<Customer> findCustomerPage(CustomerCond cond) throws RuntimeException {
    int recordCount = customerMapper.findCustomerCount(cond);

    cond.recordCount = recordCount;

    return customerMapper.findCustomerPage(cond);
  }
Exemple #2
0
  @Override
  public List<Customer> findCustomerSearchDeleted(CustomerCond cond) {

    CustomerPermission.doCheckFind(cond);

    /** 当ids的size为0,表示没有符合条件的记录,用于跟进日期,2011.11.8 */
    if (cond.getIds() != null && cond.getIds().size() == 0) {

      return null;
    }

    int recordCount = customerMapper.findCustomerCountDeleted(cond);

    cond.recordCount = recordCount;
    return customerMapper.findCustomerSearchDeleted(cond);
  }
Exemple #3
0
  /**
   * 查找全部Customer
   *
   * @param cond 查询条件
   * @return Customer列表
   */
  @Override
  public List<Customer> findCustomerSearch(CustomerCond cond) throws RuntimeException {
    // System.out.println("findCustomerSearch");
    // System.out.println("结果:"+PermissionUtils.findUserPriv(164));

    CustomerPermission.doCheckFind(cond);

    /*
    List<Customer> list;

    Cache cache= CacheUtils.getCacheByName(cacheKeyList);

    if(cache.get(cond.getCacheKey())==null){
    	int recordCount = customerMapper.findCustomerCount(cond);

    	cond.recordCount = recordCount;

    	list = customerMapper.findCustomerSearch(cond);
    	cache.put(new Element(cond.getCacheKey(), list));
    	cache.put(new Element(cond.getCacheKeyListCount(), recordCount));
    }
    else{
    	list = (List<Customer>)cache.get(cond.getCacheKey()).getValue();
    	cond.recordCount = (Integer)(cache.get(cond.getCacheKeyListCount()).getValue() );
    }

    return list;
    */

    /** 当ids的size为0,表示没有符合条件的记录,用于跟进日期,2011.11.8 */
    if (cond.getIds() != null && cond.getIds().size() == 0) {

      return null;
    }

    int recordCount = customerMapper.findCustomerCount(cond);

    cond.recordCount = recordCount;

    return customerMapper.findCustomerSearch(cond);
  }
Exemple #4
0
 @Override
 public List<Map> findCustomerPageReport(CustomerCond customerCond) {
   int recordCount = customerMapper.findCustomerCount(customerCond);
   customerCond.recordCount = recordCount;
   return customerMapper.findCustomerPageReport(customerCond);
 }