|
|
|
@ -330,14 +330,14 @@ class Keyworlds extends CI_Controller {
|
|
|
|
|
$this->Keywords_model->update_time($kw_id);
|
|
|
|
|
} else {
|
|
|
|
|
$add = $this->Keywordsrank_model->add_rank($kw_id, $rank['rank'], $rank['rank_m'], $rank['source'], $rank['source_m'], $rank['engines']);
|
|
|
|
|
// rank 变化
|
|
|
|
|
if ($add && $client_flag === 'PC') {
|
|
|
|
|
$this->load->model('InfoSMS_model');
|
|
|
|
|
$last_rank_pc = isset($last_rank_pc[0]) ? $last_rank_pc[0]->kwr_rank : $rank['rank'];
|
|
|
|
|
$this->InfoSMS_model->readed_for_info($kw_id, 'keywords_rank');
|
|
|
|
|
$this->InfoSMS_model->add('keywords_rank', $kw_id, $rank['rank'], $last_rank_pc, (string) ($rank['rank'] - $last_rank_pc));
|
|
|
|
|
$this->Keywords_model->update_time($kw_id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// rank 变化
|
|
|
|
|
if ($client_flag === 'PC') {
|
|
|
|
|
$this->load->model('InfoSMS_model');
|
|
|
|
|
$last_rank_pc = isset($last_rank_pc[0]) ? $last_rank_pc[0]->kwr_rank : $rank['rank'];
|
|
|
|
|
$this->InfoSMS_model->readed_for_info($kw_id, 'keywords_rank');
|
|
|
|
|
$this->InfoSMS_model->add('keywords_rank', $kw_id, $rank['rank'], $last_rank_pc, (string) ($rank['rank'] - $last_rank_pc));
|
|
|
|
|
$this->Keywords_model->update_time($kw_id);
|
|
|
|
|
}
|
|
|
|
|
echo json_encode($data);
|
|
|
|
|
return TRUE;
|
|
|
|
@ -417,15 +417,15 @@ class Keyworlds extends CI_Controller {
|
|
|
|
|
$this->Keywords_model->update_time($v->kw_id);
|
|
|
|
|
} else {
|
|
|
|
|
$add = $this->Keywordsrank_model->add_rank($v->kw_id, $rank['rank'], $rank['rank_m'], $rank['source'], $rank['source_m'], $rank['engines']);
|
|
|
|
|
// rank 变化
|
|
|
|
|
if ($add && $client_flag === 'PC') {
|
|
|
|
|
$this->load->model('InfoSMS_model');
|
|
|
|
|
$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));
|
|
|
|
|
if ($engines != 'yandex') {
|
|
|
|
|
$this->Keywords_model->update_time($v->kw_id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// rank 变化
|
|
|
|
|
if ($client_flag === 'PC') {
|
|
|
|
|
$this->load->model('InfoSMS_model');
|
|
|
|
|
$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));
|
|
|
|
|
if ($engines != 'yandex') {
|
|
|
|
|
$this->Keywords_model->update_time($v->kw_id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|