package com.goafanti.common.dao;

import com.goafanti.common.model.OrganizationContactBook;
import com.goafanti.common.model.OrganizationContactBookExample;
import com.goafanti.user.bo.UserContactBo;

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

public interface OrganizationContactBookMapper {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	long countByExample(OrganizationContactBookExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int deleteByExample(OrganizationContactBookExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int deleteByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int insert(OrganizationContactBook record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int insertSelective(OrganizationContactBook record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	List<OrganizationContactBook> selectByExample(OrganizationContactBookExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	OrganizationContactBook selectByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int updateByExampleSelective(@Param("record") OrganizationContactBook record,
			@Param("example") OrganizationContactBookExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int updateByExample(@Param("record") OrganizationContactBook record,
			@Param("example") OrganizationContactBookExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int updateByPrimaryKeySelective(OrganizationContactBook record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table organization_contact_book
	 * @mbg.generated  Tue Jun 12 16:31:20 CST 2018
	 */
	int updateByPrimaryKey(OrganizationContactBook record);

	int checkContacts(@Param("uid")String uid,@Param("mobile")String mobile,@Param("aid")String aid);

	int updateMainContact(@Param("ocbId")String ocbId);
	
	int updateSubContact(@Param("uid")String uid);

	List<UserContactBo> selectContactByUid(String uid);
	
}