package com.sky.ioc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.ioc.entity.Index;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface IndexMapper extends BaseMapper<Index> {

    @Update("<script>" +
            " update index set is_del= 1  " +
            " where id in (<foreach collection='ids' item='id' index='no' separator=','>#{id}</foreach>) "

            + "</script>")
    Integer batchDelByIds(@Param("ids") List<Integer> ids);
}
