package cn.freemud.manager;

import cn.freemud.entities.db.OpenPlatformConfig;
import cn.freemud.manager.dao.OpenPlatformConfigDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 全局配置表manager
 * @author zhenghuan.yang
 * @date 2019/03/20
 */
@Component
public class OpenPlatformConfigManager {

    @Autowired
    private OpenPlatformConfigDao openPlatformConfigDao;

    public OpenPlatformConfig selectOpenPlatformConfigByKey(String key,Integer state) {
        OpenPlatformConfig config = new OpenPlatformConfig();
        config.setGlobalKey(key);
        config.setState(state);
        return openPlatformConfigDao.selectOne(config);
    }

}
