package com.bcxin.Infrastructures.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CdnUtils {
   private static Logger logger = LoggerFactory.getLogger(CdnUtils.class);
   public static String convert(String url) {

      try {
         if (StringUtils.isEmpty(url)) {
            return url;
         }

         return url.replace("02obs-file-system-obpm-uploads.obs.cn-north-1.myhuaweicloud.com", "02obs.baibaodun.cn");
      } catch (Exception ex) {
         logger.error("Cdn资源({})转换无效", url, ex);
      }

      return url;
   }
}
