package com.vote.system.mapper;

import com.vote.system.domain.VoteEventAwards;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author MacBook
* @description 针对表【vote_event_awards(活动奖项表)】的数据库操作Mapper
* @createDate 2024-08-12 19:20:38
* @Entity com.vote.system.domain.VoteEventAwards
*/
public interface VoteEventAwardsMapper extends BaseMapper<VoteEventAwards> {

    @Insert("<script>" +
            "INSERT INTO vote_event_awards (event_id, name, type, quantity, created_at, updated_at) VALUES " +
            "<foreach collection='list' item='item' separator=','>" +
            "(#{item.eventId}, #{item.name}, #{item.type}, #{item.quantity}, #{item.createdAt}, #{item.updatedAt})" +
            "</foreach>" +
            "</script>")
    int insertBatch(@Param("list") List<VoteEventAwards> awardsList);
}




