@@ -46,13 +46,20 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
...
@@ -46,13 +46,20 @@ public class WishDaoImpl extends AbsDao<Wish,String> implements WishDao {
}
}
Stringhql="";
Stringhql="";
if(StringUtils.isNotBlank(searchStr)){
if(StringUtils.isNotBlank(searchStr)){
if(StringUtils.isBlank(hql)){
if(type!=null){
hql+=" where ";
if(StringUtils.isBlank(hql)){
}else{
hql+=" where ";
hql+=" and ";
}else{
hql+=" and ";
}
if(type==0){
hql+=" children.phone like '%"+searchStr+"%' or children.name like '%"+searchStr+"%' or children.bedNum like '%"+searchStr+"%' or children.receiveName like '%"+searchStr+"%'";
hql+=" or content like '%"+searchStr+"%' or code = '"+searchStr+"' ";
}else{
hql+=" volunteer.phone like '%"+searchStr+"%' or volunteer.name like '%"+searchStr+"%' ";
}
}
}
Stringparam="%"+searchStr+"%";
hql+=" children.phone like '"+param+"' or volunteer.phone like '"+param+"' or children.name like '"+param+"' or volunteer.name like '"+param+"' ";