package com.dcit.danger.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dcit.danger.dao.SysCodeMapper;
import com.dcit.danger.model.SysCode;
import com.dcit.danger.model.SysCodeExample;
import com.dcit.danger.service.SystemConfigService;

@Service
public class SystemConfigServiceImpl implements SystemConfigService {
	
	@Autowired
	private SysCodeMapper sysCodeMapper;

	@Override
	public List<SysCode> selectSystemCodeByExample(SysCodeExample sysCodeExample) {
		return sysCodeMapper.selectByExample(sysCodeExample);
	}

	@Override
	public SysCode selectSystemCodeById(String id) {
		return sysCodeMapper.selectByPrimaryKey(id);
	}

	@Override
	public int addSystemCode(SysCode sysCode) {
		return sysCodeMapper.insertSelective(sysCode);
	}

	@Override
	public int updateSystemCodeById(SysCode sysCode) {
		return sysCodeMapper.updateByPrimaryKeySelective(sysCode);
	}

	@Override
	public int deleteSystemCodeById(String id) {
		return sysCodeMapper.deleteByPrimaryKey(id);
	}

}
