From cc17fd1bbd7ef4908dd67558b284687c84ffcf98 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Tue, 18 Dec 2018 16:24:47 +0800 Subject: [PATCH] error_msg default = "" --- logdb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logdb.go b/logdb.go index 271e847..ed38f2e 100644 --- a/logdb.go +++ b/logdb.go @@ -93,7 +93,7 @@ func (logdb *LogDB) Connect() { // ADInsert 插入数据 func (logdb *LogDB) ADInsert(uid, device, platform, area_cc, section_id, response string, spider_id, channel, media, catch_account_id, status, priority int, ts_crawl time.Time) { - _, err := logdb.driver.Exec("insert into log_spider (uid, spider_id, device, platform, channel, media, area_cc, catch_account_id, section_id, response, status, priority, ts_crawl) value(?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ? ,?, ?)", uid, spider_id, device, platform, channel, media, area_cc, catch_account_id, section_id, response, status, priority, ts_crawl) + _, err := logdb.driver.Exec("insert into log_spider (uid, spider_id, device, platform, channel, media, area_cc, catch_account_id, section_id, response, error_msg, status, priority, ts_crawl) value(?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ? ,?, ?)", uid, spider_id, device, platform, channel, media, area_cc, catch_account_id, section_id, response, "", status, priority, ts_crawl) if err != nil { log.Println(err) }