package com.yonge.cooleshow.biz.dal.service.impl;

import java.util.List;

import com.yonge.toolset.mybatis.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yonge.cooleshow.biz.dal.dao.SysConfigDao;
import com.yonge.cooleshow.biz.dal.entity.SysConfig;
import com.yonge.cooleshow.biz.dal.service.SysConfigService;
import com.yonge.toolset.mybatis.dal.BaseDAO;

@Service
public class SysConfigServiceImpl extends BaseServiceImpl<Long, SysConfig> implements SysConfigService {

	@Autowired
	private SysConfigDao sysConfigDao;

	@Override
	public BaseDAO<Long, SysConfig> getDAO() {
		return sysConfigDao;
	}

	@Override
	public SysConfig findByParamName(String paramName) {
		return sysConfigDao.findByParamName(paramName);
	}

    @Override
	public List<SysConfig> findByParamName(List<String> paramNameList) {
		return sysConfigDao.findByParamNameList(paramNameList);
	}

	@Override
    public String findConfigValue(String paramName){
        return sysConfigDao.findConfigValue(paramName);
    }

    @Override
	public void batchUpdate(List<SysConfig> configList) {
		sysConfigDao.batchUpdate(configList);
	}

	@Override
	public void updateConfig(SysConfig config) {
		sysConfigDao.update(config);
	}

}
