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

import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.utils.SpringApplicationUtil;
import lombok.Data;
import org.apache.commons.lang3.ArrayUtils;
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() {
        ISysDictDataService service = SpringApplicationUtil.getBean(ISysDictDataService.class);
        return service.combationValue("");
//       return combationChar(ruoYiConfig.getUploadPath(),imageBasePath1);
    }


    public String getVideoBasePath() {
        ISysDictDataService service = SpringApplicationUtil.getBean(ISysDictDataService.class);
        return service.combationValue("");
    }

    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();
    }
}