package com.service.impl;


import com.dao.PlaceMapper;
import com.entity.Place;
import com.service.PlaceService;
import org.springframework.stereotype.Service;

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

@Service
public class PlaceServiceImpl implements PlaceService {
	@Resource
    private PlaceMapper placeDao;

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


}
