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  Wed Jun 06 10:26:09 CST 2018
	 */
	long countByExample(OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	int deleteByExample(OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	int deleteByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	int insert(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	int insertSelective(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	List<OrganizationIdentity> selectByExample(OrganizationIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	OrganizationIdentity selectByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	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  Wed Jun 06 10:26:09 CST 2018
	 */
	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  Wed Jun 06 10:26:09 CST 2018
	 */
	int updateByPrimaryKeySelective(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Wed Jun 06 10:26:09 CST 2018
	 */
	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);
    
    

	int updateServiceByUid(OrganizationIdentity org);
}