Commit d3256311 authored by 智勇's avatar 智勇

greater than date

parent 3bc5d8da
......@@ -28,7 +28,15 @@ exports.get = async function () {
exports.get_log = async function () {
await this.bindDefault();
let item = await this.mongo("statisticslog").getLog(this.request.body, { create_time: -1 });
let item = await this.mongo("statisticslog").getLog({
namespace: this.request.body.query.namespace,
active: this.request.body.query.active,
microservice_name: this.request.body.query.microservice_name,
create_time: {
$gt: new Date(new Date().getTime() - 4 * 60 * 60 * 1000)
}
}, { create_time: -1 });
// let item = await this.mongo("statisticslog").getLog(this.request.body.query, { create_time: { $slice: [this.request.body.slice.num, this.request.body.slice.count] } }, { create_time: -1 });
this.body = item
return
}
\ No newline at end of file
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