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
6f031eaa
Commit
6f031eaa
authored
Mar 25, 2019
by
huzhenkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改比较器
parent
41eaece0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
ProductTypeConstant.java
.../com/pcloud/common/core/constant/ProductTypeConstant.java
+2
-0
StringComparator.java
...java/com/pcloud/common/utils/string/StringComparator.java
+5
-3
No files found.
pcloud-common-core/src/main/java/com/pcloud/common/core/constant/ProductTypeConstant.java
View file @
6f031eaa
...
@@ -306,4 +306,6 @@ public class ProductTypeConstant {
...
@@ -306,4 +306,6 @@ public class ProductTypeConstant {
* 作品下资源来源于content中心的作品
* 作品下资源来源于content中心的作品
*/
*/
public
static
final
String
[]
RESOURCE_CONTENT_PRODUCT
=
{
AUDIO
,
VIDEO
,
BOOK
,
LISTEN
,
PDF
,
ALBUM
,
FORMAT
,
EBOOK
};
public
static
final
String
[]
RESOURCE_CONTENT_PRODUCT
=
{
AUDIO
,
VIDEO
,
BOOK
,
LISTEN
,
PDF
,
ALBUM
,
FORMAT
,
EBOOK
};
}
}
pcloud-common/src/main/java/com/pcloud/common/utils/string/StringComparator.java
View file @
6f031eaa
package
com
.
pcloud
.
common
.
utils
.
string
;
package
com
.
pcloud
.
common
.
utils
.
string
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.math.BigInteger
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -54,8 +55,8 @@ public class StringComparator implements Comparator<String> {
...
@@ -54,8 +55,8 @@ public class StringComparator implements Comparator<String> {
boolean
isCh1Num
=
ch1
>=
'0'
&&
ch1
<=
'9'
;
boolean
isCh1Num
=
ch1
>=
'0'
&&
ch1
<=
'9'
;
boolean
isCh2Num
=
ch2
>=
'0'
&&
ch2
<=
'9'
;
boolean
isCh2Num
=
ch2
>=
'0'
&&
ch2
<=
'9'
;
if
(
isCh1Num
&&
isCh2Num
)
{
if
(
isCh1Num
&&
isCh2Num
)
{
long
i1
=
getNumber
(
str1
.
substring
(
i
,
i
+
1
));
long
i1
=
getNumber
(
str1
.
substring
(
i
));
long
i2
=
getNumber
(
str2
.
substring
(
i
,
i
+
1
));
long
i2
=
getNumber
(
str2
.
substring
(
i
));
if
(
i1
!=
i2
)
{
if
(
i1
!=
i2
)
{
return
i1
>
i2
?
1
:
-
1
;
return
i1
>
i2
?
1
:
-
1
;
}
}
...
@@ -101,9 +102,10 @@ public class StringComparator implements Comparator<String> {
...
@@ -101,9 +102,10 @@ public class StringComparator implements Comparator<String> {
break
;
break
;
}
}
}
}
if
(
bits
>
0
)
{
if
(
bits
>
0
&&
bits
<
19
)
{
num
=
Long
.
parseLong
(
str
.
substring
(
0
,
bits
));
num
=
Long
.
parseLong
(
str
.
substring
(
0
,
bits
));
}
}
return
num
;
return
num
;
}
}
}
}
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