package com.goafanti.common.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.goafanti.achievement.bo.AchievementInterestBo;
import com.goafanti.achievement.bo.AchievementListBo;
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.model.Achievement;
import com.goafanti.portal.bo.AchievementDetailBo;
import com.goafanti.portal.bo.AchievementPortalDetailBo;
import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
import com.goafanti.portal.bo.InternationalListBo;

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 updateReleaseDate(String id);

	int batchDeleteByPrimaryKey(List<String> id);

	AchievementUserOwnerDetailBo selectUserOwnerDetail(String id);

	AchievementOrgOwnerDetailBo selectOrgOwnerDetail(String id);

	void insertBatch(List<Achievement> achievementList);

	AchievementDetailBo selectAchievementSearchDetail(String uid, String id);
	
	AchievementDetailBo selectAchievementDetail(String id);

	Integer findAchievementNumByUid(String uid);

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

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

	List<AchievementPortalSimilarListBo> findUserPortalSimilarByFieldA(@Param("fieldA") Integer fieldA,
			@Param("id") String id);

	List<AchievementPortalSimilarListBo> findOrgPortalSimilarByFieldA(@Param("fieldA") Integer fieldA,
			@Param("id") String id);

	int updateOwnerId(String id);
	
	/** 查询国际化技术 **/
	List<InternationalListBo> selectInternationalAchievement();

	/** 查询精品项目 **/
	List<AchievementListBo> listAchievement();
	
	/** 查询猜你喜欢 **/
	List<AchievementListBo> selectCsutomerLike();
	
    /**	查询智者的科技成果**/
	List<AchievementPartnerListBo>findPartnerAchievementListByPage(String uid);
	
	Integer countInterest(String achievementId);

	List<AchievementInterestBo> achievementInterest(String uid);

	List<HomeAchievemend> getAppHomeAchievement();

	List<AchievementRecommended> getAppHomeRecommended();
	
}