Commit a7a6d6d1 authored by yaobeibei's avatar yaobeibei

fix auto input

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