package com.iamberry.wechat.service.task.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.iamberry.wechat.core.entity.PaperBean;
import com.iamberry.wechat.core.entity.task.WechatTask;
import com.iamberry.wechat.core.entity.task.WechatTaskLogs;
import com.iamberry.wechat.service.mapper.TaskMapper;

/**
 * @company	深圳爱贝源科技有限公司
 * @website www.iamberry.com
 * @author 	献
 * @tel		18271840547
 * @date	2016年9月20日
 * @explain	dao接口实现
 */
@Repository
public class WechatTaskDaoImpl implements WechatTaskDao {
	
	@Autowired
	private TaskMapper taskMapper;

	@Override
	public List<WechatTask> getAll(PaperBean bean) {
		// TODO Auto-generated method stub
		return taskMapper.getAll(bean);
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return taskMapper.getCount();
	}

	@Override
	public int insertTask(WechatTask task) {
		// TODO Auto-generated method stub
		return taskMapper.insertTask(task);
	}

	@Override
	public int updateTask(WechatTask task) {
		// TODO Auto-generated method stub
		return taskMapper.updateTask(task);
	}

	@Override
	public int insertLogs(WechatTaskLogs logs) {
		// TODO Auto-generated method stub
		return taskMapper.insertLogs(logs);
	}

	@Override
	public List<WechatTaskLogs> getByTaskID(Integer taskID) {
		// TODO Auto-generated method stub
		return taskMapper.getByTaskID(taskID);
	}

	@Override
	public Integer getByTaskIdAndOpenId(WechatTaskLogs logs) {
		// TODO Auto-generated method stub
		return taskMapper.getByTaskIdAndOpenId(logs);
	}

	@Override
	public WechatTask getOne(Integer taskID) {
		// TODO Auto-generated method stub
		return taskMapper.getOne(taskID);
	}

	@Override
	public List<WechatTask> getRunTask(WechatTask task) {
		// TODO Auto-generated method stub
		return taskMapper.getRunTask(task);
	}

}
