wang-hao-jie
2021-10-19 cc8111dbc369c1e82f159027ee8438912ae28128
xboot-modules/xboot-file/src/main/java/cn/exrick/xboot/file/manage/FileManageFactory.java
@@ -21,18 +21,6 @@
    private SettingService settingService;
    @Autowired
    private QiniuFileManage qiniuFileManage;
    @Autowired
    private AliFileManage aliFileManage;
    @Autowired
    private TencentFileManage tencentFileManage;
    @Autowired
    private MinioFileManage minioFileManage;
    @Autowired
    private LocalFileManage localFileManage;
    /**
@@ -44,18 +32,10 @@
        Setting setting = settingService.get(SettingConstant.OSS_USED);
        if (setting == null || StrUtil.isBlank(setting.getValue())) {
            throw new XbootException("您还未配置OSS存储服务");
            throw new XbootException("您还未配置存储地址");
        }
        String type = setting.getValue();
        if ((type.equals(SettingConstant.QINIU_OSS) && location == null) || CommonConstant.OSS_QINIU.equals(location)) {
            return qiniuFileManage;
        } else if ((type.equals(SettingConstant.ALI_OSS) && location == null) || CommonConstant.OSS_ALI.equals(location)) {
            return aliFileManage;
        } else if ((type.equals(SettingConstant.TENCENT_OSS) && location == null) || CommonConstant.OSS_TENCENT.equals(location)) {
            return tencentFileManage;
        } else if ((type.equals(SettingConstant.MINIO_OSS) && location == null) || CommonConstant.OSS_MINIO.equals(location)) {
            return minioFileManage;
        } else if ((type.equals(SettingConstant.LOCAL_OSS) && location == null) || CommonConstant.OSS_LOCAL.equals(location)) {
        if ((type.equals(SettingConstant.LOCAL_OSS) && location == null) || CommonConstant.OSS_LOCAL.equals(location)) {
            return localFileManage;
        } else {
            throw new XbootException("暂不支持该存储配置,请检查配置");