Commit 55135aca authored by 季圣华's avatar 季圣华
Browse files

整理代码

parent 46b75fec
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package com.jsh.dao.asset;
import org.hibernate.Query;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import com.jsh.exception.AmsException;
import com.jsh.model.po.Asset;
import com.jsh.util.common.PageUtil;
import com.jsh.util.common.SearchConditionUtil;
public class ReportDAO extends HibernateDaoSupport implements ReportIDAO
{
@SuppressWarnings("unchecked")
@Override
public void find(PageUtil<Asset> pageUtil,String reportType,String reportName) throws AmsException
{
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select count(" + reportType +") as dataSum, " + reportName + " from Asset asset where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size());
pageUtil.setPageList(query.list());
}
}
package com.jsh.dao.asset;
import org.hibernate.Query;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import com.jsh.exception.JshException;
import com.jsh.model.po.Asset;
import com.jsh.util.common.PageUtil;
import com.jsh.util.common.SearchConditionUtil;
public class ReportDAO extends HibernateDaoSupport implements ReportIDAO
{
@SuppressWarnings("unchecked")
@Override
public void find(PageUtil<Asset> pageUtil,String reportType,String reportName) throws JshException
{
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select count(" + reportType +") as dataSum, " + reportName + " from Asset asset where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size());
pageUtil.setPageList(query.list());
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -18,7 +18,7 @@
</column>
</property>
<property name="password" type="java.lang.String">
<column name="password" length="30" not-null="true">
<column name="password" length="50" not-null="true">
<comment>登陆密码</comment>
</column>
</property>
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment