package com.yonge.cooleshow.biz.dal.service.impl;

import java.util.List;

import com.yonge.toolset.mybatis.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yonge.cooleshow.biz.dal.dao.SysUserContractsDao;
import com.yonge.cooleshow.biz.dal.entity.SysUserContracts;
import com.yonge.cooleshow.biz.dal.service.SysUserContractsService;
import com.yonge.toolset.mybatis.dal.BaseDAO;

@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(Long userId, SysUserContracts.ContractType contractType, Integer contractVersion) {
		return sysUserContractsDao.getUserContractWithType(userId, contractType, contractVersion);
	}

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

}
