From 8d8b8bcae7f05900917a6f95698cf86afa3339c7 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 1 Nov 2017 11:04:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=94=AE=E8=AF=8D=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=97=A7=E6=8E=92=E5=90=8D,=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=8E=92=E5=90=8D=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/keyworlds.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/keyworlds.php b/application/controllers/keyworlds.php index 1dd7d005..c4098f35 100644 --- a/application/controllers/keyworlds.php +++ b/application/controllers/keyworlds.php @@ -338,11 +338,12 @@ class Keyworlds extends CI_Controller { $engines = trim($engines); //取出需要更新排名的关键词 // 先取时间最久没更新的 - $worldsList = $this->Keywords_model->get_keyworld_list_old(1, $engines, $fix_site_code); - $today = strtotime(date('Y-m-d')); - $client_flag = "PC"; - $rank_flag = 'rank'; - $source_flag = 'source'; + $worldsList = $this->Keywords_model->get_keyworld_list_old(1, $engines, $fix_site_code); + $today = strtotime(date('Y-m-d')); + $client_flag = "PC"; + $rank_flag = 'rank'; + $source_flag = 'source'; + $last_rank_pc = $this->Keywordsrank_model->get_rank_list($worldsList[0]->kw_id); if (empty($worldsList)) { $worldsList = $this->Keywords_model->get_keyworld_list(1, $engines, $fix_site_code); $client_flag = "m"; @@ -392,7 +393,6 @@ class Keyworlds extends CI_Controller { and $this->Keywordsrank_model->add_rank($v->kw_id, $rank['rank'], $rank['rank_m'], $rank['source'], $rank['source_m'], $rank['engines']) ) { $this->load->model('InfoSMS_model'); - $last_rank_pc = $this->Keywordsrank_model->get_rank_list($worldsList[0]->kw_id); $last_rank_pc = isset($last_rank_pc[0]) ? $last_rank_pc[0]->kwr_rank : $rank['rank']; $this->InfoSMS_model->readed_for_info($v->kw_id, 'keywords_rank'); $this->InfoSMS_model->add('keywords_rank', $v->kw_id, $rank['rank'], $last_rank_pc, (string) ($rank['rank'] - $last_rank_pc));