package com.weaver.seconddev.chapanda.prop.util;

import com.weaver.seconddev.chapanda.prop.dao.ParamConfigDao;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ParamConfigUtil {

    private final static Logger log = LoggerFactory.getLogger(ParamConfigUtil.class);



    @Autowired
    ParamConfigDao paramConfigDao;
    /**
     *
     * @return
     */
    public String queryEnvironmentValue(String pkey){
        String value = "";
        if(StringUtils.isNotBlank(pkey)){
            SecDevProperty secDevProperty = new SecDevProperty();
            String envType = secDevProperty.getEvntype();
            log.error("envType:" + envType);
            if(StringUtils.isNotBlank(envType)){
                paramConfigDao.queryEnvironmentValue(pkey,envType);
            }
        }
        return value;
    }

}
