package com.goafanti.common.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.goafanti.common.model.Demand;
import com.goafanti.demand.bo.DemandDetailBo;
import com.goafanti.demand.bo.DemandListBo;
import com.goafanti.demand.bo.DemandRecommended;
import com.goafanti.portal.bo.DemandPortalDetailBo;
import com.goafanti.portal.bo.DemandSearchDetailBo;

public interface DemandMapper {
	int deleteByPrimaryKey(String id);

	int insert(Demand record);

	int insertSelective(Demand record);

	Demand selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(Demand record);

	int updateByPrimaryKey(Demand record);

	DemandDetailBo selectUserDemandDetail(String id);

	int batchDeleteByPrimaryKey(List<String> id);

	DemandDetailBo selectOrgDemandDetail(String id);

	void insertBatch(List<Demand> demandList);

	DemandSearchDetailBo selectDemandDetail(String uid, String id);

	DemandPortalDetailBo findOrgPortalDemandDetail(@Param("id")String id, @Param("uid")String uid);

	DemandPortalDetailBo findUserPortalDemandDetail(@Param("id")String id, @Param("uid")String uid);

	int countInterest(String demandId);
	
	DemandDetailBo selectDemandDetail(String id);

	DemandListBo selectAppByPrimaryKey(String id);

	List<DemandRecommended> getAppHomeRecommended();

	Demand selectDemandFollow(String id);
	
	List<DemandListBo> selectRecentDemand(int size,String pattern,String location);
	
	List<DemandListBo> selectCompanyDemand(int size,String pattern,String location);
	
	List<DemandListBo> getUrgentDemand(int size,String pattern,String location);
	
	List<DemandListBo> getHotDemand(int size,String pattern,String location);
	
	List<DemandListBo> getAreaDemand(int size,String pattern,String location);
	
	List<DemandListBo> 	getProLearnStudyDemand(int size,String pattern,String location);
	
	List<DemandListBo> getFundCrowdDemand(int size,String pattern,String location);
	
	List<DemandListBo> getPersonnelDemand(int size,String pattern,String location);
	
	DemandListBo getDemandDetail(String id,Integer type);
	
	List<DemandListBo>getBoutiqueDemandList(int i,String pattern,String location);

}