package com.ym.mec.biz.dal.dao;

import com.ym.mec.biz.dal.entity.SysUserContracts;
import com.ym.mec.common.dal.BaseDAO;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserContractsDao extends BaseDAO<Long, SysUserContracts> {

    /**
     * @describe 获取用户指定类型的协议记录
     * @author Joburgess
     * @date 2020.09.18
     * @param userId:
     * @param contractType:
     * @return java.util.List<com.ym.mec.biz.dal.entity.SysUserContracts>
     */
    List<SysUserContracts> getUserContractWithType(@Param("userId") Integer userId,
                                                   @Param("contractType") SysUserContracts.ContractType contractType);
	
    /**
     * 获取最近一次的协议
     * @param userId
     * @return
     */
    SysUserContracts getLatestUserContract(Integer userId);
}
