package com.ywt.domain.entity.center;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface MgAdminMenusViewRepository extends JpaRepository<MgAdminMenusView, Integer> {

    /**
     * 根据admminid和appid查找符合条件的数据
     * @param adminid
     * @param appId
     * @return
     */
    @Query(value = "select * from  mg_admin_menus_view  WHERE admin_id = ? AND  appid = ?  group by menu_id ", nativeQuery = true)
    List<MgAdminMenusView> getAllByAdminIdAndAppId(int adminid, String appId);

}
