package com.vote.system.mapper;

import com.vote.system.domain.VoteEventEvaluationRounds;
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_evaluation_rounds(活动评选轮次表)】的数据库操作Mapper
* @createDate 2024-08-12 18:21:24
* @Entity com.vote.system.domain.VoteEventEvaluationRounds
*/
public interface VoteEventEvaluationRoundsMapper extends BaseMapper<VoteEventEvaluationRounds> {

    @Insert("<script>" +
            "INSERT INTO vote_event_evaluation_rounds (event_id, type, round_number, scoring_rule_id, start_date, end_date, judges, awards, created_at, updated_at) VALUES " +
            "<foreach collection='list' item='item' separator=','>" +
            "(#{item.eventId}, #{item.type}, #{item.roundNumber}, #{item.scoringRuleId}, #{item.startDate}, #{item.endDate}, #{item.judges}, #{item.awards}, #{item.createdAt}, #{item.updatedAt})" +
            "</foreach>" +
            "</script>")
    int insertBatch(@Param("list") List<VoteEventEvaluationRounds> evaluationRoundsList);
}




