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

import com.pcloud.book.book.dao.BookLabelTrimRelateDao;
import com.pcloud.book.book.entity.BookLabelTrimRelate;
import com.pcloud.common.core.dao.BaseDaoImpl;

import org.springframework.stereotype.Component;

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

/**
 * @ClassName com.pcloud.book.book.dao.impl.BookLabelTrimRelateDaoImpl
 * @Author zhuyajie
 * @Description 新标签
 * @Date 2021/7/27 11:27
 * @Version 1.0
 **/
@Component
public class BookLabelTrimRelateDaoImpl extends BaseDaoImpl<BookLabelTrimRelate> implements BookLabelTrimRelateDao {
    @Override
    public Map<Long, BookLabelTrimRelate> mapBookTrimLabel(List<Long> bookIds) {
        Map<String, Object> map = new HashMap<>();
        map.put("bookIds", bookIds);
        return getSessionTemplate().selectMap(getStatement("mapBookTrimLabel"), map ,"bookId");
    }
}
