/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.wechat.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.wechat.global.base.dao.impl.BaseDao;
import com.wechat.model.dbEntity.MdeFriendRelation;

/**
 * 单表生成DAO接口
 * @author tangwc
 * @version 2018-05-23
 */
@Repository
public class MdeFriendRelationDao extends BaseDao {
	public int insert(MdeFriendRelation friendRelation) {
		return super.insert("MdeFriendRelationMapper.insert", friendRelation);
	}
	
	/*public List<MdeFriendRelation> getRequestForFriends(Map<String,Object> map) {
		return super.select("MdeFriendRelationMapper.getRequestForFriends", map);
	}*/
	
	public Integer update(MdeFriendRelation friendRelation) {
		return super.update("MdeFriendRelationMapper.update", friendRelation);
	}
	
	public Integer deleteRecords(MdeFriendRelation friendRelation) {
		return super.delete("MdeFriendRelationMapper.deleteRecords", friendRelation);
	}
	
	public MdeFriendRelation findRequestRecordByCodes(Map<String,Object> map) {
		return super.selectOne("MdeFriendRelationMapper.findRequestRecordByCodes", map);
	}
	
	/**
	 * 获取交友信息 o
	 * @param userCode
	 * @return
	 */
	public List<MdeFriendRelation> getBriefInfoOfFriendInvitation(String userCode) {
		return super.select("MdeFriendRelationMapper.getBriefInfoOfFriendInvitation",userCode);
	}
	/**
	 * 删除好友
	 * @param relation
	 * @return
	 */
	public int delFriends(MdeFriendRelation relation) {
		return super.delete("MdeFriendRelationMapper.delFriends", relation);
	}

	public MdeFriendRelation getInfoByCode(Map<String, Object> map) {
		return super.selectOne("MdeFriendRelationMapper.getInfoByCode", map);
	}
}