condition封装的是:and...?..?..?
params封装的是参数
public List findAll(String condition, Object[] params, int startIndex, int pageSize) {
Session session = sessionFactory.getCurrentSession();
String hql = "from CrmCourseType where 1=1 "+condition;
Query query = session.createQuery(hql);
query.setFirstResult(startIndex);
query.setMaxResults(pageSize);
//这里我应该怎么写才能把参数注入
query.set。。。。。
return query.list();
}