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.StoreCommentSummary;


import java.util.List;

/**
 * qxy
 * AI 服务 推荐数据信息 店铺评论总结表
 */
@Mapper
public interface StoreCommentSummaryMapper extends BaseMapper<StoreCommentSummary> {

    @Insert({
            "<script>", // 开启动态 SQL 脚本
            "INSERT INTO store_comment_summary (",
            "  id, store_id, store_name, summary, task_id, is_show, 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.isShow},",
            "  #{item.deleteFlag},",
            "  #{item.createdTime},",
            "  #{item.createdUserId},",
            "  #{item.updatedTime},",
            "  #{item.updatedUserId}",
            ")",
            "</foreach>",
            "</script>" // 关闭动态 SQL 脚本
    })
    int insertBatchStoreCommentSummary(List<StoreCommentSummary> storeCommentSummaryList);

}
