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
6fffe3d7
Commit
6fffe3d7
authored
Sep 24, 2019
by
高鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zyj-1001413' into 'master'
bug处理 See merge request rays/pcloud-book!174
parents
ebe91cd5
a54b16e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
AdvertisingSpaceBizImpl.java
...ud/book/advertising/biz/impl/AdvertisingSpaceBizImpl.java
+14
-10
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/advertising/biz/impl/AdvertisingSpaceBizImpl.java
View file @
6fffe3d7
...
@@ -760,18 +760,22 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
...
@@ -760,18 +760,22 @@ public class AdvertisingSpaceBizImpl implements AdvertisingSpaceBiz {
* @return
* @return
*/
*/
private
List
<
String
>
getLinkList
(
String
title
,
Boolean
isNew
)
{
private
List
<
String
>
getLinkList
(
String
title
,
Boolean
isNew
)
{
//标题正则表达式
List
<
String
>
list
=
new
ArrayList
<>();
Pattern
pa
;
if
(
isNew
)
{
if
(
isNew
)
{
title
=
title
.
replaceAll
(
" "
,
" "
);
String
regex
=
"(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"
;
pa
=
Pattern
.
compile
(
UrlConstant
.
OWN_SHORT_URL
+
"[0-9A-Za-z]+\\s"
);
Matcher
matcher
=
Pattern
.
compile
(
regex
,
Pattern
.
DOTALL
).
matcher
(
title
);
while
(
matcher
.
find
())
{
String
url
=
matcher
.
group
();
if
(
url
.
startsWith
(
UrlConstant
.
OWN_SHORT_URL
))
{
list
.
add
(
matcher
.
group
());
}
}
}
else
{
}
else
{
pa
=
Pattern
.
compile
(
"<link>.*?</link>"
);
Pattern
pa
=
Pattern
.
compile
(
"<link>.*?</link>"
);
}
Matcher
ma
=
pa
.
matcher
(
title
);
List
<
String
>
list
=
new
ArrayList
<>();
while
(
ma
.
find
())
{
Matcher
ma
=
pa
.
matcher
(
title
);
list
.
add
(
ma
.
group
());
while
(
ma
.
find
())
{
}
list
.
add
(
ma
.
group
());
}
}
return
list
;
return
list
;
}
}
...
...
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