package com.goafanti.common.dao;

import com.goafanti.app.bo.ExpertsListBo;
import com.goafanti.app.bo.consultantListBo;
import com.goafanti.comment.bo.CommentDetailResult;
import com.goafanti.common.model.UserIdentity;
import com.goafanti.common.model.UserIdentityExample;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.user.bo.AuditorUserIdentityDetailBo;

import com.goafanti.user.bo.UserIdentityBo;
import com.goafanti.user.bo.UserIdentityRecommended;
import com.goafanti.user.bo.UserNames;

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

public interface UserIdentityMapper {
    /**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	long countByExample(UserIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int deleteByExample(UserIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int deleteByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int insert(UserIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int insertSelective(UserIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	List<UserIdentity> selectByExample(UserIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	UserIdentity selectByPrimaryKey(String id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int updateByExampleSelective(@Param("record") UserIdentity record, @Param("example") UserIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int updateByExample(@Param("record") UserIdentity record, @Param("example") UserIdentityExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int updateByPrimaryKeySelective(UserIdentity record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
	 */
	int updateByPrimaryKey(UserIdentity record);

	UserIdentity selectUserIdentityByUserId(String uid);

	UserIdentityBo selectUserIdentityBoByUserId(String uid);
	
	AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid);
	
    List<UserNames> selectManagerUserNames(String aid);
    
    List<UserNames> selectAllUserNames(String aid);
    
    List<UserNames> selectManagerAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);

	List<UserNames> selectAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);

	Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize);

	UserIdentityBo selectUserIdentityByUid(String uid);

	consultantListBo selectconsultantByUid(String id);

	List<UserIdentityRecommended> getAppHomeRecommended();
	
	List<consultantListBo> getConsultantList(Integer size);
	
	List<UserIdentityBo>getExperts(Integer size);


	ExpertsListBo selectAppExpertsDetail(@Param("id")String id, @Param("uid")String uid);
	CommentDetailResult expertsCommentByUid(String id);
    
	UserIdentity getUserIdentityByUid(String uid);
	
	Integer updateAuditing(UserIdentity identity);

	ExpertsListBo selectByIdentityId(String id);
	
	List<ExpertsListBo> getRandAdviserByType(@Param("id")String id, @Param("consultantType") Integer consultantType , @Param("size")Integer size);
}
