package com.service.impl;

import com.dao.CapitalMapper;

import com.entity.Capital;
import com.service.CapitalService;
import org.springframework.stereotype.Service;

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

@Service
public class CapitalServiceImpl implements CapitalService {
	@Resource
    private CapitalMapper capitalDao;

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


}
