package com.goafanti.common.dao;

import com.goafanti.common.model.OrganizationIdentity;
import com.goafanti.common.model.OrganizationIdentityExample;
import com.goafanti.user.bo.AuditorOrgIdentityDetailBo;
import com.goafanti.user.bo.OrgBasicInfoBo;
import com.goafanti.user.bo.OrgIdentityBo;
import com.goafanti.user.bo.OrgIdentityDetailBo;
import com.goafanti.user.bo.OrgUnitNames;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface OrganizationIdentityMapper {
    /**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	long countByExample(OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int deleteByExample(OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int deleteByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int insert(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int insertSelective(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	List<OrganizationIdentity> selectByExample(OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	OrganizationIdentity selectByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int updateByExampleSelective(@Param("record") OrganizationIdentity record,
			@Param("example") OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int updateByExample(@Param("record") OrganizationIdentity record,
			@Param("example") OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int updateByPrimaryKeySelective(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Thu Nov 30 17:32:28 CST 2017
	 */
	int updateByPrimaryKey(OrganizationIdentity record);

	OrganizationIdentity selectOrgIdentityByUserId(String uid);
    
    OrgBasicInfoBo selectBasicInfo(String uid, int year);
    
    OrgIdentityDetailBo selectOrgIdentityDetailByUserId(String uid);
    
    AuditorOrgIdentityDetailBo selectAuditorOrgIdentityDetailByUserId(@Param("uid")String uid, @Param("year")Integer year);
    
    OrgIdentityBo selectOrgIdentityBoByUserId(String uid);
    
    List<OrgUnitNames> selectManagerUnitNames(String aid);
    
    List<OrgUnitNames> selectAllOrgIndentity(String aid);
    
    List<OrgUnitNames> selectManagerAchievementOrgOwner(@Param("aid")String aid, @Param("name")String name);
    
    List<OrgUnitNames> selectAchievementOrgOwner(@Param("aid")String aid, @Param("name")String name);
}