@Repository
public class QsPatientCodeDaoImpl extends HibernateBaseImpl<QsPatientCodePO> implements QsPatientCodeDao {
@Resource(name = "sessionFactory")
private SessionFactory sessionFactory;
public List<Object[]> queryBySql(String sql){
List<Object[]> list = getSession().createSQLQuery(sql).list();
return list;
}
public Session getSession() {
return sessionFactory.getCurrentSession();
}
}
Dao层定义执行SQL语句的方法
猜你喜欢
转载自blog.csdn.net/qq_30629571/article/details/79093752
今日推荐
周排行