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; package com.jsh.dao.asset;
import org.hibernate.Query; import org.hibernate.Query;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import com.jsh.exception.AmsException; import com.jsh.exception.JshException;
import com.jsh.model.po.Asset; import com.jsh.model.po.Asset;
import com.jsh.util.common.PageUtil; import com.jsh.util.common.PageUtil;
import com.jsh.util.common.SearchConditionUtil; import com.jsh.util.common.SearchConditionUtil;
public class ReportDAO extends HibernateDaoSupport implements ReportIDAO public class ReportDAO extends HibernateDaoSupport implements ReportIDAO
{ {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void find(PageUtil<Asset> pageUtil,String reportType,String reportName) throws AmsException 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())); 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.setTotalCount(query.list().size());
pageUtil.setPageList(query.list()); 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 @@ ...@@ -18,7 +18,7 @@
</column> </column>
</property> </property>
<property name="password" type="java.lang.String"> <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> <comment>登陆密码</comment>
</column> </column>
</property> </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