Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
2783538b
Commit
2783538b
authored
Nov 02, 2020
by
桂前礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug: [none] 处理obs旧数据
parent
fda054a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
AliyunConstant.java
.../main/java/com/pcloud/common/constant/AliyunConstant.java
+13
-2
No files found.
pcloud-common/src/main/java/com/pcloud/common/constant/AliyunConstant.java
View file @
2783538b
package
com
.
pcloud
.
common
.
constant
;
package
com
.
pcloud
.
common
.
constant
;
import
cn.hutool.core.util.StrUtil
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -410,6 +411,9 @@ public class AliyunConstant {
...
@@ -410,6 +411,9 @@ public class AliyunConstant {
SECRET_KEY
=
secretKey
;
SECRET_KEY
=
secretKey
;
}
}
public
static
final
String
PRO_FILE_BUCKET
=
"whlg-oss-prod-002"
;
public
static
final
String
UAT_FILE_BUCKET
=
"whlg-oss-uat-002"
;
public
static
final
String
TEST_FILE_BUCKET
=
"whlg-oss-test-002"
;
/**
/**
* 根据域名获取bucket名称
* 根据域名获取bucket名称
...
@@ -421,10 +425,17 @@ public class AliyunConstant {
...
@@ -421,10 +425,17 @@ public class AliyunConstant {
if
(
StringUtil
.
isEmpty
(
fileUrl
))
{
if
(
StringUtil
.
isEmpty
(
fileUrl
))
{
return
null
;
return
null
;
}
}
if
(
fileUrl
.
contains
(
"transcode"
)){
String
domainName
=
FileUtils
.
getDomainName
(
fileUrl
);
if
(
fileUrl
.
contains
(
"transcode"
))
{
if
(
StrUtil
.
contains
(
domainName
,
"5rs.me"
))
{
return
PRO_FILE_BUCKET
;
}
else
if
(
StrUtil
.
contains
(
domainName
,
"raysyun.com"
))
{
return
UAT_FILE_BUCKET
;
}
else
if
(
StrUtil
.
contains
(
domainName
,
"raysgo.com"
))
{
return
TEST_FILE_BUCKET
;
}
return
FILE_BUCKET
;
return
FILE_BUCKET
;
}
}
String
domainName
=
FileUtils
.
getDomainName
(
fileUrl
);
if
(
StringUtil
.
isEmpty
(
domainName
))
{
if
(
StringUtil
.
isEmpty
(
domainName
))
{
return
INPUT_BUCKET
;
return
INPUT_BUCKET
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment