package io.gisbi.application.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.gisbi.application.system.domain.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MenuMapper extends BaseMapper<Menu> {


    @Select("select m.id FROM app_role_menu rm INNER JOIN  app_menu m on rm.menuid = m.id where  m.isdisplay = 1 AND rm.app_id = #{appid} AND rm.roleid = #{roleid} ORDER BY m.orderno ASC")
    List<String> selectMenuByRoleId( @Param("appid")String appId,  @Param("roleid") String roleId);
}
