package shop.alien.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import shop.alien.entity.store.StoreCommentSummaryInterest;

import java.util.List;

/**
 * qxy
 * AI 服务 店铺趣味信息
 */
@Mapper
public interface StoreCommentSummaryInterestMapper extends BaseMapper<StoreCommentSummaryInterest> {
    @Insert({
            "<script>", // 开启动态 SQL 脚本
            "INSERT INTO store_comment_summary_interest (",
            "  id, store_id, store_name, summary, task_id, delete_flag, created_time, created_user_id,",
            "  updated_time, updated_user_id",
            ")",
            "VALUES",
            "<foreach collection='list' item='item' separator=','>",
            "(",
            "  #{item.id},",
            "  #{item.storeId},",
            "  #{item.storeName},",
            "  #{item.summary},",
            "  #{item.taskId},",
            "  #{item.deleteFlag},",
            "  #{item.createdTime},",
            "  #{item.createdUserId},",
            "  #{item.updatedTime},",
            "  #{item.updatedUserId}",
            ")",
            "</foreach>",
            "</script>" // 关闭动态 SQL 脚本
    })
    int insertBatchStoreCommentSummaryInterest(List<StoreCommentSummaryInterest> storeCommentSummaryInterests);
}
