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

import com.pcloud.book.pcloudkeyword.dao.PcloudTdDao;
import com.pcloud.book.pcloudkeyword.entity.PcloudTd;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("pcloudTdDao")
public class PcloudTdDaoImpl extends BaseDaoImpl<PcloudTd> implements PcloudTdDao {

    @Override
    public void deleteAll() {
        super.getSqlSession().delete(getStatement("deleteAll"));

    }

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

    @Override
    public List<PcloudTd> listAll() {
        return super.getSqlSession().selectList(getStatement("listAll"));
    }

    @Override
    public String getTdKeyword() {
        return super.getSqlSession().selectOne(getStatement("getTdKeyword"));
    }
}
