package com.palmnest.dao.notice.impl;

import org.springframework.stereotype.Repository;

import com.palmnest.dao.hibernate.GenericDaoHibernate;
import com.palmnest.dao.notice.NoticeApprovalsetDao;
import com.palmnest.model.notice.AppNoticeModel;
import com.palmnest.model.notice.NoticeApprovalsetModel;

@Repository("noticeApprovalsetDao")
public class NoticeApprovalsetDaoImpl extends GenericDaoHibernate<NoticeApprovalsetModel, Integer> implements NoticeApprovalsetDao{
	public NoticeApprovalsetDaoImpl() {
		super(NoticeApprovalsetModel.class);

	}

	/**
	 * 根据项目获取该项目是否开启了多级审核操作
	 * @param orgId
	 * @return
	 */
	@Override
	public NoticeApprovalsetModel getByOrgId(Integer orgId) {
		String sql="from NoticeApprovalsetModel where org_id=?";
		return (NoticeApprovalsetModel)getSession().createQuery(sql).setInteger(0, orgId).uniqueResult();
	}
}
