Ejemplo n.º 1
0
  @Override
  public int findCustomerCount(CustomerCond cond) throws RuntimeException {

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

      return 0;
    }

    return customerMapper.findCustomerCount(cond);
  }
Ejemplo n.º 2
0
  @Override
  public List<Customer> findCustomerForMobile(CustomerCond cond) throws RuntimeException {

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

      return null;
    }

    return customerMapper.findCustomerSearch(cond);
  }
Ejemplo n.º 3
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);
  }
Ejemplo n.º 4
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);
  }