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
2f4a588c
Commit
2f4a588c
authored
May 22, 2018
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变量修改后测试
parent
50779806
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
src/main/java/com/zhiwei/readWechat/ServerClient.java
+1
-3
src/main/java/com/zhiwei/readWechat/WechatReadAndWrite.java
+6
-3
No files found.
src/main/java/com/zhiwei/readWechat/ServerClient.java
View file @
2f4a588c
...
@@ -12,8 +12,6 @@ import org.springframework.stereotype.Component;
...
@@ -12,8 +12,6 @@ import org.springframework.stereotype.Component;
@Component
@Component
public
class
ServerClient
extends
Thread
{
public
class
ServerClient
extends
Thread
{
public
static
boolean
needSend
=
false
;
public
ServerClient
()
{
public
ServerClient
()
{
this
.
start
();
this
.
start
();
}
}
...
@@ -41,7 +39,7 @@ public class ServerClient extends Thread {
...
@@ -41,7 +39,7 @@ public class ServerClient extends Thread {
if
(
line
!=
null
&&
line
.
equals
(
"result"
))
{
if
(
line
!=
null
&&
line
.
equals
(
"result"
))
{
writer
.
println
(
"result:end"
);
writer
.
println
(
"result:end"
);
writer
.
flush
();
writer
.
flush
();
needS
end
=
true
;
WechatReadAndWrite
.
needs
end
=
true
;
System
.
out
.
println
(
"收到result"
);
System
.
out
.
println
(
"收到result"
);
}
else
if
(
line
!=
null
)
{
}
else
if
(
line
!=
null
)
{
writer
.
println
(
"无效"
+
line
);
writer
.
println
(
"无效"
+
line
);
...
...
src/main/java/com/zhiwei/readWechat/WechatReadAndWrite.java
View file @
2f4a588c
...
@@ -34,7 +34,7 @@ import sendmail.SendMailUtil;
...
@@ -34,7 +34,7 @@ import sendmail.SendMailUtil;
public
class
WechatReadAndWrite
{
public
class
WechatReadAndWrite
{
private
final
static
Log
log
=
LogFactory
.
getLog
(
WechatReadAndWrite
.
class
);
private
final
static
Log
log
=
LogFactory
.
getLog
(
WechatReadAndWrite
.
class
);
public
static
Excels
e
;
public
static
Excels
e
;
public
static
boolean
cut
=
false
;
public
static
boolean
needsend
=
false
;
public
static
String
url
=
Config
.
getVal
(
"basefile"
);
public
static
String
url
=
Config
.
getVal
(
"basefile"
);
public
static
boolean
runStrat
=
false
;
public
static
boolean
runStrat
=
false
;
public
static
int
cutCount
=
0
;
public
static
int
cutCount
=
0
;
...
@@ -146,9 +146,12 @@ public class WechatReadAndWrite {
...
@@ -146,9 +146,12 @@ public class WechatReadAndWrite {
List
<
ReadWechat
>
list
=
ReadExcel
.
getExcel
(
e
.
getUrl
());
List
<
ReadWechat
>
list
=
ReadExcel
.
getExcel
(
e
.
getUrl
());
log
.
info
(
"数据入库"
);
log
.
info
(
"数据入库"
);
m
.
insertReadWechat
(
list
);
// 存储
m
.
insertReadWechat
(
list
);
// 存储
ServerClient
.
needS
end
=
false
;
needs
end
=
false
;
while
(
!
ServerClient
.
needSend
)
{
while
(
true
)
{
Thread
.
sleep
(
1000
*
30
);
Thread
.
sleep
(
1000
*
30
);
if
(
needsend
)
{
break
;
}
}
}
log
.
info
(
"收到结束信息,开始写出文件"
);
log
.
info
(
"收到结束信息,开始写出文件"
);
Map
<
String
,
ReadWechat
>
map
=
new
HashMap
<>();
Map
<
String
,
ReadWechat
>
map
=
new
HashMap
<>();
...
...
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