package com.sky.ioc.mapper.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.ioc.entity.domain.system.Menus;
import com.sky.ioc.entity.params.IocParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface MenuMapper extends BaseMapper<Menus> {

    @Select("select * from  menus WHERE parent_id = #{parentId} ORDER BY order_num ")
    List<Menus> getListByParentId(@Param("parentId") Integer parentId);

    @Select("select * from  menus  ")
    List<Menus> getList();
    @Select("<script>" +
            " select * from menus " +
            " where id in (<foreach collection='ids' item='id' index='no' separator=','>#{id}</foreach>) "
            + "</script>")
    List<Menus> getListByIds(@Param("ids") List<Integer> ids);

}
