package com.wgb.system.service.domain.mapper;

import com.wgb.system.service.domain.model.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysMapper {

    @Select("SELECT * from menu ORDER BY parent_id,order_num asc")
    @Results(id = "menu", value = {
            @Result(property = "id", column = "id"),
            @Result(property = "type", column = "type"),
            @Result(property = "name", column = "name"),
            @Result(property = "parentId", column = "parent_id"),
            @Result(property = "url", column = "url"),
            @Result(property = "icon", column = "icon"),
            @Result(property = "orderNum", column = "order_num"),
            @Result(property = "createTime", column = "create_timee")
    })
    List<Menu> getMenuList();
}
