package com.goafanti.demand.service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import com.goafanti.achievement.bo.AchievementDemandListBo;
import com.goafanti.common.model.Demand;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.demand.bo.DemandImportBo;
import com.goafanti.demand.bo.DemandListBo;
import com.goafanti.demand.bo.DemandManageDetailBo;
import com.goafanti.demand.bo.DemandManageListBo;
import com.goafanti.demand.bo.DemandPartnerListBo;
import com.goafanti.demand.bo.ObjectInterestListBo;
import com.goafanti.portal.bo.BoutiqueListBo;
import com.goafanti.portal.bo.DemandPortalDetailBo;
import com.goafanti.portal.bo.DemandPortalSimilarListBo;
import com.goafanti.portal.bo.DemandSearchDetailBo;
import com.goafanti.portal.bo.DemandSearchListBo;

public interface DemandService {

	Pagination<DemandManageListBo> selectUserDemandManageList(String employerName, Integer auditStatus, Integer province,
			Integer serialNumber, String name, String keyword, Integer infoSources, Integer demandType,
			String validityPeriodStartDate, String validityPeriodEndDate, String username, Integer status,
			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot);

	Pagination<DemandManageListBo> selectOrgDemandManageList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber,
			String name, String keyword, Integer infoSources, Integer demandType, String validityPeriodStartDate,
			String validityPeriodEndDate, String username, Integer status, Integer releaseStatus,
			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId,String recordPerson);

	void saveUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);

	int updateUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords, Integer switchSign);

	DemandManageDetailBo selectUserDemandDetail(String id);

	int deleteByPrimaryKey(List<String> asList);

	DemandManageDetailBo selectOrgDemandDetail(String id);

	Demand selectByPrimaryKey(String id);

	Pagination<DemandListBo> listDemand(Integer auditStatus, Integer serialNumber, String name, String keyword,
			Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, Integer status,
			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize);

	int updateReleaseStatus(Demand d);

	int updateAuditDemand(Demand d, String techBroderId, Integer auditStatus);

	void saveDemand(Demand d, String validityPeriodFormattedDate, String keywords[]);

	List<AchievementDemandListBo> selectAchievementDemandListByDemandId(String id);

	void insertImport(List<DemandImportBo> data);

	Pagination<DemandSearchListBo> listDemandSearchList(String url,Integer sign, String keyword, Integer industryCategoryA,
			Integer industryCategoryB, Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper,
			Integer pNo, Integer pSize,Integer dateSort);

	DemandSearchDetailBo selectDemandSearchDetail(String uid, String id);

	int updateMatchAchievement(Demand d);

	Pagination<DemandPartnerListBo> lisePartnerDemand(String employerId, Integer pNo, Integer pSize);

	DemandPortalDetailBo findUserPortalDemandDetail(String id);

	DemandPortalDetailBo findOrgPortalDemandDetail(String id);

	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);

	int updateByPrimaryKeySelective(Demand d);

	DemandListBo selectDemandDetail( String id);

	/** 精品需求 **/
	Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA,Integer pNo, Integer pSize);
	
	/** 查询需求 **/
	ArrayList<DemandListBo> selectDemandList(Integer boutique);
	
	/**猜你喜欢**/
	List<DemandListBo> selectCsutomerLike();

	Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
			String releaseDateStartDate, String releaseDateEndDate,String employerId, Integer pNo, Integer pSize);

	Pagination<ObjectInterestListBo> selectinterest(Integer type,Integer pageNo, Integer pageSize);

	Pagination<DemandSearchListBo> listMyDemand(Integer pNo, Integer pSize);


	int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);


	Pagination<DemandManageListBo> selectMyDemandManageList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber,
			String name, String keyword, Integer infoSources, Integer demandType, String validityPeriodStartDate,
			String validityPeriodEndDate, String username, Integer status, Integer releaseStatus,
			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId);
	
	Pagination<DemandManageListBo> selectManageDemandManageList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber,
			String name, String keyword, Integer infoSources, Integer demandType, String validityPeriodStartDate,
			String validityPeriodEndDate, String username, Integer status, Integer releaseStatus,
			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId,String recordPerson);

	Demand DemandFollowDetails(String id);
}