keywords catch -2days

hotfix/远程访问多媒体中心
lyt 7 years ago
parent 7dfb637184
commit 1109107edc

@ -382,7 +382,7 @@ class Keyworlds extends CI_Controller {
$source_flag = 'source_m'; $source_flag = 'source_m';
} }
$today_0 = strtotime(date('Ymd000000')); $today_0 = mktime(0,0,0,date("m"),(date("d")-$this->Keywords_model->catch_day), date("Y"));
$today_24 = strtotime(date('Ymd235959')); $today_24 = strtotime(date('Ymd235959'));
$last_rank_today = $this->Keywordsrank_model->get_rank_list($worldsList[0]->kw_id,1,$today_0,$today_24); $last_rank_today = $this->Keywordsrank_model->get_rank_list($worldsList[0]->kw_id,1,$today_0,$today_24);
// $last_rank_today = $last_rank_pc; // $last_rank_today = $last_rank_pc;

@ -2,6 +2,7 @@
class infoKeywords_model extends CI_Model class infoKeywords_model extends CI_Model
{ {
public $catch_day = 2;
function __construct() function __construct()
{ {
parent::__construct(); parent::__construct();
@ -66,7 +67,7 @@ class infoKeywords_model extends CI_Model
//获取关键词列表用于抓取排名 //获取关键词列表用于抓取排名
public function get_keyworld_list_old($top = 1, $engines='',$site_code=false) public function get_keyworld_list_old($top = 1, $engines='',$site_code=false)
{ {
$today = strtotime(date('Y-m-d')); $today = mktime(0,0,0,date("m"),(date("d")-$this->catch_day), date("Y"));
//只查某个站点,原因是个事业部服务器分开,只需要查询本事业部站点即可 //只查某个站点,原因是个事业部服务器分开,只需要查询本事业部站点即可
$map = " "; $map = " ";
if(!empty($site_code)){ if(!empty($site_code)){
@ -80,7 +81,7 @@ class infoKeywords_model extends CI_Model
}elseif ($engines=='eu') { }elseif ($engines=='eu') {
$map.=" AND kw_sitecode in ('gm','vc','vac','ru','it','jp') "; $map.=" AND kw_sitecode in ('gm','vc','vac','ru','it','jp') ";
} }
$today0 = strtotime(date('Ymd000000')); $today0 = mktime(0,0,0,date("m"),(date("d")-2), date("Y"));
$sql = "SELECT TOP 1 kw_id, $sql = "SELECT TOP 1 kw_id,
kw_keyworlds, kw_keyworlds,
kw_is_id, kw_is_id,
@ -97,7 +98,7 @@ class infoKeywords_model extends CI_Model
} }
public function get_keyworld_list($top=1,$engines='',$site_code=false) public function get_keyworld_list($top=1,$engines='',$site_code=false)
{ {
$today0 = strtotime(date('Ymd000000')); $today0 = mktime(0,0,0,date("m"),(date("d")-$this->catch_day), date("Y"));
$map = " "; $map = " ";
//只查某个站点,原因是个事业部服务器分开,只需要查询本事业部站点即可 //只查某个站点,原因是个事业部服务器分开,只需要查询本事业部站点即可
if(!empty($site_code)){ if(!empty($site_code)){

@ -43,7 +43,7 @@
<div id="zhexiantu" class="span12" style="height:<?php if($wordcount==1) {echo '620px';}else{echo '1000px;';} ?>;margin-left:0;padding-right: 15px;"></div> <div id="zhexiantu" class="span12" style="height:<?php if($wordcount==1) {echo '620px';}else{echo '1000px;';} ?>;margin-left:0;padding-right: 15px;"></div>
<?php } if (!empty($rank_info)) { ?> <?php } if (!empty($rank_info)) { ?>
<legend>排名情况</legend> <legend>排名情况</legend>
<!-- update time 3 --> <!-- update time 0316 -3day -->
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>

Loading…
Cancel
Save