| | |
| | | */ |
| | | package cn.gistack.resource.builder.oss; |
| | | |
| | | import cn.gistack.common.constant.CommonConstant; |
| | | import cn.gistack.resource.rule.MyOssRule; |
| | | import cn.gistack.resource.rule.PanoramaOSSRule; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | */ |
| | | public OssTemplate template(String code) { |
| | | String tenantId = AuthUtil.getTenantId(); |
| | | |
| | | if (StringUtil.isBlank(tenantId)){ |
| | | tenantId = "000000"; |
| | | } |
| | | |
| | | Oss oss = getOss(tenantId, code); |
| | | Oss ossCached = ossPool.get(tenantId); |
| | | OssTemplate template = templatePool.get(tenantId); |
| | |
| | | */ |
| | | public OssTemplate templateByPathPanorama(String code,String prefixPath,String resGuid) { |
| | | String tenantId = AuthUtil.getTenantId(); |
| | | // System.err.println("tenantId:"+tenantId); |
| | | if (StringUtil.isBlank(tenantId)){ |
| | | tenantId = "000000"; |
| | | } |
| | | |
| | | Oss oss = getOss(tenantId, code); |
| | | |
| | | |
| | | OssTemplate template = null; |
| | | // template = templatePool.get(tenantId); |
| | | OssRule ossRule = new PanoramaOSSRule(Boolean.FALSE,prefixPath,resGuid); |
| | | PanoramaOSSRule ossRule = new PanoramaOSSRule(Boolean.FALSE,prefixPath,resGuid); |
| | | if (oss.getCategory() == OssEnum.MINIO.getCategory()) { |
| | | template = MinioOssBuilder.template(oss, ossRule); |
| | | } else if (oss.getCategory() == OssEnum.QINIU.getCategory()) { |