package cn.iselab.mooctest.user.mapper;

import cn.iselab.mooctest.user.model.User2Medal;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @Author ROKG
 * @Description
 * @Date: Created in 上午11:34 2018/2/13
 * @Modified By:
 */
@Transactional
public interface User2MedalDao extends CrudRepository<User2Medal, Long> ,JpaSpecificationExecutor<User2Medal>{

    List<User2Medal> findByUserId(long userId);

    List<User2Medal> findByUserIdAndMedalId(long userId,long medalId);
}
