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.InputUserChannel;
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  Mon Jan 04 17:27:08 CST 2021
	 */
	int deleteByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
	 */
	int insert(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
	 */
	int insertSelective(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
	 */
	OrganizationIdentity selectByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
	 */
	int updateByPrimaryKeySelective(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
	 */
	int updateByPrimaryKeyWithBLOBs(OrganizationIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_identity
	 * @mbg.generated  Mon Jan 04 17:27:08 CST 2021
	 */
	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);

	int updateServiceByUid(OrganizationIdentity org);

	void insertBatch(List<InputUserChannel> list);
}