package com.palmnest.dao.estateserve.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.palmnest.dao.estateserve.EnterpriseAuditDao;
import com.palmnest.dao.hibernate.GenericDaoHibernate;
import com.palmnest.model.EnterpriseAudit;
import com.palmnest.model.FloorInfo;
import com.palmnest.model.PushBill;

/**
 * 企业入驻/企业迁出审批单DAO实现类
 *
 * @author longmeizhen
 */
@Repository("enterpriseAuditDao")
public class EnterpriseAuditDaoImpl extends GenericDaoHibernate<EnterpriseAudit, Integer> implements EnterpriseAuditDao {

	public EnterpriseAuditDaoImpl() {
		super(EnterpriseAudit.class);
	}
	@Override
	public List<EnterpriseAudit> getEnterAuditList(String type, int soursId) throws Exception {
		StringBuilder strHQL = new StringBuilder("from EnterpriseAudit where  type=? and sourseId=? order by createTime ");
		List<EnterpriseAudit> list = getSession().createQuery(strHQL.toString()).setString(0, type).setInteger(1, soursId).list();
		return list;
	}
}
