package com.yonge.cooleshow.biz.dal.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yonge.cooleshow.biz.dal.entity.SysUserContracts;
import com.yonge.toolset.mybatis.dal.BaseDAO;

public interface SysUserContractsDao extends BaseDAO<Long, SysUserContracts> {

    /**
     * @describe 获取用户指定类型的协议记录
     * @author Joburgess
     * @date 2020.09.18
     * @param userId:
     * @param contractType:
     * @return java.util.List<com.yonge.cooleshow.biz.dal.entity.SysUserContracts>
     */
    List<SysUserContracts> getUserContractWithType(@Param("userId") Long userId,
                                                   @Param("contractType") SysUserContracts.ContractType contractType,
                                                   @Param("version") Integer version);

    /**
     * 获取最近一次的协议
     * @param userId
     * @return
     */
    SysUserContracts getLatestUserContract(Long userId);

}
