Commit a7a6d6d1 authored by yaobeibei's avatar yaobeibei

fix auto input

parent 2d9d1c5d
......@@ -182,6 +182,8 @@ exports.list = async (ctx, next) => {
let {
skip=0,
limit=10,
clue,
callback_data,
caller,
start,
bindID,
......@@ -208,6 +210,8 @@ exports.list = async (ctx, next) => {
let conditions = tools.generateDateQuery(start, end);
conditions.account = account._id;
if(clue) conditions.clue = clue;
if(callback_data) conditions.callback_data = callback_data;
if(bindID) {
conditions.bindID = bindID;
}
......
......@@ -144,7 +144,7 @@ exports.createAuto = async(ctx, next) => {
try {
ctx.websocket.on('message', async function(message) {
let { order } = JSON.parse(message);
let { order, start, end } = JSON.parse(message);
//let order = "5c8f3f30189f42000721d983";
if(!tools.valid(order)) {
ctx.websocket.send(JSON.stringify({ type: 'warning', message: '订单ID 格式错误' }));
......@@ -219,7 +219,9 @@ exports.createAuto = async(ctx, next) => {
"provinces": [],
"account": user._id,
"url": [url],
"exactMatch": true
"exactMatch": true,
start,
end
});
if(res.status == 'ok') {
......
......@@ -80,10 +80,10 @@ schema.pre('save', function (next) {
const doc = this;
let date = moment().format('YYYYMMDD');
let map = {
'data': 'D',
'msg': 'M',
'record': 'R',
'imei': 'I'
'data': 'OD',
'msg': 'OM',
'record': 'OR',
'imei': 'OI'
}
let suffix = ((map[doc.type] || 'U') + date);
if(!doc.isNew) next();
......
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