package com.blueland.ebpm.home.dao;

import org.springframework.stereotype.Repository;

import com.blueland.bpm.common.base.BaseIbatis3Dao;
import com.blueland.bpm.identity.model.Org;

@Repository
public class OrgEntityDao extends BaseIbatis3Dao<Org,String>{
	/**
	 * 更新用户数据
	 * @param user
	 * @return
	 */
	public int updateById(Org org) {
		return getSqlSessionTemplate().update("OrgEntity.updateById",org);
	}

	public int insertObj(Org org) {
		return getSqlSessionTemplate().insert("OrgEntity.insert",org);
	}

	public int deleteByOrgId(String orgId) {
		return getSqlSessionTemplate().delete("OrgEntity.deleteByOrgId",orgId);
	}

	public Org findOrgByDeptId(String deptId) {
		
		return getSqlSessionTemplate().selectOne("OrgEntity.findOrgByDeptId", deptId);
	}
	
}
