package com.sky.ioc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.ioc.entity.domain.canteen.FoodMenu;
import com.sky.ioc.entity.domain.canteen.Order;
import com.sky.ioc.entity.domain.system.Users;
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 java.util.List;

@Mapper
public interface FoodMenusMapper extends BaseMapper<FoodMenu> {

    @Select("<script>" +
            "SELECT name as cuisineName,price,time_type as cuisineType,type as cuisineTypeTwo from food_menus a where 1=1" +
            "<if test='type!=null '>" +
            " and time_type= #{type} " +
            "</if>"+
            "</script>")
    List<FoodMenu> getListByType(@Param("type") Integer type);
}
