package com.service.impl;

import com.dao.ResourcesTypeMapper;
import com.entity.ResourcesType;
import com.service.ResourcesTypeService;
import org.springframework.stereotype.Service;

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

@Service
public class ResourcesTypeServiceImpl implements ResourcesTypeService {
	@Resource
    private ResourcesTypeMapper resourcesTypedao;

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


}
