| | |
| | | */ |
| | | package cn.gistack.resource.builder.oss; |
| | | |
| | | import cn.gistack.common.constant.CommonConstant; |
| | | import cn.gistack.resource.rule.MyOssRule; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | */ |
| | | 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); |
| | |
| | | Oss oss = getOss(tenantId, code); |
| | | OssTemplate template = templatePool.get(tenantId); |
| | | template = templatePool.get(tenantId); |
| | | OssRule ossRule = new MyOssRule(Boolean.TRUE,prefixPath); |
| | | OssRule ossRule = new MyOssRule(Boolean.FALSE,prefixPath); |
| | | if (oss.getCategory() == OssEnum.MINIO.getCategory()) { |
| | | template = MinioOssBuilder.template(oss, ossRule); |
| | | } else if (oss.getCategory() == OssEnum.QINIU.getCategory()) { |