package com.goafanti.user.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.goafanti.app.bo.ExpertsListBo;
import com.goafanti.app.bo.consultantListBo;
import com.goafanti.common.bo.ReletivelyIndustry;
import com.goafanti.common.bo.Result;
import com.goafanti.common.bo.fieldGlossoryBo;
import com.goafanti.common.model.UserIdentity;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.portal.bo.UserSubscriberListBo;
import com.goafanti.user.bo.Advertisings;
import com.goafanti.user.bo.AuditorUserIdentityDetailBo;
import com.goafanti.user.bo.CustomerAuditListBo;
import com.goafanti.user.bo.InputUserIdentity;
import com.goafanti.user.bo.MyInterestedBo;
import com.goafanti.user.bo.UserIdentityBo;
import com.goafanti.user.bo.UserIdentityDetailAdminBo;


public interface UserIdentityService {

	UserIdentity selectUserIdentityByUserId(String userId);

	UserIdentity insert(UserIdentity userIdentity);

	int updateByPrimaryKeySelective(UserIdentity userIdentity);

	UserIdentityBo selectUserIdentityBoByUserId(String uid);

	int updateByPrimaryKey(UserIdentity u);

	int saveUserIdentityProcess(Result res, UserIdentity u, String uid);

	int updateUserDetail(UserIdentity userIdentity, String saveSign, Integer level);

	UserIdentity insertByAdmin(UserIdentity ui, String saveSign);

	AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid);

	int updateUserDetailByAuditAdmin(UserIdentity ui, String aid, String mid, Integer level);

	Pagination<UserSubscriberListBo> listSubscriber(String url,String name, Integer level, String field, Integer province, Integer city,
			Integer area,Integer international, Integer pNo, Integer pSize, Integer auditStatus);

	UserIdentityDetailAdminBo selectUserIdentityByUserIdAdmin(String uid);

	UserIdentityBo expertsDetail(String uid);

	Pagination<UserIdentityBo> expertsList(String name,String industry, Integer pNo, Integer pSize);
	
	List<UserIdentityBo> getExperts(Integer size);
	
	List<fieldGlossoryBo> industryList();

	 Pagination<consultantListBo> consultantList(Integer pNo, Integer pSize) ;

	 consultantListBo consultantDetail(String id);
	 
	 List<Advertisings> advertising();

	 Pagination<consultantListBo> portalConsultantList(Integer pNo, Integer pSize);
	
	consultantListBo portalconsultantDetail(String id);

	List<fieldGlossoryBo> domainList();
	
	List<consultantListBo> getConsultantList(int size);
	
	List<ReletivelyIndustry>selectIndustryReletively();

	Pagination<UserIdentityBo>listInterestedExpert(Integer pageNo,Integer pageSize);

	Pagination<MyInterestedBo> appMyInterestedExpert(Integer type,Integer pageNo, Integer pageSize);
	
	Pagination<MyInterestedBo> getExpertAuditList(InputUserIdentity identity,Integer pageNo, Integer pageSize);
	
	UserIdentity getUserIdentityByUid(String uid);
	
	Pagination<CustomerAuditListBo> selectCustomerAuditList(String name, String type, String identity, Integer pageNo, Integer pageSize);

	Pagination<ExpertsListBo> appExpertsList(String name, String industry, Integer sortType,Integer pageNo, Integer pageSize);

	ExpertsListBo selectExpertsDetail(String id);

	Pagination<ExpertsListBo> consultantList(String name, Integer sortType, Integer consultantType, Integer province, Integer city,
			Integer area, Integer pageNo, Integer pageSize);
	/**
	 * 更改用户认证(顾问/专家)审核状态
	 * @param identity
	 * @return
	 */
	Integer updateAuditing(UserIdentity identity);
	
	/**
	 * 个人资料修改以及认证插入或者修改
	 * @param identity
	 * @return
	 */
	Integer updateUserIdentityDetail(InputUserIdentity identity);
	
	/**
	 * 获得除指定id外指定数量的随机法律顾问
	 * @param exceptid
	 * @param consultantType
	 * @param size
	 * @return
	 */
	List<ExpertsListBo> getRandAdviserByType(String exceptid, Integer consultantType , Integer size);
}
