package com.service.impl;

import com.dao.EarlyWarningMapper;
import com.entity.EarlyWarning;
import com.service.EarlyWarningService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class EarlyWarningServiceImpl implements EarlyWarningService {
	@Resource
    private EarlyWarningMapper earlyWarningdao;

	@Override
	public int add(EarlyWarning po) {
		return earlyWarningdao.insertSelective(po);
	}
	@Override
	public int update(EarlyWarning po) {
		return earlyWarningdao.updateByPrimaryKeySelective(po);
	}
	@Override
	public int delete(int id) {
		return earlyWarningdao.deleteByPrimaryKey(id);
	}
	@Override
	public List<EarlyWarning> getAll(Map<String, Object> map) {
		return earlyWarningdao.getAll(map);
	}
	@Override
	public EarlyWarning checkName(Map<String, Object> account) {
		return earlyWarningdao.checkName(account);
	}
	@Override
	public List<EarlyWarning> getByPage(Map<String, Object> map) {
		return earlyWarningdao.getByPage(map);
	}
	@Override
	public int getCount(Map<String, Object> po) {
		return earlyWarningdao.getCount(po);
	}
	@Override
	public EarlyWarning getById(int id) {
		return earlyWarningdao.selectByPrimaryKey(id);
	}


}
