Commit c92c979b by shenjinzhu

1

parent 91f583d9
......@@ -101,7 +101,7 @@ public class DataDaoImpl implements DataDao {
if (d == null) {
mongo.insert(data, "Data");
}else {
d.setCount(data.getCount() + d.getCount());
d.setCount(data.getCount());
Update update = new Update();
Field[] fields = d.getClass().getDeclaredFields();
for (int j = 0; j < fields.length; j++) {
......
......@@ -40,7 +40,6 @@ public class MainThread extends Thread {
private static final Log log = LogFactory.getLog(MainThread.class);
public static Map<String, Template> mainMap = new ConcurrentHashMap<String, Template>();
public static Map<String, Template> allTmp = new ConcurrentHashMap<String, Template>();
private static Lock mainLock = new ReentrantLock();
private static String today = "";
public MainThread() {
......@@ -49,7 +48,6 @@ public class MainThread extends Thread {
/**
* 加入执行map
*
* @param template
*/
public static boolean pushMap(String templateId) {
......
......@@ -88,7 +88,7 @@ public class Task implements Runnable {
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36");
conn.setConnectTimeout(1000 * 10);
int code = conn.getResponseCode();
if (code != 200) {
if (code > 399 || code < 200) {
Template tp = MainThread.mainMap.get(ping.getTemplateId());
Message msg = new Message();
msg.setCreateDate(new Date());
......
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