From a15bc49f1c7dc772ded22a3a390a9a920883f417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dongdonglin=28=E6=9E=97=E5=90=91=E4=B8=9C=29?= Date: Wed, 17 Oct 2018 10:28:32 +0800 Subject: [PATCH] fix(dao): fix train finding problem --- app/dao/time_series_detector/train_op.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/dao/time_series_detector/train_op.py b/app/dao/time_series_detector/train_op.py index 1f698e5..e4d0fa1 100644 --- a/app/dao/time_series_detector/train_op.py +++ b/app/dao/time_series_detector/train_op.py @@ -31,6 +31,7 @@ class TrainOperation(object): task_id = data['taskId'] task_status = data['taskStatus'] beg_limit = (item_per_page * (request_page - 1)) + source = data['source'] limit = item_per_page params = [] query_str = "" @@ -39,6 +40,9 @@ class TrainOperation(object): params.append(("%" + task_id + "%").encode('utf8')) params.append(("%" + task_id + "%").encode('utf8')) query_str += " and (task_id like %s or model_name like %s) " + if source != "": + params.append("%" + source + "%") + query_str += " and (source like %s) " if begin_time != "" and end_time != "": params.append(begin_time) params.append(end_time)