场景:
之前系统用mysql数据库,很多数据经过hibernate如此查出
public List> getAllPortalPorletItemLstUnderWorkZoneSiteByWorkZoneSiteId(
final long projectId, final long orgRoleId,
final long workZoneSiteId) {
List> list = this.hibernateTemplate
.execute(new HibernateCallback>>() {
public List> doInHibernate(
Session session) throws HibernateException,
SQLException {
List find = null;
String sql = "select t2.* , t1.title ,t1.showTitle, t1.type, t1.isLocal, t1.url,t1.maxUrl,t1.defaultHeight,t1.defaultWidth, t1.status "
+ "from portal_item as t1,portal_default_workzonesite_item as t2 "
+ "where t1.status=1 and t1.id=t2.portalItemId and t2.workZoneSiteId='"
+ workZoneSiteId
+ "' and t2.projectId='"
+ pr