package com.pcloud.book.group.dao.impl;

import com.pcloud.book.group.dao.CopyCipherRecordDao;
import com.pcloud.book.group.dto.BookGroupIdAndCountDTO;
import com.pcloud.book.group.entity.CopyCipherRecord;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;

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

/**
 * @Description
 * @Author ruansiyuan
 * @Date 2019/11/15 14:12
 **/
@Component("copyCipherRecordDao")
public class CopyCipherRecordDaoImpl extends BaseDaoImpl<CopyCipherRecord> implements CopyCipherRecordDao {
    @Override
    public List<BookGroupIdAndCountDTO> getCountByBookGroupIds(List<Long> bookGroupIds) {
        Map<String, Object> paramMap = new HashMap();
        paramMap.put("bookGroupIds", bookGroupIds);
        return this.getSqlSession().selectList(this.getStatement("getCountByBookGroupIds"), paramMap);
    }
}
