package com.service.impl;

import com.dao.DonationMapper;
import com.entity.Donation;
import com.service.DonationService;
import org.springframework.stereotype.Service;

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

@Service
public class DonationServiceImpl implements DonationService {
	@Resource
    private DonationMapper donationMapper;

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


}
