Commit 73a46832 by shenjinzhu

xiufu

parent 4a2013da
......@@ -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>
......@@ -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;
}
......
......@@ -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();
}
/**
* 微信转链接的文件地址入库
*/
......
......@@ -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
<?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>
......@@ -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
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment