package com.wechat.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wechat.dao.MdeEducationExperienceDao;
import com.wechat.model.dbEntity.MdeEducationExperience;

@Service
public class MdeEducationExperienceService {
	
	@Resource
	MdeEducationExperienceDao educationExperienceDao;
	
	/**
	 * 获取教育经历列表
	 * @param userCode
	 * @return
	 */
	public List<MdeEducationExperience> getEducationExperienceByUserCode(String userCode,String lang){
		return educationExperienceDao.getEducationExperienceByUserCode(userCode,lang);
	}

	public int insert(MdeEducationExperience educationExperience) {
		return educationExperienceDao.insert(educationExperience);
	}

	public int update(MdeEducationExperience educationExperience) {
		return educationExperienceDao.update(educationExperience);
	}

	public int delete(Integer eduId, String userCode) {
		MdeEducationExperience educationExperience = new MdeEducationExperience();
		educationExperience.setEduId(eduId);
		educationExperience.setDelFlag(1);
		educationExperience.setUpdateBy(userCode+"");
		return educationExperienceDao.delete(educationExperience);
	}

}
