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
73a46832
Commit
73a46832
authored
Dec 20, 2017
by
shenjinzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xiufu
parent
4a2013da
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
58 deletions
+27
-58
.project
+0
-6
src/main/java/com/zhiwei/chendong/ExcelReadAndWrite.java
+1
-4
src/main/java/com/zhiwei/chendong/MongoForChenDong.java
+10
-4
src/main/resources/datasource.properties
+8
-6
src/main/resources/rebel.xml
+0
-16
target/classes/datasource.properties
+8
-6
target/classes/rebel.xml
+0
-16
No files found.
.project
View file @
73a46832
...
...
@@ -30,11 +30,6 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.zeroturnaround.eclipse.rebelXmlBuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jem.workbench.JavaEMFNature
</nature>
...
...
@@ -43,6 +38,5 @@
<nature>
org.eclipse.m2e.core.maven2Nature
</nature>
<nature>
org.eclipse.wst.common.project.facet.core.nature
</nature>
<nature>
org.eclipse.wst.jsdt.core.jsNature
</nature>
<nature>
org.zeroturnaround.eclipse.jrebelNature
</nature>
</natures>
</projectDescription>
src/main/java/com/zhiwei/chendong/ExcelReadAndWrite.java
View file @
73a46832
...
...
@@ -350,11 +350,9 @@ public class ExcelReadAndWrite {
System
.
out
.
println
(
"正常运行"
+
str
);
Matcher
macher
=
Pattern
.
compile
(
"num:([0-9]+)\\}"
).
matcher
(
str
);
if
(
macher
.
find
())
{
if
(
Integer
.
valueOf
(
macher
.
group
(
1
))
!=
0
)
{
now
=
Integer
.
valueOf
(
macher
.
group
(
1
));
MainController
.
lists
.
get
(
0
).
setSurplusCount
(
now
);
}
}
if
(
now
==
0
)
{
b
=
false
;
}
...
...
@@ -567,8 +565,7 @@ public class ExcelReadAndWrite {
}
}
write
(
list
,
e
.
getMail
());
// delete(e.getUrl());
m
.
remove
();
MainController
.
lists
.
remove
(
MainController
.
lists
.
get
(
0
));
e
=
null
;
}
...
...
src/main/java/com/zhiwei/chendong/MongoForChenDong.java
View file @
73a46832
...
...
@@ -46,11 +46,11 @@ public class MongoForChenDong {
optionsBuilder
.
socketKeepAlive
(
true
);
optionsBuilder
.
socketTimeout
(
1000
*
20
);
MongoClientOptions
options
=
optionsBuilder
.
build
();
char
[]
passwords
=
Config
.
getVal
(
"password"
).
toCharArray
();
//
char[] passwords = Config.getVal("password").toCharArray();
List
<
MongoCredential
>
credentials
=
new
ArrayList
<>();
MongoCredential
credential
=
MongoCredential
.
createCredential
(
Config
.
getVal
(
"user"
),
Config
.
getVal
(
"dbName"
),
passwords
);
credentials
.
add
(
credential
);
//
MongoCredential credential = MongoCredential.createCredential(Config.getVal("user"),
//
Config.getVal("dbName"), passwords);
//
credentials.add(credential);
List
<
ServerAddress
>
serverAddresses
=
new
ArrayList
<>();
serverAddresses
.
add
(
new
ServerAddress
(
Config
.
getVal
(
"host"
),
Integer
.
valueOf
(
Config
.
getVal
(
"port"
))));
mongoClient
=
new
MongoClient
(
serverAddresses
,
credentials
,
options
);
...
...
@@ -111,6 +111,12 @@ public class MongoForChenDong {
return
list
.
size
();
}
public
void
remove
()
{
DB
db
=
mongoClient
.
getDB
(
Config
.
getVal
(
"dbName"
));
DBCollection
dbCollection
=
db
.
getCollection
(
"RawUrl"
);
dbCollection
.
drop
();
}
/**
* 微信转链接的文件地址入库
*/
...
...
src/main/resources/datasource.properties
View file @
73a46832
...
...
@@ -2,12 +2,13 @@ basefile=/home/nbzhiwei/upload/
#basefile=C:/Users/Administrator/Desktop/news222.xls
timefileUrl
=
/home/nbzhiwei/upload
#timefileUrl=C:/Users/Administrator/Desktop
host
=
106.14.249.240
port
=
26807
password
=
1q2w3e4r
user
=
zhiweidata
dbName
=
spyPlat
#host=106.14.249.240
#port=26807
#password=1q2w3e4r
#user=zhiweidata
dbName
=
TmpData
host
=
192.168.0.36
port
=
26017
socketIp
=
192.168.0.243
socketPort
=
10201
\ No newline at end of file
src/main/resources/rebel.xml
deleted
100644 → 0
View file @
4a2013da
<?xml version="1.0" encoding="UTF-8"?>
<application
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.zeroturnaround.com"
xsi:schemaLocation=
"http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd"
>
<classpath>
<dir
name=
"D:/ZhiWei/change4weixin/target/classes"
>
</dir>
</classpath>
<web>
<link
target=
"/"
>
<dir
name=
"D:/ZhiWei/change4weixin/src/main/webapp"
>
</dir>
</link>
</web>
</application>
target/classes/datasource.properties
View file @
73a46832
...
...
@@ -2,12 +2,13 @@ basefile=/home/nbzhiwei/upload/
#basefile=C:/Users/Administrator/Desktop/news222.xls
timefileUrl
=
/home/nbzhiwei/upload
#timefileUrl=C:/Users/Administrator/Desktop
host
=
106.14.249.240
port
=
26807
password
=
1q2w3e4r
user
=
zhiweidata
dbName
=
spyPlat
#host=106.14.249.240
#port=26807
#password=1q2w3e4r
#user=zhiweidata
dbName
=
TmpData
host
=
192.168.0.36
port
=
26017
socketIp
=
192.168.0.243
socketPort
=
10201
\ No newline at end of file
target/classes/rebel.xml
deleted
100644 → 0
View file @
4a2013da
<?xml version="1.0" encoding="UTF-8"?>
<application
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.zeroturnaround.com"
xsi:schemaLocation=
"http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd"
>
<classpath>
<dir
name=
"D:/ZhiWei/change4weixin/target/classes"
>
</dir>
</classpath>
<web>
<link
target=
"/"
>
<dir
name=
"D:/ZhiWei/change4weixin/src/main/webapp"
>
</dir>
</link>
</web>
</application>
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