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

import java.util.HashMap;
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.MdeEducationExperience;

/**
 * 单表生成DAO接口
 * 
 * @author tangwc
 * @version 2018-05-23
 */
@Repository
public class MdeEducationExperienceDao extends BaseDao {
	Map<String,Object> map = new HashMap<String,Object>();
	public MdeEducationExperience getInfoById(int id) {
		return super.selectOne("MdeEducationExperienceMapper.get", id);
	}

	/**
	 * 获取教育经历列表
	 * 
	 * @param userCode
	 * @return
	 */
	public List<MdeEducationExperience> getEducationExperienceByUserCode(String userCode,String lang) {
		map.clear();
		map.put("userCode", userCode);
		map.put("lang", lang);
		return super.select("MdeEducationExperienceMapper.getEducationExperienceByUserCode", map);
	}

	public int insert(MdeEducationExperience educationExperience) {
		return super.insert("MdeEducationExperienceMapper.insert", educationExperience);
	}

	public int update(MdeEducationExperience educationExperience) {
		return super.update("MdeEducationExperienceMapper.update", educationExperience);
	}

	public int delete(MdeEducationExperience educationExperience) {
		return super.delete("MdeEducationExperienceMapper.delete", educationExperience);
	}

	/**
	 * 获取所有的教育经历
	 * 
	 * @param userCodeList
	 *            用户code集合
	 * @return
	 */
	public List<MdeEducationExperience> getEducationExperienceByUserCodeList(List<String> userCodeList,String lang) {
		map.clear();
		map.put("userCodeList", userCodeList);
		map.put("lang", lang);
		return super.select("MdeEducationExperienceMapper.getEducationExperienceByUserCodeList", map);

	}
}