package com.pcloud.book.custom.mapper;


import com.pcloud.book.custom.dto.CustomTimeControlPageDTO;
import com.pcloud.book.custom.entity.CustomTimeControlBook;

import org.apache.ibatis.annotations.MapKey;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface CustomTimeControlBookMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CustomTimeControlBook record);

    int insertSelective(CustomTimeControlBook record);

    CustomTimeControlBook selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CustomTimeControlBook record);

    int updateByPrimaryKey(CustomTimeControlBook record);

    void batchInsert(List<CustomTimeControlBook> relatedBooks);

    void deleteByCustomTimeControlId(Integer id);

    @MapKey("id")
    Map<Integer, CustomTimeControlPageDTO> getBooKCountMap(List<Integer> customTimeControlIds);

    List<CustomTimeControlPageDTO> getBooKCountList(List<Integer> customTimeControlIds);
}