package com.service.impl;

import com.dao.ApplyMapper;
import com.entity.Apply;
import com.service.ApplyService;
import org.springframework.stereotype.Service;

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

@Service
public class ApplyServiceImpl implements ApplyService {
	@Resource
    private ApplyMapper applydao;

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


}
