当时用DetachedCriteria
进行模糊查询的时候若传递来的参数为null 在debug模式下发现参数为%% 但是却查询不到数据
所以使用参数传递查询的时候需要先判断参数是否为空值;
if(StringUtils.isNotBlank(customer.getCust_name())){
dc.add(Restrictions.like("cust_name", "%"+customer.getCust_name()+"%"));
}