package com.bonus.core.menu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.core.menu.entity.MenuCustomDict;
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 MenuCustomDictMapper extends BaseMapper<MenuCustomDict> {
   void insertBatch(@Param("customIdList") List<Integer> customIdList);

   Integer selectMinCustomId(Integer ifUse);

   Integer selectMinCardNum(Integer ifCardNumUse);

   Integer selectMinCustLimitId(Integer ifCustLimitIdUse);

   @Select({"select custom_id from menu_custom_dict where if_use = 2 order by custom_id limit #{size}"})
   List<Integer> selectMinCustomIdList(@Param("size") int size);
}
