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

import com.pcloud.book.keywords.dao.NotKeywordTemplateDao;
import com.pcloud.book.keywords.entity.NotKeywordTemplate;
import com.pcloud.common.core.dao.BaseDaoImpl;

import org.springframework.stereotype.Component;

import java.util.List;

@Component("notKeywordTemplateDao")
public class NotKeywordTemplateDaoImpl extends BaseDaoImpl<NotKeywordTemplate> implements NotKeywordTemplateDao {

    @Override
    public Integer batchInsert(List<NotKeywordTemplate> list) {
        return this.getSqlSession().insert(this.getStatement("batchInsert"), list);
    }

    @Override
    public NotKeywordTemplate getRandomTemplate() {
        return this.getSqlSession().selectOne(this.getStatement("getRandomTemplate"));
    }

}
