package com.qmth.qrzk.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.qmth.qrzk.dao.ISuffixDao;
import com.qmth.qrzk.repository.common.mapper.SuffixMapper;
import com.qmth.qrzk.repository.service.query.SuffixParams;
import com.qmth.qrzk.repository.user.model.Suffix;

@Repository("suffixDaoImpl")
@Transactional
public class SuffixImpl implements ISuffixDao {

	//注入roleMapper提供操作数据库的sql语句
	@Autowired
	@Qualifier("suffixMapper")
	private SuffixMapper suffixMapper;

	@Override
	public List<Suffix> getAllSuffix() {
		// TODO Auto-generated method stub
		return suffixMapper.getAllSuffix();
	}

	@Override
	public List<Suffix> findByName(String suffixName) {
		// TODO Auto-generated method stub
		return suffixMapper.findByName(suffixName);
	}

	@Override
	public Suffix findById(int id) {
		// TODO Auto-generated method stub
		return suffixMapper.findById(id);
	}

	@Override
	public int addSuffix(String suffixName) {
		// TODO Auto-generated method stub
		return suffixMapper.addSuffix(suffixName);
	}

	@Override
	public int delSuffix(int id) {
		// TODO Auto-generated method stub
		return suffixMapper.delSuffix(id);
	}

	@Override
	public int updateSuffix(Suffix suffix) {
		// TODO Auto-generated method stub
		return suffixMapper.updateSuffix(suffix);
	}

	@Override
	public List<Suffix> querySuffix(SuffixParams params) {
		// TODO Auto-generated method stub
		return suffixMapper.querySuffix(params);
	}

	@Override
	public int querySuffixCount(SuffixParams params) {
		// TODO Auto-generated method stub
		return suffixMapper.querySuffixCount(params);
	}
	
}
