package cn.iselab.mooctest.user.mapper;

import cn.iselab.mooctest.user.model.UserThirdParty;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;

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

/**
 * @Author: xuexb
 * @CreateDate: 19-1-3$ 下午10:28$
 */
@Transactional
public interface UserThirdPartyDao extends CrudRepository<UserThirdParty, Long>, JpaSpecificationExecutor<UserThirdParty> {

    List<UserThirdParty> findByUserId(Long userId);

    UserThirdParty findByThirdPartyIdentityAndType(String thirdPartyIdentity, String from);

    UserThirdParty findByUserIdAndType(Long userId, String from);
}
