Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
change4weixin
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
shenjinzhu
change4weixin
Commits
16ec5d61
Commit
16ec5d61
authored
May 04, 2018
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了转链接部分的截取
parent
d7887322
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
src/main/java/com/zhiwei/chendong/ExcelReadAndWrite.java
+6
-4
src/main/java/com/zhiwei/chendong/ReaderExcel.java
+2
-3
src/main/java/com/zhiwei/finance/PushFinanceByTime.java
+1
-1
No files found.
src/main/java/com/zhiwei/chendong/ExcelReadAndWrite.java
View file @
16ec5d61
...
@@ -524,7 +524,9 @@ public class ExcelReadAndWrite {
...
@@ -524,7 +524,9 @@ public class ExcelReadAndWrite {
if
(
null
!=
l
.
getUrl
())
{
if
(
null
!=
l
.
getUrl
())
{
if
(
l
.
getUrl
().
startsWith
(
"https://mp.weixin.qq.com/s?src"
)
if
(
l
.
getUrl
().
startsWith
(
"https://mp.weixin.qq.com/s?src"
)
||
l
.
getUrl
().
startsWith
(
"http://mp.weixin.qq.com/s?src"
))
{
||
l
.
getUrl
().
startsWith
(
"http://mp.weixin.qq.com/s?src"
))
{
urls
.
add
(
l
.
getUrl
());
String
demoUrl
=
l
.
getUrl
().
replaceAll
(
"&key=[\\s\\S]+"
,
""
);
l
.
setUrl
(
demoUrl
);
urls
.
add
(
demoUrl
);
log
.
info
(
l
);
log
.
info
(
l
);
}
}
}
else
{
}
else
{
...
@@ -553,10 +555,10 @@ public class ExcelReadAndWrite {
...
@@ -553,10 +555,10 @@ public class ExcelReadAndWrite {
continue
;
continue
;
}
}
try
{
try
{
if
(
null
!=
w
.
getUrl
()
&&
w
.
getUrl
().
startsWith
(
"http
s
://mp.weixin.qq.com/s"
)
if
(
null
!=
w
.
getUrl
()
&&
w
.
getUrl
().
startsWith
(
"http://mp.weixin.qq.com/s"
)
||
w
.
getUrl
().
startsWith
(
"http://mp.weixin.qq.com/s"
))
{
||
w
.
getUrl
().
startsWith
(
"http
s
://mp.weixin.qq.com/s"
))
{
if
(
map
.
get
(
w
.
getUrl
())
!=
null
)
{
if
(
map
.
get
(
w
.
getUrl
())
!=
null
)
{
w
.
setGetUrl
(
urlRedirect
(
map
.
get
(
w
.
getUrl
()
)));
w
.
setGetUrl
(
map
.
get
(
w
.
getUrl
(
)));
}
}
}
else
{
}
else
{
if
(
w
.
getUrl
()
==
null
)
{
if
(
w
.
getUrl
()
==
null
)
{
...
...
src/main/java/com/zhiwei/chendong/ReaderExcel.java
View file @
16ec5d61
...
@@ -22,9 +22,8 @@ public class ReaderExcel {
...
@@ -22,9 +22,8 @@ public class ReaderExcel {
private
final
static
Log
log
=
LogFactory
.
getLog
(
ReaderExcel
.
class
);
private
final
static
Log
log
=
LogFactory
.
getLog
(
ReaderExcel
.
class
);
public
static
void
main
(
String
[]
args
)
throws
IOException
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
for
(
Weixin
w
:
getExcel
(
"C:\\Users\\admin\\Desktop/微信-山西三维0419.xlsx"
))
{
System
.
out
.
println
(
"https://mp.weixin.qq.com/s?src=11×tamp=1525385592&ver=855&signature=t61muuTJKorCLU9B6F9khlfr3ezct6GGh-Moxq*9b4RZxgQnHSpElHV9CYCi2YnSA3nOz2*a04k6R9iHOGzctg1KS9Bgx3jelhxEi5NzmXHmhglHbp8Tjf5*rKEFilpi&new=1&key=95dc4253938e3c7ba33e1ff6f7363608ab00e37f99c7f7ff7e7cb4e5b1a6ce70df92e7de80d56d237ffe33cd15ffcb0a80bc0d064ece8d169c6e38960f0d44e359a01cd7bcb987a08b3de1a19e94eb06&uin=NTk1NjM2Nzg3&key=b97b0a94956e0cb2b01167441267dc09f5e79cb852c323792d0040c1988b0c39913e23a2e43b0bccef725d2843e0da0d81c5164338260e6b932f25085936eec21b0e71ca66cd78582d2411b4737cb644&uin=MzM3MTk2NzAxNA%3D%3D"
.
replaceAll
(
"&key=[\\s\\S]+"
,
""
));
System
.
out
.
println
(
w
);
}
}
}
public
static
List
<
Weixin
>
getExcel
(
String
url
)
throws
IOException
{
public
static
List
<
Weixin
>
getExcel
(
String
url
)
throws
IOException
{
...
...
src/main/java/com/zhiwei/finance/PushFinanceByTime.java
View file @
16ec5d61
...
@@ -20,7 +20,7 @@ import com.zw.entity.NewsResult;
...
@@ -20,7 +20,7 @@ import com.zw.entity.NewsResult;
import
sendmail.SendMailUtil
;
import
sendmail.SendMailUtil
;
//
@Component
@Component
public
class
PushFinanceByTime
extends
Thread
{
public
class
PushFinanceByTime
extends
Thread
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
PushFinanceByTime
.
class
);
private
static
final
Log
log
=
LogFactory
.
getLog
(
PushFinanceByTime
.
class
);
...
...
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