package com.ruoyi.common.filepathsplicing;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class FilePathSplicingUtil {

    @Value("${spring.profiles.active}")
    private String active;

    @Value("${oss.filePathOssDomain}")
    private String filePathOssDomain;

    @Value("${oss.filePathAtlDomain}")
    private String filePathAtlDomain;

    public String getPrefix() {
        if ("prod".equals(active)) {
            return filePathAtlDomain;
        } else {
            //线下
            return filePathOssDomain;
        }
    }
}
