BsthSystemConfig.java 1.46 KB
package com.ruoyi.config;

import com.ruoyi.common.config.RuoYiConfig;
import lombok.Data;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author liujun
 * @date 2024年07月12日 9:32
 */
@Data
@Component
public class BsthSystemConfig {
    @Value("${api.sign.image}")
    private String imageBasePath1;

    @Value("${api.video.basePath}")
    private String videoBasePath1;

    @Value("${bsth.face.app.id}")
    private String faceAppId;
    @Value("${bsth.face.sdk.key}")
    private String faceSdkKey;
    @Value("${bsth.face.lib.path}")
    private String faceLibPath;

    @Value("${api.url.getDriverInfo}")
    private String getDriverInfoURL;

    @Autowired
    private RuoYiConfig ruoYiConfig;

    @Value("${bsth.face.faceFeature.url}")
    private String faceFeatureURL;

    public String getImageBasePath(){
       return combationChar(ruoYiConfig.getUploadPath(),imageBasePath1);
    }


    public String getVideoBasePath(){
        return combationChar(ruoYiConfig.getUploadPath(),videoBasePath1);
    }

    public static String combationChar(String...strs){
        StringBuilder builder = new StringBuilder();
        int length = ArrayUtils.getLength(strs);
        for (int i = 0; i < length; i++) {
            builder.append(strs[i]);
        }
        return builder.toString();
    }
}