package com.moka.gdtauto.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.moka.gdtauto.entity.TencentAssetDrama;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 腾讯广告短剧资产Mapper接口
 * 
 * @author moka
 * @since 2026-02-06
 */
@Mapper
public interface TencentAssetDramaMapper extends BaseMapper<TencentAssetDrama> {

    /**
     * 批量插入或更新短剧资产信息
     * 使用 INSERT INTO ... ON DUPLICATE KEY UPDATE
     * 
     * @param dramas 短剧资产列表
     * @return 影响行数
     */
    int batchInsertOrUpdate(@Param("dramas") List<TencentAssetDrama> dramas);

    List<TencentAssetDrama> randomNewAsset(@Param("jobNumber") String jobNumber, @Param("best") int best, @Param("rand") int rand);
}
