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

import com.pcloud.book.copyright.dao.BookAuthCodeImportRecordDao;
import com.pcloud.book.copyright.entity.BookAuthCodeImportRecord;
import com.pcloud.common.core.dao.BaseDaoImpl;

import org.springframework.stereotype.Component;

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

/**
 * @author lily
 * @date 2019/5/21 20:15
 */
@Component("bookAuthCodeImportRecordDao")
public class BookAuthCodeImportRecordDaoImpl extends BaseDaoImpl<BookAuthCodeImportRecord> implements BookAuthCodeImportRecordDao {

    @Override
    public void updateState(Long id, int state) {
        Map<String, Object> paramMap = new HashMap<>();
        paramMap.put("id", id);
        paramMap.put("state", state);
        this.getSqlSession().update(this.getStatement("updateState"), paramMap);
    }
}
