/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.wlyy.repository.doctor;

import com.yihu.wlyy.entity.doctor.profile.DoctorRole;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;


public interface DoctorRoleDao extends PagingAndSortingRepository<DoctorRole, Long> {

    @Query(value = "select b.* from wlyy_user_role a,wlyy_role b where a.role = b.code and a.user = ?1",nativeQuery = true)
    List<DoctorRole> findUserRole(String user);
}
