package com.moka.gdtauto.mapper;

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

import java.util.List;

/**
 * 腾讯广告小说资产Mapper接口
 *
 * @author mokamvp
 * @since 2026-03-11
 */
@Mapper
public interface TencentAssetFictionMapper extends BaseMapper<TencentAssetFiction> {

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

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