package com.gic.haoban.manage.web.utils;

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.gic.api.base.commons.Constant;
import org.apache.commons.lang3.StringUtils;

public class ApolloUtils {
    
    /**
     * 内容分享企微素材使用老的前端合成还是新的后端合成 0老1新
     * @return
     */
    public static Integer combinedType(String eid) {
        Config config = ConfigService.getAppConfig();
        String combinedEid = config.getProperty("combinedEid", "");
        if (StringUtils.isBlank(combinedEid)) {
            return Constant.FLAG_TRUE;
        }
        return combinedEid.contains(eid) ? Constant.FLAG_TRUE : Constant.FLAG_FALSE;
    }

}
