/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sys.service;

import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.sys.dao.CertificateDao;
import com.jeeplus.modules.sys.entity.Certificate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * 人员证书Service
 * @author fgy
 * @version 2017-12-08
 */
@Service
@Transactional(readOnly = true)
public class CertificateService extends CrudService<CertificateDao, Certificate> {
	@Autowired
	private CertificateDao certificateDao;

	public Certificate get(String id) {
		return super.get(id);
	}
	
	public List<Certificate> findList(Certificate certificate) {
		return super.findList(certificate);
	}
	
	public Page<Certificate> findPage(Page<Certificate> page, Certificate certificate) {
		return super.findPage(page, certificate);
	}
	
	@Transactional(readOnly = false)
	public void save(Certificate certificate) {
		super.save(certificate);
	}
	
	@Transactional(readOnly = false)
	public void delete(Certificate certificate) {
		super.delete(certificate);
	}


    public List<Certificate> getListByUserInfoId(String userInfoId) {
		return certificateDao.getListByUserInfoId(userInfoId);
    }
}