@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); }
@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); }
@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); }
/** * 查找全部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); }