package com.ym.mec.biz.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ym.mec.biz.dal.dao.SysUserContractsDao;
import com.ym.mec.biz.dal.entity.SysUserContracts;
import com.ym.mec.biz.service.SysUserContractsService;
import com.ym.mec.common.dal.BaseDAO;
import com.ym.mec.common.service.impl.BaseServiceImpl;

import java.util.List;

@Service
public class SysUserContractsServiceImpl extends BaseServiceImpl<Long, SysUserContracts>  implements SysUserContractsService {
	
	@Autowired
	private SysUserContractsDao sysUserContractsDao;

	@Override
	public BaseDAO<Long, SysUserContracts> getDAO() {
		return sysUserContractsDao;
	}

	@Override
	public List<SysUserContracts> getUserContractWithType(Integer userId, SysUserContracts.ContractType contractType) {
		return sysUserContractsDao.getUserContractWithType(userId, contractType);
	}

	@Override
	public SysUserContracts getLatestUserContract(Integer userId) {
		return sysUserContractsDao.getLatestUserContract(userId);
	}
	
}
