|
@@ -25,17 +25,17 @@ public class DownloadTask implements ITask {
|
|
Record recordfind = Db.use("local").findFirst("select * from study where status=1 order by createAt asc");
|
|
Record recordfind = Db.use("local").findFirst("select * from study where status=1 order by createAt asc");
|
|
// recordfind.set("status", 2);
|
|
// recordfind.set("status", 2);
|
|
// Db.use("local").update("study", recordfind);
|
|
// Db.use("local").update("study", recordfind);
|
|
-
|
|
|
|
|
|
+
|
|
recordfind.set("status", 4);
|
|
recordfind.set("status", 4);
|
|
recordfind.set("updateAt", getDateStr());
|
|
recordfind.set("updateAt", getDateStr());
|
|
- Db.use("local").update("study",recordfind);
|
|
|
|
|
|
+ Db.use("local").update("study", recordfind);
|
|
// JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
// JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
// String[] strings = jsonObject.getString("Path").split("\\\\");
|
|
// String[] strings = jsonObject.getString("Path").split("\\\\");
|
|
- dService.downloadFtpFile(recordfind.getStr("path"));
|
|
|
|
|
|
+ dService.downloadFtpFile(recordfind.getStr("path"));
|
|
// }
|
|
// }
|
|
recordfind.set("status", 3);
|
|
recordfind.set("status", 3);
|
|
recordfind.set("updateAt", getDateStr());
|
|
recordfind.set("updateAt", getDateStr());
|
|
- Db.use("local").update("study",recordfind);
|
|
|
|
|
|
+ Db.use("local").update("study", recordfind);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -43,18 +43,19 @@ public class DownloadTask implements ITask {
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 日期字符串格式转换
|
|
* 日期字符串格式转换
|
|
|
|
+ *
|
|
* @param dateStr
|
|
* @param dateStr
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
private String getDateStr() {
|
|
private String getDateStr() {
|
|
- SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
- Date date = new Date();
|
|
|
|
- String timeString = null;
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ Date date = new Date();
|
|
|
|
+ String timeString = null;
|
|
timeString = sdf.format(date);
|
|
timeString = sdf.format(date);
|
|
- return timeString;
|
|
|
|
|
|
+ return timeString;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|