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

import com.pcloud.book.push.dao.PushRecordDao;
import com.pcloud.book.push.entity.PushRecord;
import com.pcloud.book.push.enums.PushStatusEnum;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;

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

/**
 * @Description
 * @Author ruansiyuan
 * @Date 2019/4/17 17:36
 **/
@Repository("pushRecordDao")
public class PushRecordDaoImpl extends BaseDaoImpl<PushRecord> implements PushRecordDao {
    @Override
    public void updateStateById(Long pushRecordId, Integer pushStatus) {
        Map<String, Object> map = new HashMap<>();
        map.put("pushRecordId",pushRecordId);
        map.put("pushStatus",pushStatus);
        super.getSqlSession().update(getStatement("updateStateById"), map);
    }
}
