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

import com.pcloud.book.applet.dao.ReadBookRecordDao;
import com.pcloud.book.applet.entity.ReadBookRecord;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (ReadBookRecord)表数据库访问层
 *
 * @author makejava
 * @since 2021-02-04 15:33:43
 */
@Repository("readBookRecordDaoImpl")
public class ReadBookRecordDaoImpl extends BaseDaoImpl<ReadBookRecord> implements ReadBookRecordDao {

    @Override
    public void updateRecordTime(ReadBookRecord readBookRecord) {
        getSessionTemplate().update(getStatement("updateRecordTime"), readBookRecord);
    }

    @Override
    public void batchUpdateRecordTime(List<ReadBookRecord> readBookRecords) {
        getSessionTemplate().update(getStatement("batchUpdateRecordTime"), readBookRecords);
    }
}