package com.goafanti.common.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.goafanti.achievement.bo.AchievementEntity;
import com.goafanti.achievement.bo.AchievementInterestBo;
import com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo;
import com.goafanti.achievement.bo.AchievementPartnerListBo;
import com.goafanti.achievement.bo.AchievementRecommended;
import com.goafanti.achievement.bo.AchievementUserOwnerDetailBo;
import com.goafanti.app.bo.HomeAchievemend;
import com.goafanti.common.bo.PolicyEntity;
import com.goafanti.common.model.Achievement;
import com.goafanti.portal.bo.AchievementDetailBo;
import com.goafanti.portal.bo.AchievementObject;
import com.goafanti.portal.bo.AchievementPortalDetailBo;
import com.goafanti.portal.bo.AchievementResultObject;

public interface AchievementMapper {
	int deleteByPrimaryKey(String id);

	int insert(Achievement record);
  
	int insertSelective(Achievement record);

	Achievement selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(Achievement record);

	int updateByPrimaryKey(Achievement record);

	int batchDeleteByPrimaryKey(List<String> id);

	AchievementUserOwnerDetailBo selectUserOwnerDetail(String id);

	AchievementOrgOwnerDetailBo selectOrgOwnerDetail(String id);

	void insertBatch(List<Achievement> achievementList);
 
	AchievementDetailBo selectAchievementDetail(String uid, String id);
	
	AchievementDetailBo selectAchievementDetail(String id);

	AchievementPortalDetailBo findUserPortalAchievementDetail(@Param("id")String id, @Param("uid")String uid);

	AchievementPortalDetailBo findOrgPortalAchievementDetail(@Param("id")String id, @Param("uid")String uid);

	Integer countInterest(String achievementId);

	List<AchievementInterestBo> achievementInterest(String uid);

	List<HomeAchievemend> getAppHomeAchievement();

	List<AchievementRecommended> getAppHomeRecommended();
	
	List<AchievementObject>getRecentAchievements(int size,String url,String showLocation);
	
	List<AchievementObject>getHotAchievements(int size,String url,String showLocation);
	
	List<AchievementObject>getPatentList(int size,String url,String showLocation);
	
	List<AchievementObject>getPracticalTechnologys(int size,String url,String showLocation);
	
	List<PolicyEntity>getIntellectualProperty(int size);
	
	AchievementObject getAchievementDetail(String id,Integer type);
	
	List<AchievementObject>getBoutiquePatent(int size, int deletedSign);
	    
	List<AchievementObject>guessYouLike(int size);
	
	AchievementResultObject getAchievementDetailById(String id);
	
    /**	查询智者的科技成果**/
	List<AchievementPartnerListBo>findPartnerAchievementListByPage(String uid);

	AchievementEntity selectAppAchuevementDetail(@Param("id")String id, @Param("uid")String uid);
	
}