diff --git a/model/mWeiboComments.php b/model/mWeiboComments.php index 18c9310..6aab26a 100644 --- a/model/mWeiboComments.php +++ b/model/mWeiboComments.php @@ -131,6 +131,12 @@ class mWeiboComments extends mBase { $max_id = $weibo_data_id - 1; } + $rdata['total_number'] = $source_data['total_number']+0; + $rdata['max_id'] = $max_id; + $rdata['weibo_id'] = $weibo_id; + $rdata['is_load_all'] = count($source_data['data']) <= 0 ? true : false; + if(empty($source_data['data']) || count($source_data['data']) <= 0) return $rdata; + $res = $this->obj->execTrans2($sqls); if(!$res) { $this->setError('保存评论失败'); @@ -138,10 +144,7 @@ class mWeiboComments extends mBase { return false; } - $rdata['total_number'] = $source_data['total_number']; - $rdata['max_id'] = $max_id; - $rdata['weibo_id'] = $weibo_id; - $rdata['is_load_all'] = count($source_data['data']) < 20 ? true : false; + return $rdata; } diff --git a/queue/deal/spider_weibo_comment.php b/queue/deal/spider_weibo_comment.php index 87016ad..e48f4dd 100644 --- a/queue/deal/spider_weibo_comment.php +++ b/queue/deal/spider_weibo_comment.php @@ -13,6 +13,7 @@ class spiderWeiboComment extends dealBase { } public function deal() { + exit; $obj = new mSpider(); $rdobj = $obj->initRedis();