package cn.axzo.msg.center.dal.mapper;

import cn.axzo.msg.center.domain.entity.Card;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author yanglin
 */
public interface CardMapper extends BaseMapper<Card> {

    @Select("<script>\n" +
            "    SELECT * FROM card WHERE id IN\n" +
            "    <foreach collection='ids' item='id' open='(' separator=',' close=')'>\n" +
            "        #{id}\n" +
            "    </foreach>\n" +
            "</script>")
    List<Card> getByIds(@Param("ids") List<Long> ids);

}
